From: Chris Wilson Subject: Re: [PATCH] drm/i915: make user mode sync polarity setting explicit Date: Tue, 30 Jul 2013 11:57:06 +0100 Message-ID: <20130730105706.GA2616@cantiga.alporthouse.com> References: <1375180592-16514-1-git-send-email-imre.deak@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from fireflyinternet.com (s16502780.onlinehome-server.info [87.106.93.118]) by gabe.freedesktop.org (Postfix) with ESMTP id 4DFF0E5F19 for ; Tue, 30 Jul 2013 03:57:14 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1375180592-16514-1-git-send-email-imre.deak@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: Imre Deak Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Tue, Jul 30, 2013 at 01:36:32PM +0300, Imre Deak wrote: > Userspace can pass a mode with an unspecified vsync/hsync polarity > setting. All encoders in the Intel driver take this to mean a negative > polarity setting. The HW readout/state checker code on the other hand > needs these flags to be explicitly set, otherwise the state checker will > WARN about the mismatch. > > Get rid of the WARN by making the polarity setting explicit in the > adjusted mode flags based on the requested mode flags. This will keep > the existing behavior otherwise. > > Note that we could guess from the other timing parameters whether the > user wanted a VESA or other standard mode and set the polarity > accordingly. This is what the NV driver does > (drivers/gpu/drm/nouveau/dispnv04/crtc.c), but I think that's not very > exact and would change the existing behavior of the Intel driver. Right, don't guess. If the user wanted the standard mode, then the flags would have been taken from the standard modeline. > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65442 You can add a tested-by here for qa. > Signed-off-by: Imre Deak Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Centre