Home
last modified time | relevance | path

Searched hist:"94 c1adc4c1241d1cc4cf29e3da15a65ad04171c4" (Results 1 – 2 of 2) sorted by relevance

/linux/drivers/gpu/drm/vc4/
H A Dvc4_drv.hdiff 94c1adc4c1241d1cc4cf29e3da15a65ad04171c4 Mon Oct 25 17:28:58 CEST 2021 Maxime Ripard <maxime@cerno.tech> drm/vc4: crtc: Rework the encoder retrieval code (again)

It turns out the encoder retrieval code, in addition to being
unnecessarily complicated, has a bug when only the planes and crtcs are
affected by a given atomic commit.

Indeed, in such a case, either drm_atomic_get_old_connector_state or
drm_atomic_get_new_connector_state will return NULL and thus our encoder
retrieval code will not match on anything.

We can however simplify the code by using drm_for_each_encoder_mask, the
drm_crtc_state storing the encoders a given CRTC is connected to
directly and without relying on any other state.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Link: https://lore.kernel.org/r/20211025152903.1088803-6-maxime@cerno.tech
H A Dvc4_crtc.cdiff 94c1adc4c1241d1cc4cf29e3da15a65ad04171c4 Mon Oct 25 17:28:58 CEST 2021 Maxime Ripard <maxime@cerno.tech> drm/vc4: crtc: Rework the encoder retrieval code (again)

It turns out the encoder retrieval code, in addition to being
unnecessarily complicated, has a bug when only the planes and crtcs are
affected by a given atomic commit.

Indeed, in such a case, either drm_atomic_get_old_connector_state or
drm_atomic_get_new_connector_state will return NULL and thus our encoder
retrieval code will not match on anything.

We can however simplify the code by using drm_for_each_encoder_mask, the
drm_crtc_state storing the encoders a given CRTC is connected to
directly and without relying on any other state.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
Link: https://lore.kernel.org/r/20211025152903.1088803-6-maxime@cerno.tech