drm/vc4: Consolidate Hardware Revision Check
authorMaxime Ripard <maxime@cerno.tech>
Fri, 10 Jun 2022 11:51:37 +0000 (13:51 +0200)
committerMaxime Ripard <maxime@cerno.tech>
Thu, 16 Jun 2022 09:07:51 +0000 (11:07 +0200)
commit1cbc91eb7b518cc5f80442ff9b517dc5b9d3b849
tree2c85be5190d06bd8a7a8a7e2026be0d21746d405
parentcb468c7d84d174ab9cd638be9f5b3f1ba2b311a0
drm/vc4: Consolidate Hardware Revision Check

A new generation of controller has been introduced with the
BCM2711/RaspberryPi4. This generation needs a bunch of quirks, and over
time we've piled on a number of checks in most parts of the drivers.

All these checks are performed several times, and are not always
consistent. Let's create a single, global, variable to hold it and use
it everywhere.

Reviewed-by: Melissa Wen <mwen@igalia.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20220610115149.964394-3-maxime@cerno.tech
drivers/gpu/drm/vc4/vc4_crtc.c
drivers/gpu/drm/vc4/vc4_drv.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_plane.c