Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/tiny/gm12u320: convert to struct drm_edid

Prefer the struct drm_edid based functions for allocating the EDID and
updating the connector.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/c31c3afa883a3321345608c480c26161b638a83e.1724348429.git.jani.nikula@intel.com
Signed-off-by: Jani Nikula <jani.nikula@intel.com>

+10 -3
+10 -3
drivers/gpu/drm/tiny/gm12u320.c
··· 464 464 * Note this assumes this driver is only ever used with the Acer C120, if we 465 465 * add support for other devices the vendor and model should be parameterized. 466 466 */ 467 - static struct edid gm12u320_edid = { 467 + static const struct edid gm12u320_edid = { 468 468 .header = { 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00 }, 469 469 .mfg_id = { 0x04, 0x72 }, /* "ACR" */ 470 470 .prod_code = { 0x20, 0xc1 }, /* C120h */ ··· 523 523 524 524 static int gm12u320_conn_get_modes(struct drm_connector *connector) 525 525 { 526 - drm_connector_update_edid_property(connector, &gm12u320_edid); 527 - return drm_add_edid_modes(connector, &gm12u320_edid); 526 + const struct drm_edid *drm_edid; 527 + int count; 528 + 529 + drm_edid = drm_edid_alloc(&gm12u320_edid, sizeof(gm12u320_edid)); 530 + drm_edid_connector_update(connector, drm_edid); 531 + count = drm_edid_connector_add_modes(connector); 532 + drm_edid_free(drm_edid); 533 + 534 + return count; 528 535 } 529 536 530 537 static const struct drm_connector_helper_funcs gm12u320_conn_helper_funcs = {