Skip to contentSkip to conversation

Remove unused code from HDMI RX driver

PATCH New Dmitry Osipenko 1 participant 4 messages Mar 6, 2025

Subsystems (3)
lore
Share & tools
lore

Dmitry Osipenko

author maintainer
#0 lore raw

cover Remove unused code from HDMI RX driver

Hi Hans,

This is a follow up to the v13 HDMI RX patches [1] addressing warning produced by Intel's test robot.

It also removes the unused HDMI CODEC leftovers that we accidentally missed to remove previously and makes minor improvement to the definition of struct snps_hdmirx_dev, all of which I noticed while was looking at the warning report.

Dmitry Osipenko (3):
media: platform: synopsys: hdmirx: Remove duplicated header inclusion
media: platform: synopsys: hdmirx: Remove unused HDMI audio CODEC
relics
media: platform: synopsys: hdmirx: Optimize struct snps_hdmirx_dev

 drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
Signature · 1 line
2.48.1
author maintainer
#1 lore raw

PATCH 1/3 media: platform: synopsys: hdmirx: Remove duplicated header inclusion

Remove second v4l2-common.h header inclusion.

---
 drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c | 1 -
 1 file changed, 1 deletion(-)
drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c +0 -1
index 4ffc86ad6c35..f161fd6712b6 100644
@@ -39,7 +39,6 @@
 #include <media/v4l2-ioctl.h>
 #include <media/videobuf2-dma-contig.h>
 #include <media/videobuf2-v4l2.h>
-#include <media/v4l2-common.h>
 
 #include <sound/hdmi-codec.h>
 
Signature · 1 line
2.48.1
author maintainer
#2 lore raw

PATCH 2/3 media: platform: synopsys: hdmirx: Remove unused HDMI audio CODEC relics

In reply to Dmitry Osipenko

HDMI audio CODEC is unsupported in the current version of the driver. Support may come later. Remove HDMI CODEC bits that were left out by accident to keep code consistent.

---
 drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c +0 -4
index f161fd6712b6..981ab96cda3c 100644
@@ -40,8 +40,6 @@
 #include <media/videobuf2-dma-contig.h>
 #include <media/videobuf2-v4l2.h>
 
-#include <sound/hdmi-codec.h>
-
 #include "snps_hdmirx.h"
 #include "snps_hdmirx_cec.h"
 
@@ -122,7 +120,6 @@ struct hdmirx_stream {
 
 struct snps_hdmirx_dev {
 	struct device *dev;
-	struct device *codec_dev;
 	struct hdmirx_stream stream;
 	struct v4l2_device v4l2_dev;
 	struct v4l2_ctrl_handler hdl;
@@ -158,7 +155,6 @@ struct snps_hdmirx_dev {
 	u32 cur_fmt_fourcc;
 	u32 color_depth;
 	u8 edid[EDID_NUM_BLOCKS_MAX * EDID_BLOCK_SIZE];
-	hdmi_codec_plugged_cb plugged_cb;
 	spinlock_t rst_lock; /* to lock register access */
 };
 
Signature · 1 line
2.48.1
author maintainer
#3 lore raw

PATCH 3/3 media: platform: synopsys: hdmirx: Optimize struct snps_hdmirx_dev

In reply to Dmitry Osipenko

Move cached EDID that takes 512 bytes to the bottom of struct snps_hdmirx_dev to improve CPU's cache locality of the struct.

---
 drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/synopsys/hdmirx/snps_hdmirx.c +1 -1
index 981ab96cda3c..4d42da7255f3 100644
@@ -154,8 +154,8 @@ struct snps_hdmirx_dev {
 	u32 edid_blocks_written;
 	u32 cur_fmt_fourcc;
 	u32 color_depth;
-	u8 edid[EDID_NUM_BLOCKS_MAX * EDID_BLOCK_SIZE];
 	spinlock_t rst_lock; /* to lock register access */
+	u8 edid[EDID_NUM_BLOCKS_MAX * EDID_BLOCK_SIZE];
 };
 
 static const struct v4l2_dv_timings cea640x480 = V4L2_DV_BT_CEA_640X480P59_94;
Signature · 1 line
2.48.1