Skip to content
Unverified Commit 9a48ab11 authored by Dave Stevenson's avatar Dave Stevenson Committed by Maxime Ripard
Browse files

drm/object: Add default color encoding and range value at reset



The drm_plane_create_color_properties() function asks for an initial
value for the color encoding and range, and will set the associated
plane state variable with that value if a state is present.

However, that function is usually called at a time where there's no
state yet. Since the drm_plane_state reset helper doesn't take care of
reading that value when it's called, it means that in most cases the
initial value will be 0 (so DRM_COLOR_YCBCR_BT601 and
DRM_COLOR_YCBCR_LIMITED_RANGE, respectively), or the drivers will have
to work around it.

Let's add some code in __drm_atomic_helper_plane_state_reset() to get
the initial encoding and range value if the property has been attached
in order to fix this.

Reviewed-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarDave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20220221095918.18763-19-maxime@cerno.tech
parent e4fff65f
  • mirror @mirror

    mentioned in commit 289facae710d3e9470948561e7f1e1be9651591e

    ·

    mentioned in commit 289facae710d3e9470948561e7f1e1be9651591e

    Toggle commit list
  • mirror @mirror

    mentioned in commit 8bdb747dbd6ebd31af8d97d243d94e2b487fd29d

    ·

    mentioned in commit 8bdb747dbd6ebd31af8d97d243d94e2b487fd29d

    Toggle commit list
  • mirror @mirror

    mentioned in commit c4b0ff0d

    ·

    mentioned in commit c4b0ff0d

    Toggle commit list
  • mirror @mirror

    mentioned in commit 9f368e65bd407a47a6e741fe7a1181b4a98a2c0d

    ·

    mentioned in commit 9f368e65bd407a47a6e741fe7a1181b4a98a2c0d

    Toggle commit list
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