Commit c167ee1f authored by Paul Cercueil's avatar Paul Cercueil

drm/ingenic: Don't request full modeset if property is not modified

Avoid requesting a full modeset if the sharpness property is not
modified, because then we don't actually need it.
Signed-off-by: default avatarPaul Cercueil <paul@crapouillou.net>
Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220708205406.96473-5-paul@crapouillou.net
parent d292dc32
...@@ -697,10 +697,12 @@ ingenic_ipu_plane_atomic_set_property(struct drm_plane *plane, ...@@ -697,10 +697,12 @@ ingenic_ipu_plane_atomic_set_property(struct drm_plane *plane,
{ {
struct ingenic_ipu *ipu = plane_to_ingenic_ipu(plane); struct ingenic_ipu *ipu = plane_to_ingenic_ipu(plane);
struct drm_crtc_state *crtc_state; struct drm_crtc_state *crtc_state;
bool mode_changed;
if (property != ipu->sharpness_prop) if (property != ipu->sharpness_prop)
return -EINVAL; return -EINVAL;
mode_changed = val != ipu->sharpness;
ipu->sharpness = val; ipu->sharpness = val;
if (state->crtc) { if (state->crtc) {
...@@ -708,7 +710,7 @@ ingenic_ipu_plane_atomic_set_property(struct drm_plane *plane, ...@@ -708,7 +710,7 @@ ingenic_ipu_plane_atomic_set_property(struct drm_plane *plane,
if (WARN_ON(!crtc_state)) if (WARN_ON(!crtc_state))
return -EINVAL; return -EINVAL;
crtc_state->mode_changed = true; crtc_state->mode_changed |= mode_changed;
} }
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment