Skip to contentSkip to conversation

drm/bridge: dw-hdmi: Remove unused hdmi_enable_overflow_interrupts()

PATCH Applied Fabio Estevam 3 participants 4 messages Feb 16, 2018 – Mar 15, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/bridge: dw-hdmi: Remove unused hdmi_enable_overflow_interrupts()

From: Fabio Estevam <[email protected]>

The cable_plugin member never receives an assignment, so it is always false, which causes hdmi_enable_overflow_interrupts() to never be called as per the logic below:

	if (hdmi->cable_plugin && hdmi->sink_is_hdmi)
		hdmi_enable_overflow_interrupts(hdmi);

This has been the case since the driver was originally introduced in commit 9aaf880ed4ee ("imx-drm: Add mx6 hdmi transmitter support").

Remove the cable_plugin element and the hdmi_enable_overflow_interrupts() function that is never called.

---
 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 9 ---------
 1 file changed, 9 deletions(-)
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +0 -9
index a38db40..b0b9570 100644
@@ -147,7 +147,6 @@ struct dw_hdmi {
 	int vic;
 
 	u8 edid[HDMI_EDID_LEN];
-	bool cable_plugin;
 
 	struct {
 		const struct dw_hdmi_phy_ops *ops;
@@ -1658,12 +1657,6 @@ static void dw_hdmi_clear_overflow(struct dw_hdmi *hdmi)
 		hdmi_writeb(hdmi, val, HDMI_FC_INVIDCONF);
 }
 
-static void hdmi_enable_overflow_interrupts(struct dw_hdmi *hdmi)
-{
-	hdmi_writeb(hdmi, 0, HDMI_FC_MASK2);
-	hdmi_writeb(hdmi, 0, HDMI_IH_MUTE_FC_STAT2);
-}
-
 static void hdmi_disable_overflow_interrupts(struct dw_hdmi *hdmi)
 {
 	hdmi_writeb(hdmi, HDMI_IH_MUTE_FC_STAT2_OVERFLOW_MASK,
@@ -1753,8 +1746,6 @@ static int dw_hdmi_setup(struct dw_hdmi *hdmi, struct drm_display_mode *mode)
 	hdmi_tx_hdcp_config(hdmi);
 
 	dw_hdmi_clear_overflow(hdmi);
-	if (hdmi->cable_plugin && hdmi->sink_is_hdmi)
-		hdmi_enable_overflow_interrupts(hdmi);
 
 	return 0;
 }
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
reviewer Tested-by Reviewed-by on v1 1/1
#1 lore raw

Hi Fabio,

Thank you for the patch.

Quoted 9 lines · On Friday, 16 February 2018 22:16:10 EET Fabio Estevam wrote:

From: Fabio Estevam <[email protected]>

The cable_plugin member never receives an assignment, so it is always false, which causes hdmi_enable_overflow_interrupts() to never be called as per the logic below:

	if (hdmi->cable_plugin && hdmi->sink_is_hdmi)
		hdmi_enable_overflow_interrupts(hdmi);
Quoted 7 lines

This has been the case since the driver was originally introduced in commit 9aaf880ed4ee ("imx-drm: Add mx6 hdmi transmitter support").

Remove the cable_plugin element and the hdmi_enable_overflow_interrupts() function that is never called.

Quoted 38 lines
---
 drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 9 ---------
 1 file changed, 9 deletions(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index a38db40..b0b9570 100644

drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +0 -9
@@ -147,7 +147,6 @@ struct dw_hdmi {
 	int vic;
 
 	u8 edid[HDMI_EDID_LEN];
-	bool cable_plugin;
 
 	struct {
 		const struct dw_hdmi_phy_ops *ops;
@@ -1658,12 +1657,6 @@ static void dw_hdmi_clear_overflow(struct dw_hdmi
 *hdmi) hdmi_writeb(hdmi, val, HDMI_FC_INVIDCONF);
 }
 
-static void hdmi_enable_overflow_interrupts(struct dw_hdmi *hdmi)
-{
-	hdmi_writeb(hdmi, 0, HDMI_FC_MASK2);
-	hdmi_writeb(hdmi, 0, HDMI_IH_MUTE_FC_STAT2);
-}
-
 static void hdmi_disable_overflow_interrupts(struct dw_hdmi *hdmi)
 {
 	hdmi_writeb(hdmi, HDMI_IH_MUTE_FC_STAT2_OVERFLOW_MASK,
@@ -1753,8 +1746,6 @@ static int dw_hdmi_setup(struct dw_hdmi *hdmi, struct
 drm_display_mode *mode) hdmi_tx_hdcp_config(hdmi);
 
 	dw_hdmi_clear_overflow(hdmi);
-	if (hdmi->cable_plugin && hdmi->sink_is_hdmi)
-		hdmi_enable_overflow_interrupts(hdmi);
 
 	return 0;
 }
Signature · 8 lines
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw

Hi Laurent,

Quoted 17 lines · Laurent Pinchart

Hi Fabio,

Thank you for the patch.

Quoted 12 lines · On Friday, 16 February 2018 22:16:10 EET Fabio Estevam wrote:

From: Fabio Estevam <[email protected]>

The cable_plugin member never receives an assignment, so it is always false, which causes hdmi_enable_overflow_interrupts() to never be called as per the logic below:

      if (hdmi->cable_plugin && hdmi->sink_is_hdmi)
              hdmi_enable_overflow_interrupts(hdmi);

This has been the case since the driver was originally introduced in commit 9aaf880ed4ee ("imx-drm: Add mx6 hdmi transmitter support").

Quoted 7 lines
Quoted 4 lines

Remove the cable_plugin element and the hdmi_enable_overflow_interrupts() function that is never called.

Are you able to apply this patch or should Archit Taneja handle it?

Thanks
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw
Quoted 21 lines · Fabio Estevam

Hi Laurent,

Quoted 17 lines · Laurent Pinchart

Hi Fabio,

Thank you for the patch.

Quoted 12 lines · On Friday, 16 February 2018 22:16:10 EET Fabio Estevam wrote:

From: Fabio Estevam <[email protected]>

The cable_plugin member never receives an assignment, so it is always false, which causes hdmi_enable_overflow_interrupts() to never be called as per the logic below:

      if (hdmi->cable_plugin && hdmi->sink_is_hdmi)
              hdmi_enable_overflow_interrupts(hdmi);

This has been the case since the driver was originally introduced in commit 9aaf880ed4ee ("imx-drm: Add mx6 hdmi transmitter support").

Quoted 7 lines
Quoted 6 lines
Quoted 4 lines

Remove the cable_plugin element and the hdmi_enable_overflow_interrupts() function that is never called.

Are you able to apply this patch or should Archit Taneja handle it?

Queued to drm-misc-next.

Regards
Andrzej

Quoted 6 lines

Thanks
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel