From: Neil Armstrong <neil.armstrong@linaro.org>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
Vinod Koul <vkoul@kernel.org>,
Andrzej Hajda <andrzej.hajda@intel.com>,
Robert Foss <robert.foss@linaro.org>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Jonas Karlman <jonas@kwiboo.se>,
Jernej Skrabec <jernej.skrabec@gmail.com>
Cc: David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org,
linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH v2 12/13] drm/bridge: lt9611: stop filtering modes via the table
Date: Wed, 11 Jan 2023 11:57:56 +0100 [thread overview]
Message-ID: <c03235b1-85d1-1e55-b8c2-9a553887145f@linaro.org> (raw)
In-Reply-To: <20230108165656.136871-13-dmitry.baryshkov@linaro.org>
On 08/01/2023 17:56, Dmitry Baryshkov wrote:
> The lt9611 bridge can support different modes, it makes no sense to list
> them in the table. Drop the table and check the number of interfaces
> using the fixed value.
>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
> drivers/gpu/drm/bridge/lontium-lt9611.c | 41 +++----------------------
> 1 file changed, 4 insertions(+), 37 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/lontium-lt9611.c b/drivers/gpu/drm/bridge/lontium-lt9611.c
> index 82af1f954cc6..df9f015aa3a0 100644
> --- a/drivers/gpu/drm/bridge/lontium-lt9611.c
> +++ b/drivers/gpu/drm/bridge/lontium-lt9611.c
> @@ -84,24 +84,6 @@ static const struct regmap_config lt9611_regmap_config = {
> .num_ranges = ARRAY_SIZE(lt9611_ranges),
> };
>
> -struct lt9611_mode {
> - u16 hdisplay;
> - u16 vdisplay;
> - u8 vrefresh;
> - u8 lanes;
> - u8 intfs;
> -};
> -
> -static struct lt9611_mode lt9611_modes[] = {
> - { 3840, 2160, 30, 4, 2 }, /* 3840x2160 24bit 30Hz 4Lane 2ports */
> - { 1920, 1080, 60, 4, 1 }, /* 1080P 24bit 60Hz 4lane 1port */
> - { 1920, 1080, 30, 3, 1 }, /* 1080P 24bit 30Hz 3lane 1port */
> - { 1920, 1080, 24, 3, 1 },
> - { 720, 480, 60, 4, 1 },
> - { 720, 576, 50, 2, 1 },
> - { 640, 480, 60, 2, 1 },
> -};
> -
> static struct lt9611 *bridge_to_lt9611(struct drm_bridge *bridge)
> {
> return container_of(bridge, struct lt9611, bridge);
> @@ -603,21 +585,6 @@ static int lt9611_regulator_enable(struct lt9611 *lt9611)
> return 0;
> }
>
> -static struct lt9611_mode *lt9611_find_mode(const struct drm_display_mode *mode)
> -{
> - int i;
> -
> - for (i = 0; i < ARRAY_SIZE(lt9611_modes); i++) {
> - if (lt9611_modes[i].hdisplay == mode->hdisplay &&
> - lt9611_modes[i].vdisplay == mode->vdisplay &&
> - lt9611_modes[i].vrefresh == drm_mode_vrefresh(mode)) {
> - return <9611_modes[i];
> - }
> - }
> -
> - return NULL;
> -}
> -
> static enum drm_connector_status lt9611_bridge_detect(struct drm_bridge *bridge)
> {
> struct lt9611 *lt9611 = bridge_to_lt9611(bridge);
> @@ -832,12 +799,12 @@ static enum drm_mode_status lt9611_bridge_mode_valid(struct drm_bridge *bridge,
> const struct drm_display_info *info,
> const struct drm_display_mode *mode)
> {
> - struct lt9611_mode *lt9611_mode = lt9611_find_mode(mode);
> struct lt9611 *lt9611 = bridge_to_lt9611(bridge);
>
> - if (!lt9611_mode)
> - return MODE_BAD;
> - else if (lt9611_mode->intfs > 1 && !lt9611->dsi1)
> + if (mode->hdisplay >= 3840 && drm_mode_vrefresh(mode) >= 31)
Isn't 31 a typo ?
> + return MODE_CLOCK_HIGH;
> +
> + if (mode->hdisplay > 2000 && !lt9611->dsi1_node)
> return MODE_PANEL;
> else
> return MODE_OK;
next prev parent reply other threads:[~2023-01-11 10:59 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-08 16:56 [PATCH v2 00/13] drm/bridge: lt9611: several fixes and improvements Dmitry Baryshkov
2023-01-08 16:56 ` [PATCH v2 01/13] drm/bridge: lt9611: fix sleep mode setup Dmitry Baryshkov
2023-01-12 9:24 ` Neil Armstrong
2023-01-08 16:56 ` [PATCH v2 02/13] drm/bridge: lt9611: fix HPD reenablement Dmitry Baryshkov
2023-01-12 9:24 ` Neil Armstrong
2023-01-08 16:56 ` [PATCH v2 03/13] drm/bridge: lt9611: fix polarity programming Dmitry Baryshkov
2023-01-12 9:26 ` Neil Armstrong
2023-01-08 16:56 ` [PATCH v2 04/13] drm/bridge: lt9611: fix programming of video modes Dmitry Baryshkov
2023-01-12 9:27 ` Neil Armstrong
2023-01-08 16:56 ` [PATCH v2 05/13] drm/bridge: lt9611: fix clock calculation Dmitry Baryshkov
2023-01-12 9:28 ` Neil Armstrong
2023-01-08 16:56 ` [PATCH v2 06/13] drm/bridge: lt9611: pass a pointer to the of node Dmitry Baryshkov
2023-01-12 9:28 ` Neil Armstrong
2023-01-08 16:56 ` [PATCH v2 07/13] drm/bridge: lt9611: rework the mode_set function Dmitry Baryshkov
2023-01-11 10:53 ` Neil Armstrong
2023-01-08 16:56 ` [PATCH v2 08/13] drm/bridge: lt9611: attach to the next bridge Dmitry Baryshkov
2023-01-11 10:56 ` Neil Armstrong
2023-01-08 16:56 ` [PATCH v2 09/13] drm/bridge: lt9611: fix sync polarity for DVI output Dmitry Baryshkov
2023-01-12 9:28 ` Neil Armstrong
2023-01-08 16:56 ` [PATCH v2 10/13] drm/bridge: lt9611: simplify video timings programming Dmitry Baryshkov
2023-01-11 10:56 ` Neil Armstrong
2023-01-08 16:56 ` [PATCH v2 11/13] drm/bridge: lt9611: rework infoframes handling Dmitry Baryshkov
2023-01-12 13:51 ` Neil Armstrong
2023-01-08 16:56 ` [PATCH v2 12/13] drm/bridge: lt9611: stop filtering modes via the table Dmitry Baryshkov
2023-01-11 10:57 ` Neil Armstrong [this message]
2023-01-11 15:37 ` Dmitry Baryshkov
2023-01-12 8:43 ` neil.armstrong
2023-01-12 9:19 ` Dmitry Baryshkov
2023-01-08 16:56 ` [PATCH v2 13/13] drm/bridge: lt9611: properly program the dual host mode Dmitry Baryshkov
2023-01-12 13:51 ` Neil Armstrong
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=c03235b1-85d1-1e55-b8c2-9a553887145f@linaro.org \
--to=neil.armstrong@linaro.org \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=daniel@ffwll.ch \
--cc=dmitry.baryshkov@linaro.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=linux-arm-msm@vger.kernel.org \
--cc=robert.foss@linaro.org \
--cc=vkoul@kernel.org \
/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).