]> git.baikalelectronics.ru Git - kernel.git/commit
drm/vc4: crtc: Drop feed_txp from state
authorMaxime Ripard <maxime@cerno.tech>
Mon, 25 Oct 2021 14:11:05 +0000 (16:11 +0200)
committerMaxime Ripard <maxime@cerno.tech>
Fri, 5 Nov 2021 11:53:16 +0000 (12:53 +0100)
commit88024fa9e53dcb3e953f2ba49cb63a6eee3512a3
tree5ff340b1131ae6dd2d5a651fe35749bebe5805d5
parent35c5113ceb2bf05b7144eb3cf36f529f46f4539c
drm/vc4: crtc: Drop feed_txp from state

Accessing the crtc->state pointer from outside the modesetting context
is not allowed. We thus need to copy whatever we need from the KMS state
to our structure in order to access it.

In VC4, a number of users of that pointers have crept in over the years,
the first one being whether or not the downstream controller of the
pixelvalve is our writeback controller.

Fortunately for us, Since commit db980865a026 ("drm/vc4: txp: Turn the
TXP into a CRTC of its own") this is no longer something that can change
from one commit to the other and is hardcoded.

Let's set this flag in struct vc4_crtc if we happen to be the TXP, and
drop the flag from our private state structure.

Link: https://lore.kernel.org/all/YWgteNaNeaS9uWDe@phenom.ffwll.local/
Link: https://lore.kernel.org/r/20211025141113.702757-2-maxime@cerno.tech
Fixes: 2040cc595849 ("drm/vc4: Add support for the transposer block")
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
drivers/gpu/drm/vc4/vc4_crtc.c
drivers/gpu/drm/vc4/vc4_drv.h
drivers/gpu/drm/vc4/vc4_hvs.c
drivers/gpu/drm/vc4/vc4_kms.c
drivers/gpu/drm/vc4/vc4_txp.c