From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>,
Seung-Woo Kim <sw0312.kim@samsung.com>,
Philippe Cornu <philippe.cornu@st.com>,
dri-devel@lists.freedesktop.org,
Yannick Fertre <yannick.fertre@st.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Vincent Abriou <vincent.abriou@st.com>
Subject: Re: [PATCH] drm: bridge: Constify mode arguments to bridge .mode_set() operation
Date: Mon, 09 Apr 2018 12:43:07 +0300 [thread overview]
Message-ID: <2616271.lifhvuV7PI@avalon> (raw)
In-Reply-To: <20180409091828.GV31310@phenom.ffwll.local>
Hi Daniel,
On Monday, 9 April 2018 12:18:28 EEST Daniel Vetter wrote:
> On Mon, Apr 09, 2018 at 11:56:55AM +0300, Laurent Pinchart wrote:
> > On Monday, 9 April 2018 11:53:07 EEST Daniel Vetter wrote:
> >> On Fri, Apr 06, 2018 at 07:23:57PM +0300, Laurent Pinchart wrote:
> >>> The mode and ajusted_mode passed to the bridge .mode_set() operation
> >>> should never be modified by the bridge (and are not in any of the
> >>> existing bridge drivers). Make them const to make this clear.
> >>>
> >>> Signed-off-by: Laurent Pinchart
> >> > <laurent.pinchart+renesas@ideasonboard.com>
> >>
> >> Why should the adjusted_mode not be modified?
> >
> > Why should it ? .mode_set() performs a mode set, mode adjustment should be
> > performed in .mode_fixup().
>
> Oh right, totally missed that you're only touching the ->mode_set
> callbacks. Assuming gcc is happy (not going to check for that, too lazy):
>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
I've compile-tested this patch for all the drivers it touches and gcc didn't
complain. I'll give 0day a few days to give it a go too, just in case.
> >>> ---
> >>>
> >>> drivers/gpu/drm/bridge/adv7511/adv7511.h | 4 ++--
> >>> drivers/gpu/drm/bridge/adv7511/adv7511_drv.c | 8 ++++----
> >>> drivers/gpu/drm/bridge/adv7511/adv7533.c | 2 +-
> >>> drivers/gpu/drm/bridge/analogix-anx78xx.c | 4 ++--
> >>> drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 4 ++--
> >>> drivers/gpu/drm/bridge/sii902x.c | 4 ++--
> >>> drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 4 ++--
> >>> drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 16 ++++++++-------
> >>> drivers/gpu/drm/bridge/tc358767.c | 9 +++++----
> >>> drivers/gpu/drm/drm_bridge.c | 4 ++--
> >>> drivers/gpu/drm/exynos/exynos_drm_mic.c | 4 ++--
> >>> drivers/gpu/drm/mediatek/mtk_hdmi.c | 4 ++--
> >>> drivers/gpu/drm/msm/dsi/dsi.h | 2 +-
> >>> drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +-
> >>> drivers/gpu/drm/msm/dsi/dsi_manager.c | 4 ++--
> >>> drivers/gpu/drm/msm/edp/edp_bridge.c | 4 ++--
> >>> drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 4 ++--
> >>> drivers/gpu/drm/rcar-du/rcar_lvds.c | 4 ++--
> >>> drivers/gpu/drm/sti/sti_dvo.c | 4 ++--
> >>> drivers/gpu/drm/sti/sti_hda.c | 4 ++--
> >>> drivers/gpu/drm/sti/sti_hdmi.c | 4 ++--
> >>> drivers/gpu/drm/stm/dw_mipi_dsi-stm.c | 2 +-
> >>> include/drm/bridge/dw_mipi_dsi.h | 3 ++-
> >>> include/drm/drm_bridge.h | 8 ++++----
> >>> 24 files changed, 57 insertions(+), 55 deletions(-)
> >>>
> >>> Philippe,
> >>>
> >>> I wrote this patch while reviewing your adjusted_mode documentation. I
> >>> initially wanted to document the fact that the adjusted_mode argument
> >>> to the bridge .mode_set() operation should not be modified by the
> >>> bridge, and then realized that constifying it would be a better way to
> >>> express that. I thus wouldn't mind if you took that patch in your tree
> >>> and pushed it with the documentation patch once we get the necessary
> >>> acks :-)
--
Regards,
Laurent Pinchart
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2018-04-09 9:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-06 16:23 [PATCH] drm: bridge: Constify mode arguments to bridge .mode_set() operation Laurent Pinchart
2018-04-09 8:53 ` Daniel Vetter
2018-04-09 8:56 ` Laurent Pinchart
2018-04-09 9:18 ` Daniel Vetter
2018-04-09 9:43 ` Laurent Pinchart [this message]
2018-04-13 15:55 ` Daniel Vetter
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=2616271.lifhvuV7PI@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=kyungmin.park@samsung.com \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=philippe.cornu@st.com \
--cc=sw0312.kim@samsung.com \
--cc=vincent.abriou@st.com \
--cc=yannick.fertre@st.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: link
Be 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.