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:
Maxime Ripard
2023-03-24 09:58:15 +01:00
committed by Dom Cobley
parent b1a5933e68
commit aab56c58a8
3 changed files with 4 additions and 4 deletions

View File

@@ -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);

View File

@@ -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;

View File

@@ -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);