From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eugeni Dodonov Subject: Re: [PATCH 10/21] drm/i915: introduce lpt_enable_pch and cpt_enable_pch Date: Fri, 06 Jul 2012 17:47:18 -0300 Message-ID: <4FF74ED6.7030408@linux.intel.com> References: <1340909749-15249-1-git-send-email-eugeni.dodonov@intel.com> <1340909749-15249-11-git-send-email-eugeni.dodonov@intel.com> Reply-To: eugeni.dodonov@intel.com Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by gabe.freedesktop.org (Postfix) with ESMTP id 330A69E74D for ; Fri, 6 Jul 2012 13:45:05 -0700 (PDT) In-Reply-To: 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: Paulo Zanoni Cc: intel-gfx@lists.freedesktop.org, Eugeni Dodonov List-Id: intel-gfx@lists.freedesktop.org On 07/04/2012 03:21 PM, Paulo Zanoni wrote: > It looks like the check above could go on a separate commit. The first > commit just moves code around, the second one adds the check. This patch attempts to reset cpt_pch_enable to what ironlake_pch_enable was before we added LPT support into it; and make lpt_pch_enable account for LPT checks and such. But yes, I can split it into several commits. > I may have misunderstood something about this code which is not > familiar to me, but instead of limiting everything to pipe 0, can't we > just iterate through all pipes, read DDI_FUNC_CTL(pipe) and see if > there's any other enabled pipe on FDI mode? Yes, the idea in those asserts and checks was that as only 1 pipe can work in FDI mode, and as we only have 1 FDI RX, 1 PCH Transcoder and so on, we simple forced pipe1 to work in this mode, as this way most of older code which uses macros still works. But there is certainly a room for improvements. >> -static void ironlake_pch_enable(struct drm_crtc *crtc) >> +static void cpt_pch_enable(struct drm_crtc *crtc) > > Since this will run on both IBX and CPT, shouldn't we call it > ibx_pch_enable? At least on intel_hdmi.c, the functions are named > after the earliest generation that can run them. Yes, I can rename it to ibx_pch_enable. I'll do those changes and split this one into smaller commits and will resend later. Thanks! Eugeni