mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
drm/vc4: tests: Drop drm parameter for vc4_find_crtc_for_encoder
The DRM device pointer and the DRM encoder pointer are redundant, since the latter is attached to the former and we can just follow the drm_encoder->dev pointer. Let's remove the drm_device pointer argument. Signed-off-by: Maxime Ripard <maxime@cerno.tech>
This commit is contained in:
committed by
Dom Cobley
parent
fd4e5e1190
commit
c188568b7a
@@ -7,9 +7,9 @@
|
||||
|
||||
static inline
|
||||
struct drm_crtc *vc4_find_crtc_for_encoder(struct kunit *test,
|
||||
struct drm_device *drm,
|
||||
struct drm_encoder *encoder)
|
||||
{
|
||||
struct drm_device *drm = encoder->dev;
|
||||
struct drm_crtc *crtc;
|
||||
|
||||
KUNIT_ASSERT_EQ(test, hweight32(encoder->possible_crtcs), 1);
|
||||
|
||||
@@ -91,7 +91,7 @@ int vc4_mock_atomic_add_output(struct kunit *test,
|
||||
if (!encoder)
|
||||
return -ENODEV;
|
||||
|
||||
crtc = vc4_find_crtc_for_encoder(test, drm, encoder);
|
||||
crtc = vc4_find_crtc_for_encoder(test, encoder);
|
||||
if (!crtc)
|
||||
return -ENODEV;
|
||||
|
||||
@@ -148,7 +148,7 @@ int vc4_mock_atomic_del_output(struct kunit *test,
|
||||
if (!encoder)
|
||||
return -ENODEV;
|
||||
|
||||
crtc = vc4_find_crtc_for_encoder(test, drm, encoder);
|
||||
crtc = vc4_find_crtc_for_encoder(test, encoder);
|
||||
if (!crtc)
|
||||
return -ENODEV;
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ get_vc4_crtc_state_for_encoder(struct kunit *test,
|
||||
encoder = vc4_find_encoder_by_type(drm, type);
|
||||
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, encoder);
|
||||
|
||||
crtc = vc4_find_crtc_for_encoder(test, drm, encoder);
|
||||
crtc = vc4_find_crtc_for_encoder(test, encoder);
|
||||
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, crtc);
|
||||
|
||||
new_crtc_state = drm_atomic_get_new_crtc_state(state, crtc);
|
||||
|
||||
Reference in New Issue
Block a user