mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
drm/probe-helper: Call drm_mode_validate_ycbcr420() before connector->mode_valid()
Make life easier for drivers by filtering out unwanted YCbCr 4:2:0 only modes prior to calling the connector->mode_valid() hook. Currently drivers will still see YCbCr 4:2:0 only modes in said hook, which will likely come as a suprise when the driver has declared no support for such modes (via setting connector->ycbcr_420_allowed to false). Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/10992 Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240516173324.18149-1-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
8a0a7b98d4
commit
a856a53de9
1 changed files with 4 additions and 4 deletions
|
|
@ -474,6 +474,10 @@ static int __drm_helper_update_and_validate(struct drm_connector *connector,
|
|||
if (mode->status != MODE_OK)
|
||||
continue;
|
||||
|
||||
mode->status = drm_mode_validate_ycbcr420(mode, connector);
|
||||
if (mode->status != MODE_OK)
|
||||
continue;
|
||||
|
||||
ret = drm_mode_validate_pipeline(mode, connector, ctx,
|
||||
&mode->status);
|
||||
if (ret) {
|
||||
|
|
@ -486,10 +490,6 @@ static int __drm_helper_update_and_validate(struct drm_connector *connector,
|
|||
else
|
||||
return -EDEADLK;
|
||||
}
|
||||
|
||||
if (mode->status != MODE_OK)
|
||||
continue;
|
||||
mode->status = drm_mode_validate_ycbcr420(mode, connector);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue