lede/target/linux/bcm27xx/patches-6.12/950-0665-drm-vc4-tests-Drop-drm-parameter-for-vc4_find_crtc_f.patch
=?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= d81c03f05e bcm27xx: add 6.12 patches from RPi repo
These patches were generated from:
https://github.com/raspberrypi/linux/commits/rpi-6.12.y
With the following command:
git format-patch -N v6.12.27..HEAD
(HEAD -> 8d3206ee456a5ecdf9ddbfd8e5e231e4f0cd716e)

Exceptions:
- (def)configs patches
- github workflows patches
- applied & reverted patches
- readme patches
- wireless patches

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-06-20 17:01:06 +08:00

64 lines
2.4 KiB
Diff

From 90fccf2582eec4442abbf1c47dfab4da24e6de39 Mon Sep 17 00:00:00 2001
From: Maxime Ripard <maxime@cerno.tech>
Date: Fri, 24 Mar 2023 09:58:15 +0100
Subject: [PATCH] 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>
---
drivers/gpu/drm/vc4/tests/vc4_mock.h | 2 +-
drivers/gpu/drm/vc4/tests/vc4_mock_output.c | 4 ++--
drivers/gpu/drm/vc4/tests/vc4_test_pv_muxing.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
--- a/drivers/gpu/drm/vc4/tests/vc4_mock.h
+++ b/drivers/gpu/drm/vc4/tests/vc4_mock.h
@@ -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);
--- a/drivers/gpu/drm/vc4/tests/vc4_mock_output.c
+++ b/drivers/gpu/drm/vc4/tests/vc4_mock_output.c
@@ -77,7 +77,7 @@ int vc4_mock_atomic_add_output(struct ku
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);
output = encoder_to_vc4_dummy_output(encoder);
@@ -115,7 +115,7 @@ int vc4_mock_atomic_del_output(struct ku
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);
crtc_state = drm_atomic_get_crtc_state(state, crtc);
--- a/drivers/gpu/drm/vc4/tests/vc4_test_pv_muxing.c
+++ b/drivers/gpu/drm/vc4/tests/vc4_test_pv_muxing.c
@@ -131,7 +131,7 @@ get_vc4_crtc_state_for_encoder(struct ku
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);