mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
drm/loongson/7a2000: convert to struct drm_edid
Prefer the struct drm_edid based functions for reading the EDID and updating the connector. Reviewed-by: Sui Jingfeng <sui.jingfeng@linux.dev> Link: https://patchwork.freedesktop.org/patch/msgid/b8c477279a6ae1b44df72bee230180e277087fae.1715691257.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
parent
56056ef643
commit
9a7f6aeac2
1 changed files with 7 additions and 8 deletions
|
|
@ -44,16 +44,15 @@
|
||||||
|
|
||||||
static int ls7a2000_connector_get_modes(struct drm_connector *connector)
|
static int ls7a2000_connector_get_modes(struct drm_connector *connector)
|
||||||
{
|
{
|
||||||
unsigned int num = 0;
|
int num;
|
||||||
struct edid *edid;
|
|
||||||
|
|
||||||
if (connector->ddc) {
|
if (connector->ddc) {
|
||||||
edid = drm_get_edid(connector, connector->ddc);
|
const struct drm_edid *drm_edid;
|
||||||
if (edid) {
|
|
||||||
drm_connector_update_edid_property(connector, edid);
|
drm_edid = drm_edid_read(connector);
|
||||||
num = drm_add_edid_modes(connector, edid);
|
drm_edid_connector_update(connector, drm_edid);
|
||||||
kfree(edid);
|
num = drm_edid_connector_add_modes(connector);
|
||||||
}
|
drm_edid_free(drm_edid);
|
||||||
|
|
||||||
return num;
|
return num;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue