From: Daniel Vetter Subject: Re: [PATCH] drm/i915: Fix issues caused from get_clock elimination Date: Fri, 6 Sep 2013 18:00:40 +0200 Message-ID: <20130906160040.GT27291@phenom.ffwll.local> References: <1378293292-30682-6-git-send-email-ville.syrjala@linux.intel.com> <1378473857-11890-1-git-send-email-ville.syrjala@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail-ee0-f48.google.com (mail-ee0-f48.google.com [74.125.83.48]) by gabe.freedesktop.org (Postfix) with ESMTP id 64DA5E6459 for ; Fri, 6 Sep 2013 09:00:27 -0700 (PDT) Received: by mail-ee0-f48.google.com with SMTP id l10so1690304eei.7 for ; Fri, 06 Sep 2013 09:00:26 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1378473857-11890-1-git-send-email-ville.syrjala@linux.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.syrjala@linux.intel.com Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Fri, Sep 06, 2013 at 04:24:17PM +0300, ville.syrjala@linux.intel.com wro= te: > From: Ville Syrj=E4l=E4 > = > For non-PCH encoders ironlake_crtc_clock_get() attempts to extract > adjusted_mode.clock from port_clock. But now that we call > ironlake_crtc_clock_get() before the encoders' get_config() that no > longer works. > = > To fix the problem also call ironlake_crtc_clock_get() before > get_config() for PCH encoders, and afterwards for non-PCH encoders. > Also be careful not to clobber port_clock when calling it afterwards. > = > The problem was introduced by: > "drm/i915: Fix port_clock readout for SDVO and HDMI 12bpc cases" > = > Signed-off-by: Ville Syrj=E4l=E4 Plan B, since this is only a special case for the cpu edp encoder where the port clock is stored in the encoder. What about we move the full responsibility for computing the clocks for the cpu edp port to the encoder callback? ironlake_crtc_get_clock would then more correctly just be a ironlake_get_pch_clocks or so. Note that the exact same issue happens for hsw ddi ports where also the port itself selects the port clock (and as usual for dp with the m/n stuff then the dotclock). So we need a notch more generic solution here than just a hack. Cheers, Daniel -- = Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch