Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Jesse Barnes <jbarnes@virtuousgeek.org>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 19/26] drm/i915: DSPFW and BLC regs are in the display offset range
Date: Fri, 08 Mar 2013 15:57:19 +0200	[thread overview]
Message-ID: <877gliuh8g.fsf@intel.com> (raw)
In-Reply-To: <1362175722-9281-19-git-send-email-jbarnes@virtuousgeek.org>


I also had this as a quick fix to the backlight access; it's also
incomplete wrt the backlight registers.

--- a/drivers/gpu/drm/i915/intel_panel.c
+++ b/drivers/gpu/drm/i915/intel_panel.c
@@ -121,6 +121,9 @@ static int is_backlight_combination_mode(struct drm_device *dev)
 {
 	struct drm_i915_private *dev_priv = dev->dev_private;
 
+	if (IS_VALLEYVIEW(dev))
+		return 0;
+
 	if (INTEL_INFO(dev)->gen >= 4)
 		return I915_READ(BLC_PWM_CTL2) & BLM_COMBINATION_MODE;
 
@@ -338,12 +341,15 @@ void intel_panel_enable_backlight(struct drm_device *dev,
 		if (tmp & BLM_PWM_ENABLE)
 			goto set_level;
 
-		if (dev_priv->num_pipe == 3)
-			tmp &= ~BLM_PIPE_SELECT_IVB;
-		else
-			tmp &= ~BLM_PIPE_SELECT;
+		/* XXX: VLV per pipe registers */
+		if (!IS_VALLEYVIEW(dev)) {
+			if (dev_priv->num_pipe == 3)
+				tmp &= ~BLM_PIPE_SELECT_IVB;
+			else
+				tmp &= ~BLM_PIPE_SELECT;
 
-		tmp |= BLM_PIPE(pipe);
+			tmp |= BLM_PIPE(pipe);
+		}
 		tmp &= ~BLM_PWM_ENABLE;
 
 		I915_WRITE(reg, tmp);







On Sat, 02 Mar 2013, Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> ---
>  drivers/gpu/drm/i915/i915_reg.h |    8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
> index 558c6d1..c70e6d3 100644
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -1953,7 +1953,7 @@
>  #define PFIT_AUTO_RATIOS (dev_priv->info->display_mmio_offset + 0x61238)
>  
>  /* Backlight control */
> -#define BLC_PWM_CTL2		0x61250 /* 965+ only */
> +#define BLC_PWM_CTL2	(dev_priv->info->display_mmio_offset + 0x61250) /* 965+ only */
>  #define   BLM_PWM_ENABLE		(1 << 31)
>  #define   BLM_COMBINATION_MODE		(1 << 30) /* gen4 only */
>  #define   BLM_PIPE_SELECT		(1 << 29)
> @@ -1972,7 +1972,7 @@
>  #define   BLM_PHASE_IN_COUNT_MASK	(0xff << 8)
>  #define   BLM_PHASE_IN_INCR_SHIFT	(0)
>  #define   BLM_PHASE_IN_INCR_MASK	(0xff << 0)
> -#define BLC_PWM_CTL		0x61254
> +#define BLC_PWM_CTL	(dev_priv->info->display_mmio_offset + 0x61254)
>  /*
>   * This is the most significant 15 bits of the number of backlight cycles in a
>   * complete cycle of the modulated backlight control.
> @@ -1994,7 +1994,7 @@
>  #define   BACKLIGHT_DUTY_CYCLE_MASK_PNV		(0xfffe)
>  #define   BLM_POLARITY_PNV			(1 << 0) /* pnv only */
>  
> -#define BLC_HIST_CTL		0x61260
> +#define BLC_HIST_CTL	(dev_priv->info->display_mmio_offset + 0x61260)
>  
>  /* New registers for PCH-split platforms. Safe where new bits show up, the
>   * register layout machtes with gen4 BLC_PWM_CTL[12]. */
> @@ -2831,6 +2831,8 @@
>  #define   DSPFW_HPLL_CURSOR_SHIFT	16
>  #define   DSPFW_HPLL_CURSOR_MASK	(0x3f<<16)
>  #define   DSPFW_HPLL_SR_MASK		(0x1ff)
> +#define DSPFW4			(dev_priv->info->display_mmio_offset + 0x70070)
> +#define DSPFW7			(dev_priv->info->display_mmio_offset + 0x7007c)
>  
>  /* drain latency register values*/
>  #define DRAIN_LATENCY_PRECISION_32	32
> -- 
> 1.7.9.5
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2013-03-08 13:56 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-01 22:08 [PATCH 01/26] drm/i915: sprite support for ValleyView Jesse Barnes
2013-03-01 22:08 ` [PATCH 02/26] drm/i915: add sprite assertion function for VLV Jesse Barnes
2013-03-01 22:08 ` [PATCH 03/26] drm/i915: add constant alpha support to sprite ioctl Jesse Barnes
2013-03-01 22:08 ` [PATCH 04/26] drm/i915: update VLV PLL and DPIO code Jesse Barnes
2013-03-01 22:19   ` Jesse Barnes
2013-03-01 22:19   ` Jesse Barnes
2013-03-03 16:21   ` Daniel Vetter
2013-03-05 15:05   ` Jani Nikula
2013-03-08 13:33   ` Jani Nikula
2013-03-08 16:52     ` Jesse Barnes
2013-03-01 22:08 ` [PATCH 05/26] drm/i915: panel power sequencing for VLV eDP Jesse Barnes
2013-03-08 13:51   ` Jani Nikula
2013-03-08 16:53     ` Jesse Barnes
2013-03-01 22:08 ` [PATCH 06/26] drm/i915: add more VLV IDs Jesse Barnes
2013-03-01 22:08 ` [PATCH 07/26] drm/i915: implement WaDisablePSDDualDispatchEnable on VLV Jesse Barnes
2013-03-06 18:20   ` Ville Syrjälä
2013-03-06 18:28     ` Jesse Barnes
2013-03-01 22:08 ` [PATCH 08/26] drm/i915: VLV has force wake Jesse Barnes
2013-03-01 22:08 ` [PATCH 09/26] drm/i915: add power context allocation and setup on VLV Jesse Barnes
2013-03-05 15:10   ` Jani Nikula
2013-03-07 22:56     ` Jesse Barnes
2013-03-01 22:08 ` [PATCH 10/26] drm/i915: add more clock gating for VLV, allow force wake at init Jesse Barnes
2013-03-08 13:39   ` Jani Nikula
2013-03-08 16:52     ` Jesse Barnes
2013-03-08 17:06       ` Ville Syrjälä
2013-03-08 17:08         ` Jesse Barnes
2013-03-01 22:08 ` [PATCH 11/26] drm/i915: fix VLV limits and m/n/p calculations Jesse Barnes
2013-03-05 12:56   ` Daniel Vetter
2013-03-07 21:41     ` Jesse Barnes
2013-03-01 22:08 ` [PATCH 12/26] drm/i915: disable watermarks on VLV, pondicherry takes care of this Jesse Barnes
2013-03-01 22:08 ` [PATCH 13/26] drm/i915: use gen6 stolen check on VLV Jesse Barnes
2013-03-06 18:45   ` Ville Syrjälä
2013-03-06 19:07     ` Daniel Vetter
2013-03-01 22:08 ` [PATCH 14/26] drm/i915: add Punit read/write routines for VLV Jesse Barnes
2013-03-01 22:08 ` [PATCH 15/26] drm/i915: add media well to VLV force wake routines Jesse Barnes
2013-03-06 18:28   ` Ville Syrjälä
2013-03-06 18:33     ` Jesse Barnes
2013-03-06 18:52       ` Ville Syrjälä
2013-03-06 19:10       ` Daniel Vetter
2013-03-06 20:53         ` Jesse Barnes
2013-03-01 22:08 ` [PATCH 16/26] drm/i915: turbo & RC6 support for VLV Jesse Barnes
2013-03-06 10:51   ` Rohit Jain
2013-03-07 22:27     ` Jesse Barnes
2013-03-11  6:21       ` Jain, Rohit
2013-03-01 22:08 ` [PATCH 17/26] drm/i915: remove VLV MSI IRQ hack Jesse Barnes
2013-04-26 21:40   ` Daniel Vetter
2013-03-01 22:08 ` [PATCH 18/26] drm/i915: don't enumerate VGA on VLV Jesse Barnes
2013-03-01 22:08 ` [PATCH 19/26] drm/i915: DSPFW and BLC regs are in the display offset range Jesse Barnes
2013-03-08 13:57   ` Jani Nikula [this message]
2013-03-08 16:54     ` Jesse Barnes
2013-03-01 22:08 ` [PATCH 20/26] drm/i915: don't use plane pipe select on VLV Jesse Barnes
2013-03-01 22:08 ` [PATCH 21/26] drm/i915: use VLV DIP routines " Jesse Barnes
2013-03-01 22:08 ` [PATCH 22/26] drm/i915: export intel_dpio_write for use in intel_dp.c Jesse Barnes
2013-03-01 22:08 ` [PATCH 23/26] drm/i915/dp: program VSwing and Preemphasis control settings on VLV Jesse Barnes
2013-03-01 22:08 ` [PATCH 24/26] drm/i915: VLV doesn't have HDMI on port C Jesse Barnes
2013-03-19 13:00   ` Ville Syrjälä
2013-03-19 15:27     ` Jesse Barnes
2013-03-01 22:08 ` [PATCH 25/26] drm/i915/dp: don't use ILK paths on VLV Jesse Barnes
2013-03-08 14:12   ` Jani Nikula
2013-03-08 14:57     ` Ville Syrjälä
2013-03-01 22:08 ` [PATCH 26/26] drm/i915/dp: add pre-PCH eDP checking to DP detect for VLV Jesse Barnes
2013-03-08 14:16 ` [PATCH 01/26] drm/i915: sprite support for ValleyView Jani Nikula

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=877gliuh8g.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jbarnes@virtuousgeek.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox