[PATCH v2 07/22] drm/omap: Don't store video mode internally for external encoders

Laurent Pinchart laurent.pinchart at ideasonboard.com
Mon Aug 6 20:36:47 UTC 2018


The omap_dss_device .set_timings() operation for external encoders
stores the video mode in the device data structure. That mode is then
never used again. Drop it.

Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel at collabora.co.uk>
---
 drivers/gpu/drm/omapdrm/displays/encoder-opa362.c    | 5 -----
 drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c    | 5 -----
 drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c | 5 -----
 3 files changed, 15 deletions(-)

diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
index 824f302a515b..05d128600712 100644
--- a/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
+++ b/drivers/gpu/drm/omapdrm/displays/encoder-opa362.c
@@ -25,8 +25,6 @@ struct panel_drv_data {
 	struct omap_dss_device dssdev;
 
 	struct gpio_desc *enable_gpio;
-
-	struct videomode vm;
 };
 
 #define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev)
@@ -90,13 +88,10 @@ static void opa362_disable(struct omap_dss_device *dssdev)
 static void opa362_set_timings(struct omap_dss_device *dssdev,
 			       const struct videomode *vm)
 {
-	struct panel_drv_data *ddata = to_panel_data(dssdev);
 	struct omap_dss_device *src = dssdev->src;
 
 	dev_dbg(dssdev->dev, "set_timings\n");
 
-	ddata->vm = *vm;
-
 	src->ops->set_timings(src, vm);
 }
 
diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c b/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c
index de4233980898..86c90c15681e 100644
--- a/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c
+++ b/drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c
@@ -20,8 +20,6 @@ struct panel_drv_data {
 	struct omap_dss_device dssdev;
 
 	struct gpio_desc *pd_gpio;
-
-	struct videomode vm;
 };
 
 #define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev)
@@ -87,11 +85,8 @@ static void tfp410_fix_timings(struct videomode *vm)
 static void tfp410_set_timings(struct omap_dss_device *dssdev,
 			       const struct videomode *vm)
 {
-	struct panel_drv_data *ddata = to_panel_data(dssdev);
 	struct omap_dss_device *src = dssdev->src;
 
-	ddata->vm = *vm;
-
 	src->ops->set_timings(src, vm);
 }
 
diff --git a/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c b/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c
index d9a590244eaa..1e24559e0aa1 100644
--- a/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c
+++ b/drivers/gpu/drm/omapdrm/displays/encoder-tpd12s015.c
@@ -28,8 +28,6 @@ struct panel_drv_data {
 	struct gpio_desc *ct_cp_hpd_gpio;
 	struct gpio_desc *ls_oe_gpio;
 	struct gpio_desc *hpd_gpio;
-
-	struct videomode vm;
 };
 
 #define to_panel_data(x) container_of(x, struct panel_drv_data, dssdev)
@@ -96,11 +94,8 @@ static void tpd_disable(struct omap_dss_device *dssdev)
 static void tpd_set_timings(struct omap_dss_device *dssdev,
 			    const struct videomode *vm)
 {
-	struct panel_drv_data *ddata = to_panel_data(dssdev);
 	struct omap_dss_device *src = dssdev->src;
 
-	ddata->vm = *vm;
-
 	src->ops->set_timings(src, vm);
 }
 
-- 
Regards,

Laurent Pinchart



More information about the dri-devel mailing list