From: Sean Paul <seanpaul@chromium.org>
To: Chris Zhong <zyw@rock-chips.com>
Cc: dianders@chromium.org, tfiga@chromium.org, heiko@sntech.de,
yzq@rock-chips.com, mark.rutland@arm.com,
devicetree@vger.kernel.org, robh+dt@kernel.org,
galak@codeaurora.org, pawel.moll@arm.com,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v3 3/5] drm/rockchip/dsi: remove mode_valid function
Date: Mon, 23 Jan 2017 12:48:41 -0500 [thread overview]
Message-ID: <20170123174841.GB25789@trickycodes.roam.corp.google.com> (raw)
In-Reply-To: <1484907051-7159-4-git-send-email-zyw@rock-chips.com>
On Fri, Jan 20, 2017 at 06:10:49PM +0800, Chris Zhong wrote:
> The MIPI DSI do not need check the validity of resolution, the max
> resolution should depend VOP. Hence, remove rk3288_mipi_dsi_mode_valid
> here.
Does vop actually enforce this, though? I see that mode_config.max_width is
4096, but there is no bounds checking in mode_fixup().
The connector is currently rejecting everything greater than 2047. So I think
you're going to regress behavior here.
Sean
>
> Signed-off-by: Chris Zhong <zyw@rock-chips.com>
> ---
>
> Changes in v3: None
>
> drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 39 ----------------------------------
> 1 file changed, 39 deletions(-)
>
> diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
> index a93ce97..6f0e252 100644
> --- a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
> +++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
> @@ -278,8 +278,6 @@ struct dw_mipi_dsi_plat_data {
> u32 grf_dsi0_mode;
> u32 grf_dsi0_mode_reg;
> unsigned int max_data_lanes;
> - enum drm_mode_status (*mode_valid)(struct drm_connector *connector,
> - struct drm_display_mode *mode);
> };
>
> struct dw_mipi_dsi {
> @@ -1081,23 +1079,8 @@ static int dw_mipi_dsi_connector_get_modes(struct drm_connector *connector)
> return drm_panel_get_modes(dsi->panel);
> }
>
> -static enum drm_mode_status dw_mipi_dsi_mode_valid(
> - struct drm_connector *connector,
> - struct drm_display_mode *mode)
> -{
> - struct dw_mipi_dsi *dsi = con_to_dsi(connector);
> -
> - enum drm_mode_status mode_status = MODE_OK;
> -
> - if (dsi->pdata->mode_valid)
> - mode_status = dsi->pdata->mode_valid(connector, mode);
> -
> - return mode_status;
> -}
> -
> static struct drm_connector_helper_funcs dw_mipi_dsi_connector_helper_funcs = {
> .get_modes = dw_mipi_dsi_connector_get_modes,
> - .mode_valid = dw_mipi_dsi_mode_valid,
> };
>
> static void dw_mipi_dsi_drm_connector_destroy(struct drm_connector *connector)
> @@ -1168,33 +1151,11 @@ static int rockchip_mipi_parse_dt(struct dw_mipi_dsi *dsi)
> return 0;
> }
>
> -static enum drm_mode_status rk3288_mipi_dsi_mode_valid(
> - struct drm_connector *connector,
> - struct drm_display_mode *mode)
> -{
> - /*
> - * The VID_PKT_SIZE field in the DSI_VID_PKT_CFG
> - * register is 11-bit.
> - */
> - if (mode->hdisplay > 0x7ff)
> - return MODE_BAD_HVALUE;
> -
> - /*
> - * The V_ACTIVE_LINES field in the DSI_VTIMING_CFG
> - * register is 11-bit.
> - */
> - if (mode->vdisplay > 0x7ff)
> - return MODE_BAD_VVALUE;
> -
> - return MODE_OK;
> -}
> -
> static struct dw_mipi_dsi_plat_data rk3288_mipi_dsi_drv_data = {
> .dsi0_en_bit = RK3288_DSI0_SEL_VOP_LIT,
> .dsi1_en_bit = RK3288_DSI1_SEL_VOP_LIT,
> .grf_switch_reg = RK3288_GRF_SOC_CON6,
> .max_data_lanes = 4,
> - .mode_valid = rk3288_mipi_dsi_mode_valid,
> };
>
> static struct dw_mipi_dsi_plat_data rk3399_mipi_dsi_drv_data = {
> --
> 2.6.3
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Sean Paul, Software Engineer, Google / Chromium OS
next prev parent reply other threads:[~2017-01-23 17:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-20 10:10 [PATCH v3 0/5] Rockchip dw-mipi-dsi driver Chris Zhong
2017-01-20 10:10 ` [PATCH v3 1/5] dt-bindings: add rk3399 support for dw-mipi-rockchip Chris Zhong
2017-01-20 10:10 ` [PATCH v3 2/5] drm/rockchip/dsi: dw-mipi: support RK3399 mipi dsi Chris Zhong
[not found] ` <1484907051-7159-3-git-send-email-zyw-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2017-01-23 17:30 ` Sean Paul
2017-01-20 10:10 ` [PATCH v3 3/5] drm/rockchip/dsi: remove mode_valid function Chris Zhong
2017-01-23 17:48 ` Sean Paul [this message]
2017-01-24 2:27 ` Chris Zhong
2017-02-01 18:12 ` Sean Paul
2017-02-05 3:42 ` Chris Zhong
2017-02-05 7:42 ` Mark yao
2017-01-20 10:10 ` [PATCH v3 4/5] dt-bindings: add power domain node for dw-mipi-rockchip Chris Zhong
2017-01-20 10:10 ` [PATCH v3 5/5] drm/rockchip/dsi: add dw-mipi power domain support Chris Zhong
2017-01-23 18:03 ` Sean Paul
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=20170123174841.GB25789@trickycodes.roam.corp.google.com \
--to=seanpaul@chromium.org \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=galak@codeaurora.org \
--cc=heiko@sntech.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=tfiga@chromium.org \
--cc=yzq@rock-chips.com \
--cc=zyw@rock-chips.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).