From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH 1/2] drm/i915/tv: add ->get_config callback Date: Mon, 18 Nov 2013 22:14:26 +0200 Message-ID: <20131118201426.GQ7819@intel.com> References: <1384761659-4915-1-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id 3446EFB068 for ; Mon, 18 Nov 2013 12:14:35 -0800 (PST) Content-Disposition: inline In-Reply-To: <1384761659-4915-1-git-send-email-daniel.vetter@ffwll.ch> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: Daniel Vetter Cc: Jani Nikula , Intel Graphics Development List-Id: intel-gfx@lists.freedesktop.org On Mon, Nov 18, 2013 at 09:00:58AM +0100, Daniel Vetter wrote: > We need this to properly fill in adjusted_mode.crtc_clock, otherwise > the state checker gets unhappy. This seems to have been forgotten in > the big clock rework in > = > commit 18442d08786472c63a0a80c27f92b033dffc26de > Author: Ville Syrj=E4l=E4 > Date: Fri Sep 13 16:00:08 2013 +0300 > = > drm/i915: Fix port_clock and adjusted_mode.clock readout all over > = > Cc: Ville Syrj=E4l=E4 > Cc: Jani Nikula > Signed-off-by: Daniel Vetter For the series: Reviewed-by: Ville Syrj=E4l=E4 Although using adjusted_mode.crtc_clock in intel_tv compute_config and get_config is a bit wrong I think. That's not really the pixel clock we're shoveling into it, so we're going to be computing the watermarks incorrectly. To do it really right, I think we should stick the tv_mode clock to port_clock, and then compute the pixel rate based on the input mode and the refresh rate. Or maybe we just need a TV out specific version of ilk_pipe_pixel_rate() (just like we'd need one for GMCH panel fitter). The TV out scaler is essentially just another panel fitter anyway. > --- > drivers/gpu/drm/i915/intel_tv.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > = > diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel= _tv.c > index 18c406246a2d..22cf0f4ba248 100644 > --- a/drivers/gpu/drm/i915/intel_tv.c > +++ b/drivers/gpu/drm/i915/intel_tv.c > @@ -902,6 +902,13 @@ intel_tv_mode_valid(struct drm_connector *connector, > } > = > = > +static void > +intel_tv_get_config(struct intel_encoder *encoder, > + struct intel_crtc_config *pipe_config) > +{ > + pipe_config->adjusted_mode.crtc_clock =3D pipe_config->port_clock; > +} > + > static bool > intel_tv_compute_config(struct intel_encoder *encoder, > struct intel_crtc_config *pipe_config) > @@ -1621,6 +1628,7 @@ intel_tv_init(struct drm_device *dev) > DRM_MODE_ENCODER_TVDAC); > = > intel_encoder->compute_config =3D intel_tv_compute_config; > + intel_encoder->get_config =3D intel_tv_get_config; > intel_encoder->mode_set =3D intel_tv_mode_set; > intel_encoder->enable =3D intel_enable_tv; > intel_encoder->disable =3D intel_disable_tv; > -- = > 1.8.4.rc3 -- = Ville Syrj=E4l=E4 Intel OTC