From: Damien Lespiau Subject: Re: [PATCH] drm: add support for additional stereo 3D modes Date: Fri, 11 Oct 2013 13:09:16 +0100 Message-ID: <20131011120916.GB32434@strange.amr.corp.intel.com> References: <1381411155-2841-1-git-send-email-thomas.wood@intel.com> <20131011111214.GT13047@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Content-Disposition: inline In-Reply-To: <20131011111214.GT13047@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Cc: intel-gfx@lists.freedesktop.org, Thomas Wood , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Fri, Oct 11, 2013 at 02:12:14PM +0300, Ville Syrj=E4l=E4 wrote: > On Thu, Oct 10, 2013 at 02:19:15PM +0100, Thomas Wood wrote: > > +static int add_3d_struct_modes(struct drm_connector *connector, u16 st= ructure, > > + const u8 *video_db, u8 video_len, u8 video_index) > > +{ > > + struct drm_device *dev =3D connector->dev; > > + struct drm_display_mode *newmode; > > + int modes =3D 0; > > + u8 cea_mode; > > + > > + if (video_db =3D=3D NULL || video_index > video_len) > > + return 0; > > + > > + /* CEA modes are numbered 1..127 */ > > + cea_mode =3D (video_db[video_index] & 127) - 1; > > + if (cea_mode >=3D ARRAY_SIZE(edid_cea_modes)) > > + return 0; > > + > > + if (structure & 1) { > = > I'm also wondering if some displays might include some of the mandatory > modes in 3D_Structure_ALL, and if so should we filter out the > duplicates? It can. Looks like drm_mode_connector_list_update() should be taking care of the duplicated modes. -- = Damien