All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: dri-devel@lists.freedesktop.org
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	[thread overview]
Message-ID: <20130527155111.GO5004@intel.com> (raw)
In-Reply-To: <1369669497-18854-2-git-send-email-ville.syrjala@linux.intel.com>

On Mon, May 27, 2013 at 06:44:57PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> 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älä <ville.syrjala@linux.intel.com>
> ---
> 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_helper.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, struct 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älä
Intel OTC

  reply	other threads:[~2013-05-27 15:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-27 15:44 [PATCH 1/2] drm/fb-helper: Don't clobber the display palette when fbdev isn't bound ville.syrjala
2013-05-27 15:44 ` [PATCH 2/2] drm/fb-helper: Don't load the display palette if the CRTC is disabled ville.syrjala
2013-05-27 15:51   ` Ville Syrjälä [this message]
2013-05-27 15:54   ` Daniel Vetter
2013-05-27 15:50 ` [PATCH 1/2] drm/fb-helper: Don't clobber the display palette when fbdev isn't bound Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130527155111.GO5004@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.