From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH 1/2] drm/i915: Check VBIOS value for determining LVDS dual channel mode, too Date: Sat, 17 Mar 2012 08:59:56 +0100 Message-ID: References: <1331934073-24463-1-git-send-email-tiwai@suse.de> <1331934073-24463-2-git-send-email-tiwai@suse.de> <861uosdtjo.fsf@sumi.keithp.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTP id 0C6569E7A1 for ; Sat, 17 Mar 2012 00:59:58 -0700 (PDT) In-Reply-To: <861uosdtjo.fsf@sumi.keithp.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: Keith Packard Cc: intel-gfx@lists.freedesktop.org, hcb@chaoticmind.net List-Id: intel-gfx@lists.freedesktop.org At Fri, 16 Mar 2012 16:18:03 -0700, Keith Packard wrote: > > <#part sign=pgpmime> > On Fri, 16 Mar 2012 22:41:12 +0100, Takashi Iwai wrote: > > > +/* read the initial LVDS register value for the given panel mode */ > > +static unsigned int get_lvds_reg_val(const struct bdb_header *bdb, > > + const struct bdb_lvds_lfp_data_ptrs *ptrs, > > + int index, > > + struct drm_display_mode *mode) > > To follow the style of intel_bios.c, I think it would make sense to have > the function: > > static const struct lvds_dvo_timing * > get_lvds_fp_timing(const struct bdb_lvds_lfp_data *lvds_lfp_data, > const struct bdb_lvds_lfp_data_ptrs *lvds_lfp_data_ptrs, > int index) > > then use the results of this in parse_lfp_panel_data, instead of putting > the whole computation into this new function. Well, the LVDS reg data isn't in lvds_dvo_timing but in lvds_fp_timing, thus you need to look at a different entry in anyway. > I'd also like to see this code only use the BDB value when the LVDS is > disabled at startup time; otherwise, we'll be changing the behavior for > all LVDS users, and as BIOS tables are notoriously unreliable, I fear > that we'll cause a lot more problems than we solve. I skipped it to simplify the code, but that'd be safer, indeed. (Though, the chance of getting a wrong value is fairly small since the function verifies whether the resolution of the entry matches with the given mode, too.) thanks, Takashi