diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2022-02-18 13:04:01 +0300 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2022-03-14 18:39:53 +0300 |
commit | ec5d4a723b57721ca0f3c1c86576412e32a50579 (patch) | |
tree | 1d5241eed2e9ae2a77a1c3dd80cf05b3d7637b91 /drivers/gpu/drm/panel/panel-visionox-rm69299.c | |
parent | 193c4df5b0dcbb7ea0efb99ca13bd05cd1adaddb (diff) | |
download | linux-ec5d4a723b57721ca0f3c1c86576412e32a50579.tar.xz |
drm/panel: Use drm_mode_duplicate()
Replace the hand rolled drm_mode_duplicate() with the
real thing.
@is_dup@
@@
drm_mode_duplicate(...)
{ ... }
@depends on !is_dup@
expression dev, oldmode;
identifier newmode;
@@
- newmode = drm_mode_create(dev);
+ newmode = drm_mode_duplicate(dev, oldmode);
...
- drm_mode_copy(newmode, oldmode);
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220218100403.7028-21-ville.syrjala@linux.intel.com
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'drivers/gpu/drm/panel/panel-visionox-rm69299.c')
-rw-r--r-- | drivers/gpu/drm/panel/panel-visionox-rm69299.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/panel/panel-visionox-rm69299.c b/drivers/gpu/drm/panel/panel-visionox-rm69299.c index eb43503ec97b..db2443ac81d3 100644 --- a/drivers/gpu/drm/panel/panel-visionox-rm69299.c +++ b/drivers/gpu/drm/panel/panel-visionox-rm69299.c @@ -168,7 +168,8 @@ static int visionox_rm69299_get_modes(struct drm_panel *panel, struct visionox_rm69299 *ctx = panel_to_ctx(panel); struct drm_display_mode *mode; - mode = drm_mode_create(connector->dev); + mode = drm_mode_duplicate(connector->dev, + &visionox_rm69299_1080x2248_60hz); if (!mode) { dev_err(ctx->panel.dev, "failed to create a new display mode\n"); return 0; @@ -176,7 +177,6 @@ static int visionox_rm69299_get_modes(struct drm_panel *panel, connector->display_info.width_mm = 74; connector->display_info.height_mm = 131; - drm_mode_copy(mode, &visionox_rm69299_1080x2248_60hz); mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; drm_mode_probed_add(connector, mode); |