]> git.karo-electronics.de Git - karo-tx-linux.git/commit
drm/i915: add some barriers when changing DIPs
authorPaulo Zanoni <paulo.r.zanoni@intel.com>
Mon, 28 May 2012 19:43:00 +0000 (16:43 -0300)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 17 Oct 2012 02:48:57 +0000 (03:48 +0100)
commit2887c281de791c4d81622298997126a0c49a772c
treec767c3c16c47d680c35b055b5b3b6e02e9c08187
parent7cd9c440b3060540775f75afc8cea2e81474f4a6
drm/i915: add some barriers when changing DIPs

commit 9d9740f099f2eaf309c4c9cbc0d732507140db28 upstream.

On IVB and older, we basically have two registers: the control and the
data register. We write a few consecutitve times to the control
register, and we need these writes to arrive exactly in the specified
order.

Also, when we're changing the data register, we need to guarantee that
anything written to the control register already arrived (since
changing the control register can change where the data register
points to). Also, we need to make sure all the writes to the data
register happen exactly in the specified order, and we also *can't*
read the data register during this process, since reading and/or
writing it will change the place it points to.

So invoke the "better safe than sorry" rule and just be careful and
put barriers everywhere :)

On HSW we still have a control register that we write many times, but
we have many data registers.

Demanded-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
[bwh: Backported to 3.2:
 - There are only two write_infoframe functions to be modified
 - The other VIDEO_DIP_CTL writes are in entirely different functions]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/gpu/drm/i915/intel_hdmi.c