All of lore.kernel.org
 help / color / mirror / Atom feed
From: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
To: Ben Hutchings <ben@decadent.org.uk>
Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	torvalds@linux-foundation.org, akpm@linux-foundation.org,
	alan@lxorguk.ukuu.org.uk, Daniel Vetter <daniel.vetter@ffwll.ch>,
	Chris Wilson <chris@chris-wilson.co.uk>,
	Eugeni Dodonov <eugeni.dodonov@intel.com>
Subject: Re: [ 04/69] drm/i915: fix up ivb plane 3 pageflips
Date: Mon, 18 Jun 2012 18:55:56 -0300	[thread overview]
Message-ID: <20120618215555.GD3263@herton-Z68MA-D2H-B3> (raw)
In-Reply-To: <20120617175941.924141588@decadent.org.uk>

On Sun, Jun 17, 2012 at 06:59:45PM +0100, Ben Hutchings wrote:
> 3.2-stable review patch.  If anyone has any objections, please let me know.
> 
> ------------------
> 
> From: Daniel Vetter <daniel.vetter@ffwll.ch>
> 
> commit cb05d8dedefa3066bf5d74ef88c6ca6cf4bd1c87 upstream.
> 
> Or at least plug another gapping hole. Apparrently hw desingers only
> moved the bit field, but did not bother ot re-enumerate the planes
> when adding support for a 3rd pipe.
> 
> Discovered by i-g-t/flip_test.
> 
> This may or may not fix the reference bugzilla, because that one
> smells like we have still larger fish to fry.
> 
> v2: Fixup the impossible case to catch programming errors, noticed by
> Chris Wilson.
> 
> References: https://bugs.freedesktop.org/show_bug.cgi?id=50069
> Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
> Tested-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
> Eugeni Dodonov <eugeni.dodonov@intel.com>
> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> [bwh: Backported to 3.2: adjust context]
> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
> ---
>  drivers/gpu/drm/i915/i915_reg.h      |    8 ++++++++
>  drivers/gpu/drm/i915/intel_display.c |   19 ++++++++++++++++++-
>  2 files changed, 26 insertions(+), 1 deletion(-)
> 
> --- a/drivers/gpu/drm/i915/i915_reg.h
> +++ b/drivers/gpu/drm/i915/i915_reg.h
> @@ -164,6 +164,14 @@
>  #define MI_DISPLAY_FLIP		MI_INSTR(0x14, 2)
>  #define MI_DISPLAY_FLIP_I915	MI_INSTR(0x14, 1)
>  #define   MI_DISPLAY_FLIP_PLANE(n) ((n) << 20)
> +/* IVB has funny definitions for which plane to flip. */
> +#define   MI_DISPLAY_FLIP_IVB_PLANE_A  (0 << 19)
> +#define   MI_DISPLAY_FLIP_IVB_PLANE_B  (1 << 19)
> +#define   MI_DISPLAY_FLIP_IVB_SPRITE_A (2 << 19)
> +#define   MI_DISPLAY_FLIP_IVB_SPRITE_B (3 << 19)
> +#define   MI_DISPLAY_FLIP_IVB_PLANE_C  (4 << 19)
> +#define   MI_DISPLAY_FLIP_IVB_SPRITE_C (5 << 19)
> +
>  #define MI_SET_CONTEXT		MI_INSTR(0x18, 0)
>  #define   MI_MM_SPACE_GTT		(1<<8)
>  #define   MI_MM_SPACE_PHYSICAL		(0<<8)
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -7176,17 +7176,34 @@
>  	struct drm_i915_private *dev_priv = dev->dev_private;
>  	struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
>  	struct intel_ring_buffer *ring = &dev_priv->ring[BCS];
> +	uint32_t plane_bit = 0;
>  	int ret;
>  
>  	ret = intel_pin_and_fence_fb_obj(dev, obj, ring);
>  	if (ret)
>  		goto err;
>  
> +	switch(intel_crtc->plane) {
> +	case PLANE_A:
> +		plane_bit = MI_DISPLAY_FLIP_IVB_PLANE_A;
> +		break;
> +	case PLANE_B:
> +		plane_bit = MI_DISPLAY_FLIP_IVB_PLANE_B;
> +		break;
> +	case PLANE_C:
> +		plane_bit = MI_DISPLAY_FLIP_IVB_PLANE_C;
> +		break;
> +	default:
> +		WARN_ONCE(1, "unknown plane in flip command\n");
> +		ret = -ENODEV;
> +		goto err;

Shouldn't this have been "goto err_unpin;"?

It's not a problem in the backport for 3.2, same code is in the original
patch, just noticed it seems a problem while looking at it; but by what
changelog says the default case is said to not trigger in "practice"
(catch programming error), so I think it doesn't pose a real issue in
practice.

> +	}
> +
>  	ret = intel_ring_begin(ring, 4);
>  	if (ret)
>  		goto err_unpin;
>  
> -	intel_ring_emit(ring, MI_DISPLAY_FLIP_I915 | (intel_crtc->plane << 19));
> +	intel_ring_emit(ring, MI_DISPLAY_FLIP_I915 | plane_bit);
>  	intel_ring_emit(ring, (fb->pitch | obj->tiling_mode));
>  	intel_ring_emit(ring, (obj->gtt_offset));
>  	intel_ring_emit(ring, (MI_NOOP));
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe stable" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

-- 
[]'s
Herton

  reply	other threads:[~2012-06-18 21:56 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-17 17:59 [ 00/69] 3.2.21-stable review Ben Hutchings
2012-06-17 17:59 ` [ 01/69] drm/i915: Mark the ringbuffers as being in the GTT domain Ben Hutchings
2012-06-17 17:59 ` [ 02/69] drm/i915: hold forcewake around ring hw init Ben Hutchings
2012-06-17 17:59 ` [ 03/69] drm/i915: Unpin the flip target if we fail to queue the flip Ben Hutchings
2012-06-17 17:59 ` [ 04/69] drm/i915: fix up ivb plane 3 pageflips Ben Hutchings
2012-06-18 21:55   ` Herton Ronaldo Krzesinski [this message]
2012-06-18 22:10     ` Eugeni Dodonov
2012-06-19  3:59       ` Ben Hutchings
2012-06-19  8:23         ` Daniel Vetter
2012-06-19 11:59           ` Ben Hutchings
2012-06-19 11:45         ` Eugeni Dodonov
2012-06-17 17:59 ` [ 05/69] char/agp: add another Ironlake host bridge Ben Hutchings
2012-06-17 17:59 ` [ 06/69] x86/uv: Fix UV2 BAU legacy mode Ben Hutchings
2012-06-17 17:59 ` [ 07/69] powerpc: Fix kernel panic during kernel module load Ben Hutchings
2012-06-17 17:59 ` [ 08/69] drm/nouveau: determine a value for display_info.bpc if edid doesnt Ben Hutchings
2012-06-17 17:59 ` [ 09/69] drm/nouveau: default to 8bpc for non-LVDS panels if EDID isnt useful Ben Hutchings
2012-06-17 17:59 ` [ 10/69] drm/nouveau/disp: fix dithering not being enabled on some eDP macbooks Ben Hutchings
2012-06-17 17:59 ` [ 11/69] fuse: fix stat call on 32 bit platforms Ben Hutchings
2012-06-17 17:59 ` [ 12/69] x86, MCE, AMD: Make APIC LVT thresholding interrupt optional Ben Hutchings
2012-06-17 17:59 ` [ 13/69] x86/amd: Re-enable CPU topology extensions in case BIOS has disabled it Ben Hutchings
2012-06-17 17:59 ` [ 14/69] hwmon: (fam15h_power) Increase output resolution Ben Hutchings
2012-06-17 17:59 ` [ 15/69] sched: Fix the relax_domain_level boot parameter Ben Hutchings
2012-06-17 17:59 ` [ 16/69] iwlwifi: dont mess up the SCD when removing a key Ben Hutchings
2012-06-17 17:59 ` [ 17/69] hwrng: atmel-rng - fix race condition leading to repeated bits Ben Hutchings
2012-06-17 17:59   ` Ben Hutchings
2012-06-17 17:59 ` [ 18/69] crypto: aesni-intel - fix unaligned cbc decrypt for x86-32 Ben Hutchings
2012-06-17 17:59   ` Ben Hutchings
2012-06-17 18:00 ` [ 19/69] xen/setup: filter APERFMPERF cpuid feature out Ben Hutchings
2012-06-17 18:00 ` [ 20/69] NFSv4.1: Fix a request leak on the back channel Ben Hutchings
2012-06-17 18:00 ` [ 21/69] can: c_can: fix "BUG! echo_skb is occupied!" during transmit Ben Hutchings
2012-06-17 18:00 ` [ 22/69] can: c_can: fix an interrupt thrash issue with c_can driver Ben Hutchings
2012-06-17 18:00 ` [ 23/69] can: c_can: fix race condition in c_can_open() Ben Hutchings
2012-06-17 18:00 ` [ 24/69] ARM i.MX53: Fix PLL4 base address Ben Hutchings
2012-06-17 18:00 ` [ 25/69] usb: musb_gadget: fix crash caused by dangling pointer Ben Hutchings
2012-06-17 18:00 ` [ 26/69] mac80211: clean up remain-on-channel on interface stop Ben Hutchings
2012-06-17 18:00 ` [ 27/69] rt2x00: use atomic variable for seqno Ben Hutchings
2012-06-17 18:00 ` [ 28/69] iwlwifi: disable WoWLAN if !CONFIG_PM_SLEEP Ben Hutchings
2012-06-17 18:00 ` [ 29/69] ASoC: wm8994: Ensure all AIFnCLK events are run from the _late variants Ben Hutchings
2012-06-17 18:00 ` [ 30/69] ASoC: wm8994: Apply volume updates with clocks enabled Ben Hutchings
2012-06-17 18:00 ` [ 31/69] iwlwifi: unregister LEDs if mac80211 registration fails Ben Hutchings
2012-06-17 18:00 ` [ 32/69] cfg80211: fix interface combinations check Ben Hutchings
2012-06-17 18:00 ` [ 33/69] [SCSI] mpt2sas: Fix unsafe using smp_processor_id() in preemptible Ben Hutchings
2012-06-17 18:00 ` [ 34/69] net: sierra_net: device IDs for Aircard 320U++ Ben Hutchings
2012-06-17 18:00 ` [ 35/69] ARM: imx6: exit coherency when shutting down a cpu Ben Hutchings
2012-06-17 18:00 ` [ 36/69] ARM i.MX imx21ads: Fix overlapping static i/o mappings Ben Hutchings
2012-06-17 18:00 ` [ 37/69] NFSv4: Fix unnecessary delegation returns in nfs4_do_open Ben Hutchings
2012-06-17 18:00 ` [ 38/69] iwlwifi: use correct supported firmware for 6035 and 6000g2 Ben Hutchings
2012-06-17 18:00 ` [ 39/69] iwlwifi: disable the buggy chain extension feature in HW Ben Hutchings
2012-06-18 19:18   ` Herton Ronaldo Krzesinski
2012-06-18 19:23     ` Grumbach, Emmanuel
2012-06-19  3:57       ` Ben Hutchings
2012-06-17 18:00 ` [ 40/69] ALSA: hda - Add codec->no_jack_detect flag Ben Hutchings
2012-06-17 18:00 ` [ 41/69] ALSA: hda - add support for Uniwill ECS M31EI notebook Ben Hutchings
2012-06-17 18:00 ` [ 42/69] ALSA: hda - Suppress auto-mute feature on some machines with ALC861 Ben Hutchings
2012-06-17 18:00 ` [ 43/69] ALSA: hda - Add another jack-detection suppression for ASUS ALC892 Ben Hutchings
2012-06-17 18:00 ` [ 44/69] ALSA: HDA: Pin fixup for Zotac Z68 motherboard Ben Hutchings
2012-06-17 18:00 ` [ 45/69] usb: cdc-wdm: Add device-id for Huawei 3G/LTE modems Ben Hutchings
2012-06-17 20:51   ` Bjørn Mork
2012-06-17 22:51     ` Ben Hutchings
2012-06-17 18:00 ` [ 46/69] USB: cdc-wdm: Add Vodafone/Huawei K5005 support Ben Hutchings
2012-06-17 20:50   ` Bjørn Mork
2012-06-17 18:00 ` [ 47/69] USB: option: " Ben Hutchings
2012-06-17 18:00 ` [ 48/69] USB: qcserial: Add Sierra Wireless device IDs Ben Hutchings
2012-06-17 18:00 ` [ 49/69] USB: ftdi-sio: Add support for RT Systems USB-RTS01 serial adapter Ben Hutchings
2012-06-17 18:00 ` [ 50/69] USB: serial: cp210x: add Optris MS Pro usb id Ben Hutchings
2012-06-17 18:00 ` [ 51/69] USB: serial: sierra: Add support for Sierra Wireless AirCard 320U modem Ben Hutchings
2012-06-17 18:00 ` [ 52/69] USB: option: Updated Huawei K4605 has better id Ben Hutchings
2012-06-17 18:00 ` [ 53/69] USB: mct_u232: Fix incorrect TIOCMSET return Ben Hutchings
2012-06-17 18:00 ` [ 54/69] USB: option: fix port-data abuse Ben Hutchings
2012-06-17 18:00 ` [ 55/69] USB: option: fix memory leak Ben Hutchings
2012-06-17 18:00 ` [ 56/69] USB: option: add more YUGA device ids Ben Hutchings
2012-06-17 18:00 ` [ 57/69] target: Return error to initiator if SET TARGET PORT GROUPS emulation fails Ben Hutchings
2012-06-17 18:00 ` [ 58/69] USB: add NO_D3_DURING_SLEEP flag and revert 151b61284776be2 Ben Hutchings
2012-06-17 18:00 ` [ 59/69] USB: serial: Enforce USB driver and USB serial driver match Ben Hutchings
2012-06-17 18:00 ` [ 60/69] usb-storage: Add 090c:1000 to unusal-devs Ben Hutchings
2012-06-18  8:39   ` Hans de Goede
2012-06-18  9:14     ` Simon Raffeiner
2012-06-18 13:38       ` Ben Hutchings
2012-06-17 18:00 ` [ 61/69] xhci: Fix invalid loop check in xhci_free_tt_info() Ben Hutchings
2012-06-17 18:00 ` [ 62/69] xhci: Dont free endpoints in xhci_mem_cleanup() Ben Hutchings
2012-06-17 18:00 ` [ 63/69] xHCI: Increase the timeout for controller save/restore state operation Ben Hutchings
2012-06-17 18:00 ` [ 64/69] usb: PS3 EHCI QH read work-around Ben Hutchings
2012-06-17 18:00 ` [ 65/69] USB: fix PS3 EHCI systems Ben Hutchings
2012-06-17 18:00 ` [ 66/69] usb: cdc-acm: fix devices not unthrottled on open Ben Hutchings
2012-06-17 18:00 ` [ 67/69] USB: fix gathering of interface associations Ben Hutchings
2012-06-17 18:00 ` [ 68/69] swap: fix shmem swapping when more than 8 areas Ben Hutchings
2012-06-17 18:00 ` [ 69/69] drm/radeon: add some additional 6xx/7xx/EG register init Ben Hutchings
2012-06-17 18:48 ` [ 00/69] 3.2.21-stable review Ben Hutchings

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=20120618215555.GD3263@herton-Z68MA-D2H-B3 \
    --to=herton.krzesinski@canonical.com \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=ben@decadent.org.uk \
    --cc=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --cc=eugeni.dodonov@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.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.