diff mbox series

drm/vc4: hdmi: make CEC adapter name unique

Message ID dcf1db75-d9cc-62cc-fa12-baf1b2b3bf31@xs4all.nl (mailing list archive)
State New, archived
Headers show
Series drm/vc4: hdmi: make CEC adapter name unique | expand

Commit Message

Hans Verkuil Jan. 19, 2023, 9:02 a.m. UTC
The bcm2711 has two HDMI outputs, each with their own CEC adapter.
The CEC adapter name has to be unique, but it is currently
hardcoded to "vc4" for both outputs. Change this to use the card_name
from the variant information in order to make the adapter name unique.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
---
 drivers/gpu/drm/vc4/vc4_hdmi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Maxime Ripard Jan. 20, 2023, 7:13 p.m. UTC | #1
Hi Hans,

On Thu, Jan 19, 2023 at 10:02:19AM +0100, Hans Verkuil wrote:
> The bcm2711 has two HDMI outputs, each with their own CEC adapter.
> The CEC adapter name has to be unique, but it is currently
> hardcoded to "vc4" for both outputs. Change this to use the card_name
> from the variant information in order to make the adapter name unique.
> 
> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>

The patch looks good but should we Cc stable and add a Fixes tag here?

Thanks!
Hans Verkuil Jan. 23, 2023, 8 a.m. UTC | #2
On 20/01/2023 20:13, Maxime Ripard wrote:
> Hi Hans,
> 
> On Thu, Jan 19, 2023 at 10:02:19AM +0100, Hans Verkuil wrote:
>> The bcm2711 has two HDMI outputs, each with their own CEC adapter.
>> The CEC adapter name has to be unique, but it is currently
>> hardcoded to "vc4" for both outputs. Change this to use the card_name
>> from the variant information in order to make the adapter name unique.
>>
>> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> 
> The patch looks good but should we Cc stable and add a Fixes tag here?

Good idea:

Fixes: 15b4511a4af6 ("drm/vc4: add HDMI CEC support")

Regards,

	Hans
Maxime Ripard Jan. 26, 2023, 12:09 p.m. UTC | #3
On Thu, 19 Jan 2023 10:02:19 +0100, Hans Verkuil wrote:
> The bcm2711 has two HDMI outputs, each with their own CEC adapter.
> The CEC adapter name has to be unique, but it is currently
> hardcoded to "vc4" for both outputs. Change this to use the card_name
> from the variant information in order to make the adapter name unique.
> 
> 

Applied to drm/drm-misc (drm-misc-fixes).

Thanks!
Maxime
diff mbox series

Patch

diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
index b39a1ba2c29b..d4c112c03f58 100644
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
@@ -3018,7 +3018,8 @@  static int vc4_hdmi_cec_init(struct vc4_hdmi *vc4_hdmi)
 	}

 	vc4_hdmi->cec_adap = cec_allocate_adapter(&vc4_hdmi_cec_adap_ops,
-						  vc4_hdmi, "vc4",
+						  vc4_hdmi,
+						  vc4_hdmi->variant->card_name,
 						  CEC_CAP_DEFAULTS |
 						  CEC_CAP_CONNECTOR_INFO, 1);
 	ret = PTR_ERR_OR_ZERO(vc4_hdmi->cec_adap);