From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AD1A2C43603 for ; Wed, 11 Dec 2019 11:23:07 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8706F206A5 for ; Wed, 11 Dec 2019 11:23:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8706F206A5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 899616EB15; Wed, 11 Dec 2019 11:23:06 +0000 (UTC) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 063556EB15 for ; Wed, 11 Dec 2019 11:23:04 +0000 (UTC) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Dec 2019 03:07:38 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,301,1571727600"; d="scan'208";a="203519974" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by orsmga007.jf.intel.com with SMTP; 11 Dec 2019 03:07:35 -0800 Received: by stinkbox (sSMTP sendmail emulation); Wed, 11 Dec 2019 13:07:35 +0200 Date: Wed, 11 Dec 2019 13:07:35 +0200 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Tom Anderson Subject: Re: [v3,3/4] drm/edid: Throw away the dummy VIC 0 cea mode Message-ID: <20191211110735.GG1208@intel.com> References: <20190925135502.24055-4-ville.syrjala@linux.intel.com> <20191210231854.GB25612@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20191210231854.GB25612@google.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hans Verkuil , dri-devel@lists.freedesktop.org Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Tue, Dec 10, 2019 at 03:18:54PM -0800, Tom Anderson wrote: > On Wed, Sep 25, 2019 at 04:55:01PM +0300, Ville Syrjala wrote: > > From: Ville Syrj=E4l=E4 > > = > > 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 > > Cc: Shashank Sharma > > Signed-off-by: Ville Syrj=E4l=E4 > > --- > > 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[] =3D { > > /* > > * 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 co= mment > should instead be changed to say which functions should be used. Seems reasonable. > = > > */ > > -static const struct drm_display_mode edid_cea_modes_0[] =3D { > > - /* 0 - dummy, VICs start at 1 */ > > - { }, > > +static const struct drm_display_mode edid_cea_modes_1[] =3D { > > /* 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 e= did *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 >=3D 1 && vic < 1 + ARRAY_SIZE(edid_cea_modes_1)) > > + return &edid_cea_modes_1[vic - 1]; > > if (vic >=3D 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 =3D=3D ARRAY_SIZE(edid_cea_modes_0)) > > + if (++vic =3D=3D 1 + ARRAY_SIZE(edid_cea_modes_1)) > > vic =3D 193; > > return vic; > > } -- = Ville Syrj=E4l=E4 Intel _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel