From: Tom Anderson <thomasanderson@google.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Hans Verkuil <hansverk@cisco.com>, dri-devel@lists.freedesktop.org
Subject: Re: [v3,3/4] drm/edid: Throw away the dummy VIC 0 cea mode
Date: Tue, 10 Dec 2019 15:18:54 -0800 [thread overview]
Message-ID: <20191210231854.GB25612@google.com> (raw)
In-Reply-To: <20190925135502.24055-4-ville.syrjala@linux.intel.com>
On Wed, Sep 25, 2019 at 04:55:01PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Now that the cea mode handling is not 100% tied to the single
> array the dummy VIC 0 mode is pretty much pointles. Throw it
> out.
>
> Cc: Hans Verkuil <hansverk@cisco.com>
> Cc: Shashank Sharma <shashank.sharma@intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
> drivers/gpu/drm/drm_edid.c | 14 +++++---------
> 1 file changed, 5 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
> index 9f6996323efa..0007004d3221 100644
> --- a/drivers/gpu/drm/drm_edid.c
> +++ b/drivers/gpu/drm/drm_edid.c
> @@ -709,11 +709,9 @@ static const struct minimode extra_modes[] = {
> /*
> * From CEA/CTA-861 spec.
> *
> - * Index with VIC.
> + * Index with VIC-1.
Since we shouldn't be indexing into this array directly any more, this comment
should instead be changed to say which functions should be used.
> */
> -static const struct drm_display_mode edid_cea_modes_0[] = {
> - /* 0 - dummy, VICs start at 1 */
> - { },
> +static const struct drm_display_mode edid_cea_modes_1[] = {
> /* 1 - 640x480@60Hz 4:3 */
> { DRM_MODE("640x480", DRM_MODE_TYPE_DRIVER, 25175, 640, 656,
> 752, 800, 0, 480, 490, 492, 525, 0,
> @@ -3211,10 +3209,8 @@ static u8 *drm_find_cea_extension(const struct edid *edid)
>
> static const struct drm_display_mode *cea_mode_for_vic(u8 vic)
> {
> - if (!vic)
> - return NULL;
> - if (vic < ARRAY_SIZE(edid_cea_modes_0))
> - return &edid_cea_modes_0[vic];
> + if (vic >= 1 && vic < 1 + ARRAY_SIZE(edid_cea_modes_1))
> + return &edid_cea_modes_1[vic - 1];
> if (vic >= 193 && vic < 193 + ARRAY_SIZE(edid_cea_modes_193))
> return &edid_cea_modes_193[vic - 193];
> return NULL;
> @@ -3227,7 +3223,7 @@ static u8 cea_num_vics(void)
>
> static u8 cea_next_vic(u8 vic)
> {
> - if (++vic == ARRAY_SIZE(edid_cea_modes_0))
> + if (++vic == 1 + ARRAY_SIZE(edid_cea_modes_1))
> vic = 193;
> return vic;
> }
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-12-11 9:21 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-25 13:54 [PATCH v3 0/4] drm/edid: Add new modes from CTA-861-G Ville Syrjala
2019-09-25 13:54 ` [PATCH v3 1/4] drm/edid: Abstract away cea_edid_modes[] Ville Syrjala
2019-09-25 13:54 ` Ville Syrjala
2019-10-03 8:16 ` Sharma, Shashank
2019-10-03 13:55 ` Ville Syrjälä
[not found] ` <20191210223423.GA85292@google.com>
2019-12-10 23:06 ` [v3,1/4] " Tom Anderson
2019-09-25 13:55 ` [PATCH v3 2/4] drm/edid: Add CTA-861-G modes with VIC >= 193 Ville Syrjala
2019-09-27 21:35 ` Manasi Navare
2019-10-03 8:22 ` Sharma, Shashank
2019-10-03 14:15 ` Ville Syrjälä
2019-12-10 23:16 ` [v3,2/4] " Tom Anderson
2019-09-25 13:55 ` [PATCH v3 2/4] " Ville Syrjala
2019-09-25 13:55 ` [PATCH v3 3/4] drm/edid: Throw away the dummy VIC 0 cea mode Ville Syrjala
2019-10-03 8:29 ` Sharma, Shashank
2019-10-03 14:16 ` Ville Syrjälä
2019-12-10 23:18 ` Tom Anderson [this message]
2019-12-11 11:07 ` [v3,3/4] " Ville Syrjälä
2019-09-25 13:55 ` [PATCH v3 3/4] " Ville Syrjala
2019-09-25 13:55 ` [PATCH v3 4/4] drm/edid: Make sure the CEA mode arrays have the correct amount of modes Ville Syrjala
2019-09-27 21:38 ` Manasi Navare
2019-12-10 23:20 ` [v3,4/4] " Tom Anderson
2019-09-25 13:55 ` [PATCH v3 4/4] " Ville Syrjala
2019-09-25 16:19 ` ✗ Fi.CI.CHECKPATCH: warning for drm/edid: Add new modes from CTA-861-G (rev2) Patchwork
2019-09-25 16:42 ` ✓ Fi.CI.BAT: success " Patchwork
2019-09-26 8:37 ` ✗ Fi.CI.IGT: failure " Patchwork
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=20191210231854.GB25612@google.com \
--to=thomasanderson@google.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hansverk@cisco.com \
--cc=ville.syrjala@linux.intel.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.