From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Subject: Re: [PATCH 2/2] drm/fb-helper: Don't load the display palette if the CRTC is disabled Date: Mon, 27 May 2013 18:51:11 +0300 Message-ID: <20130527155111.GO5004@intel.com> References: <1369669497-18854-1-git-send-email-ville.syrjala@linux.intel.com> <1369669497-18854-2-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 mga03.intel.com (mga03.intel.com [143.182.124.21]) by gabe.freedesktop.org (Postfix) with ESMTP id D0096E5DFF for ; Mon, 27 May 2013 08:51:22 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1369669497-18854-2-git-send-email-ville.syrjala@linux.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Mon, May 27, 2013 at 06:44:57PM +0300, ville.syrjala@linux.intel.com wro= te: > From: Ville Syrj=E4l=E4 > = > Often the hardware needs certain clocks running when accessing the > palette, so don't go poking at it if the CRTC is disabled. We still > call the fb_helper gamma_set hooks to update the driver's notion of > what the palette should contain, so that if/when CRTC gets enabled, > the driver will load the correct palette. > = > Signed-off-by: Ville Syrj=E4l=E4 > --- > The other option would of course to put the check into the load_lut > function itself. I don't really care which way we do it as long as > the check is somewhere... And I just realized we already have the check in i915 load_lut at least. Not sure how I failed to notice it before. So feel free to ignore this patch. Patch 1/2 still seems relevant though. > = > drivers/gpu/drm/drm_fb_helper.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > = > diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_hel= per.c > index 1b6ca23..4ecf128 100644 > --- a/drivers/gpu/drm/drm_fb_helper.c > +++ b/drivers/gpu/drm/drm_fb_helper.c > @@ -663,7 +663,9 @@ int drm_fb_helper_setcmap(struct fb_cmap *cmap, struc= t fb_info *info) > if (rc) > goto out; > } > - crtc_funcs->load_lut(crtc); > + > + if (crtc->enabled) > + crtc_funcs->load_lut(crtc); > } > out: > drm_modeset_unlock_all(dev); > -- = > 1.8.1.5 -- = Ville Syrj=E4l=E4 Intel OTC