]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
drm/omap: panels: Don't modify fixed timings
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Wed, 6 Jun 2018 21:17:32 +0000 (00:17 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 3 Sep 2018 13:13:30 +0000 (16:13 +0300)
Panels drivers store their timings in a device data structure field that
is initialized at probe time, either from hardcoded values or from
firmware-supplied values. Those timings are then reported through the
.get_timings() operation to construct the panel display mode.

The panel timings are further modified by the .set_timings() operation,
which is called with the timings retrieved by .get_timings(), and
mangled by .check_timings(). The latter potentially adjusts the pixel
clock only.

Conceptually, modifying the panel timings is wrong, as the timings are
an intrinsic property of the panel and should thus be fixed.
Furthermore, modifying them this way at runtime can result in display
modes reported to userspace varying between calls, which is also wrong.

There's no actual need to store the mangled pixel clock value in the
timings. Don't modify the panel timings in the .set_timings() operation,
just forward it to the previous device in the display pipeline.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/gpu/drm/omapdrm/displays/panel-dpi.c
drivers/gpu/drm/omapdrm/displays/panel-lgphilips-lb035q02.c
drivers/gpu/drm/omapdrm/displays/panel-nec-nl8048hl11.c
drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c
drivers/gpu/drm/omapdrm/displays/panel-sony-acx565akm.c
drivers/gpu/drm/omapdrm/displays/panel-tpo-td028ttec1.c
drivers/gpu/drm/omapdrm/displays/panel-tpo-td043mtea1.c

index e75600a33c3727c40143dd4b09192236291e25d4..95cdfde174aaacd2ed7931368bba644a43cfe7f6 100644 (file)
@@ -96,11 +96,8 @@ static void panel_dpi_disable(struct omap_dss_device *dssdev)
 static void panel_dpi_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);
 }
 
index 3c221f7f0598c4069ace25af3e5863f4a46bc107..4e21de0e010d705d47e5a7ced979012956e6cef9 100644 (file)
@@ -166,11 +166,8 @@ static void lb035q02_disable(struct omap_dss_device *dssdev)
 static void lb035q02_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);
 }
 
index 78ff18c4eb4611fed070897b7ddd04430c582aa3..f6fc7b8e639b82e1621009e9a075023406ea5aed 100644 (file)
@@ -159,11 +159,8 @@ static void nec_8048_disable(struct omap_dss_device *dssdev)
 static void nec_8048_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);
 }
 
index 47e97dbffc0785f2b583739a62e3c377c3f4d83f..51ca92c82e2a6b46783f82cefe014685f6fe76a4 100644 (file)
@@ -129,11 +129,8 @@ static void sharp_ls_disable(struct omap_dss_device *dssdev)
 static void sharp_ls_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);
 }
 
index 1ec3b1e2107cdd5b9fc300166337a14c3ff747a9..974982c46445c7919c8a93eba6a87f66342f8777 100644 (file)
@@ -632,11 +632,8 @@ static void acx565akm_disable(struct omap_dss_device *dssdev)
 static void acx565akm_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);
 }
 
index cff1a1a68827ceb167c476fc5ad12d513b986c6a..ee17eb3e0a489641d1331655ae7a7861a934b62e 100644 (file)
@@ -298,11 +298,8 @@ static void td028ttec1_panel_disable(struct omap_dss_device *dssdev)
 static void td028ttec1_panel_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);
 }
 
index 513e846d52c4f9e523602023d87c96b035798f9e..7b0439274458b2bab7d0505d87ae4e4768df1fec 100644 (file)
@@ -372,11 +372,8 @@ static void tpo_td043_disable(struct omap_dss_device *dssdev)
 static void tpo_td043_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);
 }