From: Peter Ujfalusi <peter.ujfalusi@ti.com> To: <tomi.valkeinen@ti.com>, <thierry.reding@gmail.com>, <airlied@linux.ie> Cc: <daniel.vetter@ffwll.ch>, <dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org> Subject: [PATCH v2 17/23] drm/omap: Change the types of struct omap_video_timings members Date: Thu, 22 Sep 2016 14:07:02 +0300 [thread overview] Message-ID: <20160922110708.31242-18-peter.ujfalusi@ti.com> (raw) In-Reply-To: <20160922110708.31242-1-peter.ujfalusi@ti.com> omap_video_timings struct have the same members as struct videomode, but their types are different. As first step change the types of the omap_video_timings struct members to match their counterpart in struct videomode to catch any type cast related issues. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> --- drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 2 +- drivers/gpu/drm/omapdrm/dss/dispc.c | 5 +++-- drivers/gpu/drm/omapdrm/dss/dpi.c | 2 +- drivers/gpu/drm/omapdrm/dss/omapdss.h | 18 +++++++++--------- drivers/gpu/drm/omapdrm/dss/sdi.c | 2 +- 5 files changed, 15 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c index 1493671c6e2f..94e897d90172 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c @@ -1024,7 +1024,7 @@ static int dsicm_memory_read(struct omap_dss_device *dssdev, goto err1; } - size = min(w * h * 3, + size = min((u32)w * h * 3, dssdev->panel.timings.hactive * dssdev->panel.timings.vactive * 3); diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c index 4a4cd743fe2f..498838e74d08 100644 --- a/drivers/gpu/drm/omapdrm/dss/dispc.c +++ b/drivers/gpu/drm/omapdrm/dss/dispc.c @@ -2870,7 +2870,8 @@ int dispc_wb_setup(const struct omap_dss_writeback_info *wi, int wbdelay; wbdelay = min(mgr_timings->vfront_porch + - mgr_timings->vsync_len + mgr_timings->vback_porch, 255); + mgr_timings->vsync_len + mgr_timings->vback_porch, + (u32)255); /* WBDELAYCOUNT */ REG_FLD_MOD(DISPC_OVL_ATTRIBUTES2(plane), wbdelay, 7, 0); @@ -3242,7 +3243,7 @@ void dispc_mgr_set_timings(enum omap_channel channel, ht = timings->pixelclock / xtot; vt = timings->pixelclock / xtot / ytot; - DSSDBG("pck %u\n", timings->pixelclock); + DSSDBG("pck %lu\n", timings->pixelclock); DSSDBG("hsync_len %d hfp %d hbp %d vsw %d vfp %d vbp %d\n", t.hsync_len, t.hfront_porch, t.hback_porch, t.vsync_len, t.vfront_porch, t.vback_porch); diff --git a/drivers/gpu/drm/omapdrm/dss/dpi.c b/drivers/gpu/drm/omapdrm/dss/dpi.c index d653f492cbfd..8fb40efa65af 100644 --- a/drivers/gpu/drm/omapdrm/dss/dpi.c +++ b/drivers/gpu/drm/omapdrm/dss/dpi.c @@ -351,7 +351,7 @@ static int dpi_set_mode(struct dpi_data *dpi) pck = fck / lck_div / pck_div; if (pck != t->pixelclock) { - DSSWARN("Could not find exact pixel clock. Requested %d Hz, got %lu Hz\n", + DSSWARN("Could not find exact pixel clock. Requested %lu Hz, got %lu Hz\n", t->pixelclock, pck); t->pixelclock = pck; diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h index 84d34242d5a4..bd38da3af01f 100644 --- a/drivers/gpu/drm/omapdrm/dss/omapdss.h +++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h @@ -301,23 +301,23 @@ struct omap_dss_dsi_config { struct omap_video_timings { /* Unit: pixels */ - u16 hactive; + u32 hactive; /* Unit: pixels */ - u16 vactive; + u32 vactive; /* Unit: Hz */ - u32 pixelclock; + unsigned long pixelclock; /* Unit: pixel clocks */ - u16 hsync_len; /* Horizontal synchronization pulse width */ + u32 hsync_len; /* Horizontal synchronization pulse width */ /* Unit: pixel clocks */ - u16 hfront_porch; /* Horizontal front porch */ + u32 hfront_porch; /* Horizontal front porch */ /* Unit: pixel clocks */ - u16 hback_porch; /* Horizontal back porch */ + u32 hback_porch; /* Horizontal back porch */ /* Unit: line clocks */ - u16 vsync_len; /* Vertical synchronization pulse width */ + u32 vsync_len; /* Vertical synchronization pulse width */ /* Unit: line clocks */ - u16 vfront_porch; /* Vertical front porch */ + u32 vfront_porch; /* Vertical front porch */ /* Unit: line clocks */ - u16 vback_porch; /* Vertical back porch */ + u32 vback_porch; /* Vertical back porch */ enum display_flags flags; }; diff --git a/drivers/gpu/drm/omapdrm/dss/sdi.c b/drivers/gpu/drm/omapdrm/dss/sdi.c index 3b076329a3ac..c8658f97ab7d 100644 --- a/drivers/gpu/drm/omapdrm/dss/sdi.c +++ b/drivers/gpu/drm/omapdrm/dss/sdi.c @@ -162,7 +162,7 @@ static int sdi_display_enable(struct omap_dss_device *dssdev) pck = fck / dispc_cinfo.lck_div / dispc_cinfo.pck_div; if (pck != t->pixelclock) { - DSSWARN("Could not find exact pixel clock. Requested %d Hz, got %lu Hz\n", + DSSWARN("Could not find exact pixel clock. Requested %lu Hz, got %lu Hz\n", t->pixelclock, pck); t->pixelclock = pck; -- 2.10.0
WARNING: multiple messages have this Message-ID (diff)
From: Peter Ujfalusi <peter.ujfalusi@ti.com> To: tomi.valkeinen@ti.com, thierry.reding@gmail.com, airlied@linux.ie Cc: daniel.vetter@ffwll.ch, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 17/23] drm/omap: Change the types of struct omap_video_timings members Date: Thu, 22 Sep 2016 14:07:02 +0300 [thread overview] Message-ID: <20160922110708.31242-18-peter.ujfalusi@ti.com> (raw) In-Reply-To: <20160922110708.31242-1-peter.ujfalusi@ti.com> omap_video_timings struct have the same members as struct videomode, but their types are different. As first step change the types of the omap_video_timings struct members to match their counterpart in struct videomode to catch any type cast related issues. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> --- drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 2 +- drivers/gpu/drm/omapdrm/dss/dispc.c | 5 +++-- drivers/gpu/drm/omapdrm/dss/dpi.c | 2 +- drivers/gpu/drm/omapdrm/dss/omapdss.h | 18 +++++++++--------- drivers/gpu/drm/omapdrm/dss/sdi.c | 2 +- 5 files changed, 15 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c index 1493671c6e2f..94e897d90172 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c @@ -1024,7 +1024,7 @@ static int dsicm_memory_read(struct omap_dss_device *dssdev, goto err1; } - size = min(w * h * 3, + size = min((u32)w * h * 3, dssdev->panel.timings.hactive * dssdev->panel.timings.vactive * 3); diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c index 4a4cd743fe2f..498838e74d08 100644 --- a/drivers/gpu/drm/omapdrm/dss/dispc.c +++ b/drivers/gpu/drm/omapdrm/dss/dispc.c @@ -2870,7 +2870,8 @@ int dispc_wb_setup(const struct omap_dss_writeback_info *wi, int wbdelay; wbdelay = min(mgr_timings->vfront_porch + - mgr_timings->vsync_len + mgr_timings->vback_porch, 255); + mgr_timings->vsync_len + mgr_timings->vback_porch, + (u32)255); /* WBDELAYCOUNT */ REG_FLD_MOD(DISPC_OVL_ATTRIBUTES2(plane), wbdelay, 7, 0); @@ -3242,7 +3243,7 @@ void dispc_mgr_set_timings(enum omap_channel channel, ht = timings->pixelclock / xtot; vt = timings->pixelclock / xtot / ytot; - DSSDBG("pck %u\n", timings->pixelclock); + DSSDBG("pck %lu\n", timings->pixelclock); DSSDBG("hsync_len %d hfp %d hbp %d vsw %d vfp %d vbp %d\n", t.hsync_len, t.hfront_porch, t.hback_porch, t.vsync_len, t.vfront_porch, t.vback_porch); diff --git a/drivers/gpu/drm/omapdrm/dss/dpi.c b/drivers/gpu/drm/omapdrm/dss/dpi.c index d653f492cbfd..8fb40efa65af 100644 --- a/drivers/gpu/drm/omapdrm/dss/dpi.c +++ b/drivers/gpu/drm/omapdrm/dss/dpi.c @@ -351,7 +351,7 @@ static int dpi_set_mode(struct dpi_data *dpi) pck = fck / lck_div / pck_div; if (pck != t->pixelclock) { - DSSWARN("Could not find exact pixel clock. Requested %d Hz, got %lu Hz\n", + DSSWARN("Could not find exact pixel clock. Requested %lu Hz, got %lu Hz\n", t->pixelclock, pck); t->pixelclock = pck; diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h index 84d34242d5a4..bd38da3af01f 100644 --- a/drivers/gpu/drm/omapdrm/dss/omapdss.h +++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h @@ -301,23 +301,23 @@ struct omap_dss_dsi_config { struct omap_video_timings { /* Unit: pixels */ - u16 hactive; + u32 hactive; /* Unit: pixels */ - u16 vactive; + u32 vactive; /* Unit: Hz */ - u32 pixelclock; + unsigned long pixelclock; /* Unit: pixel clocks */ - u16 hsync_len; /* Horizontal synchronization pulse width */ + u32 hsync_len; /* Horizontal synchronization pulse width */ /* Unit: pixel clocks */ - u16 hfront_porch; /* Horizontal front porch */ + u32 hfront_porch; /* Horizontal front porch */ /* Unit: pixel clocks */ - u16 hback_porch; /* Horizontal back porch */ + u32 hback_porch; /* Horizontal back porch */ /* Unit: line clocks */ - u16 vsync_len; /* Vertical synchronization pulse width */ + u32 vsync_len; /* Vertical synchronization pulse width */ /* Unit: line clocks */ - u16 vfront_porch; /* Vertical front porch */ + u32 vfront_porch; /* Vertical front porch */ /* Unit: line clocks */ - u16 vback_porch; /* Vertical back porch */ + u32 vback_porch; /* Vertical back porch */ enum display_flags flags; }; diff --git a/drivers/gpu/drm/omapdrm/dss/sdi.c b/drivers/gpu/drm/omapdrm/dss/sdi.c index 3b076329a3ac..c8658f97ab7d 100644 --- a/drivers/gpu/drm/omapdrm/dss/sdi.c +++ b/drivers/gpu/drm/omapdrm/dss/sdi.c @@ -162,7 +162,7 @@ static int sdi_display_enable(struct omap_dss_device *dssdev) pck = fck / dispc_cinfo.lck_div / dispc_cinfo.pck_div; if (pck != t->pixelclock) { - DSSWARN("Could not find exact pixel clock. Requested %d Hz, got %lu Hz\n", + DSSWARN("Could not find exact pixel clock. Requested %lu Hz, got %lu Hz\n", t->pixelclock, pck); t->pixelclock = pck; -- 2.10.0
next prev parent reply other threads:[~2016-09-22 11:07 UTC|newest] Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-09-22 11:06 [PATCH v2 00/23] drm/omap: Convert to use videomode from omap_video_timings Peter Ujfalusi 2016-09-22 11:06 ` Peter Ujfalusi 2016-09-22 11:06 ` [PATCH v2 01/23] drm/omap: omap_display_timings: rename x_res to hactive Peter Ujfalusi 2016-09-22 11:06 ` Peter Ujfalusi 2016-09-22 11:06 ` [PATCH v2 02/23] drm/omap: omap_display_timings: rename y_res to vactive Peter Ujfalusi 2016-09-22 11:06 ` Peter Ujfalusi 2016-09-22 11:06 ` [PATCH v2 03/23] drm/omap: omap_display_timings: rename hsw to hsync_len Peter Ujfalusi 2016-09-22 11:06 ` Peter Ujfalusi 2016-09-22 11:06 ` [PATCH v2 04/23] drm/omap: omap_display_timings: rename hfp to hfront_porch Peter Ujfalusi 2016-09-22 11:06 ` Peter Ujfalusi 2016-09-22 11:06 ` [PATCH v2 05/23] drm/omap: omap_display_timings: rename hbp to hback_porch Peter Ujfalusi 2016-09-22 11:06 ` Peter Ujfalusi 2016-09-22 11:06 ` [PATCH v2 06/23] drm/omap: omap_display_timings: rename vsw to vsync_len Peter Ujfalusi 2016-09-22 11:06 ` Peter Ujfalusi 2016-09-22 11:06 ` [PATCH v2 07/23] drm/omap: omap_display_timings: rename vfp to vfront_porch Peter Ujfalusi 2016-09-22 11:06 ` Peter Ujfalusi 2016-09-22 11:06 ` [PATCH v2 08/23] drm/omap: omap_display_timings: rename vbp to vback_porch Peter Ujfalusi 2016-09-22 11:06 ` Peter Ujfalusi 2016-09-22 11:06 ` [PATCH v2 09/23] drm/omap: HDMI5: Use pointer to cfg->v_fc_config.timings in hdmi_core_video_config Peter Ujfalusi 2016-09-22 11:06 ` Peter Ujfalusi 2016-09-22 11:06 ` [PATCH v2 10/23] drm/omap: omap_display_timings: Use display_flags for interlace mode Peter Ujfalusi 2016-09-22 11:06 ` Peter Ujfalusi 2016-09-22 11:06 ` [PATCH v2 11/23] drm/omap: dispc: Simplify _dispc_mgr_set_lcd_timings() parameters Peter Ujfalusi 2016-09-22 11:06 ` Peter Ujfalusi 2016-09-22 11:06 ` [PATCH v2 12/23] drm/omap: omap_display_timings: Use display_flags for h/vsync level Peter Ujfalusi 2016-09-22 11:06 ` Peter Ujfalusi 2016-09-22 11:06 ` [PATCH v2 13/23] drm/omap: omap_display_timings: Use display_flags for DE level Peter Ujfalusi 2016-09-22 11:06 ` Peter Ujfalusi 2016-09-22 11:06 ` [PATCH v2 14/23] drm/omap: omap_display_timings: Use display_flags for double_pixel mode Peter Ujfalusi 2016-09-22 11:06 ` Peter Ujfalusi 2016-09-22 11:07 ` [PATCH v2 15/23] drm/omap: omap_display_timings: Use display_flags for pixel data edge Peter Ujfalusi 2016-09-22 11:07 ` Peter Ujfalusi 2016-09-22 11:07 ` [PATCH v2 16/23] drm/omap: omap_display_timings: Use display_flags for sync edge Peter Ujfalusi 2016-09-22 11:07 ` Peter Ujfalusi 2016-09-22 11:07 ` Peter Ujfalusi [this message] 2016-09-22 11:07 ` [PATCH v2 17/23] drm/omap: Change the types of struct omap_video_timings members Peter Ujfalusi 2016-09-22 11:07 ` [PATCH v2 18/23] drm/omap: Replace struct omap_video_timings with videomode Peter Ujfalusi 2016-09-22 11:07 ` Peter Ujfalusi 2016-09-22 11:07 ` [PATCH v2 19/23] drm/omap: Use consistent name for struct videomode Peter Ujfalusi 2016-09-22 11:07 ` Peter Ujfalusi 2016-09-22 11:07 ` [PATCH v2 20/23] drm/omap: panel-tpo-td043mtea1: Add note for incorrect sync drive edge Peter Ujfalusi 2016-09-22 11:07 ` Peter Ujfalusi 2016-09-22 11:07 ` [PATCH v2 21/23] drm/omap: panel-tpo-td028ttec1: " Peter Ujfalusi 2016-09-22 11:07 ` Peter Ujfalusi 2016-09-22 11:07 ` [PATCH v2 22/23] drm/omap: panel-sharp-ls037v7dw01: Add note for incorrect data " Peter Ujfalusi 2016-09-22 11:07 ` Peter Ujfalusi 2016-09-22 11:07 ` [PATCH v2 23/23] drm/omap: panel-lgphilips-lb035q02: Add note for incorrect data drive edge and DE level Peter Ujfalusi 2016-09-22 11:07 ` Peter Ujfalusi 2016-09-29 11:34 ` [PATCH v2 00/23] drm/omap: Convert to use videomode from omap_video_timings Tomi Valkeinen 2016-09-29 11:34 ` Tomi Valkeinen
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20160922110708.31242-18-peter.ujfalusi@ti.com \ --to=peter.ujfalusi@ti.com \ --cc=airlied@linux.ie \ --cc=daniel.vetter@ffwll.ch \ --cc=dri-devel@lists.freedesktop.org \ --cc=linux-kernel@vger.kernel.org \ --cc=thierry.reding@gmail.com \ --cc=tomi.valkeinen@ti.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.