<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lwn.git/drivers/gpu/drm/drm_irq.c, branch v3.10.3</title>
<subtitle>Linux kernel documentation tree maintained by Jonathan Corbet</subtitle>
<id>http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v3.10.3</id>
<link rel='self' href='http://mirrors.hust.edu.cn/git/lwn.git/atom?h=v3.10.3'/>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/'/>
<updated>2013-06-03T09:12:04+00:00</updated>
<entry>
<title>drm: fix a use-after-free when GPU acceleration disabled</title>
<updated>2013-06-03T09:12:04+00:00</updated>
<author>
<name>Huacai Chen</name>
<email>chenhc@lemote.com</email>
</author>
<published>2013-05-21T06:23:43+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=b7ea85a4fed37835eec78a7be3039c8dc22b8178'/>
<id>urn:sha1:b7ea85a4fed37835eec78a7be3039c8dc22b8178</id>
<content type='text'>
When GPU acceleration is disabled, drm_vblank_cleanup() will free the
vblank-related data, such as vblank_refcount, vblank_inmodeset, etc.
But we found that drm_vblank_post_modeset() may be called after the
cleanup, which use vblank_refcount and vblank_inmodeset. And this will
cause a kernel panic.

Fix this by return immediately if dev-&gt;num_crtcs is zero. This is the
same thing that drm_vblank_pre_modeset() does.

Call trace of a drm_vblank_post_modeset() after drm_vblank_cleanup():
[   62.628906] [&lt;ffffffff804868d0&gt;] drm_vblank_post_modeset+0x34/0xb4
[   62.628906] [&lt;ffffffff804c7008&gt;] atombios_crtc_dpms+0xb4/0x174
[   62.628906] [&lt;ffffffff804c70e0&gt;] atombios_crtc_commit+0x18/0x38
[   62.628906] [&lt;ffffffff8047f038&gt;] drm_crtc_helper_set_mode+0x304/0x3cc
[   62.628906] [&lt;ffffffff8047f92c&gt;] drm_crtc_helper_set_config+0x6d8/0x988
[   62.628906] [&lt;ffffffff8047dd40&gt;] drm_fb_helper_set_par+0x94/0x104
[   62.628906] [&lt;ffffffff80439d14&gt;] fbcon_init+0x424/0x57c
[   62.628906] [&lt;ffffffff8046a638&gt;] visual_init+0xb8/0x118
[   62.628906] [&lt;ffffffff8046b9f8&gt;] take_over_console+0x238/0x384
[   62.628906] [&lt;ffffffff80436df8&gt;] fbcon_takeover+0x7c/0xdc
[   62.628906] [&lt;ffffffff8024fa20&gt;] notifier_call_chain+0x44/0x94
[   62.628906] [&lt;ffffffff8024fcbc&gt;] __blocking_notifier_call_chain+0x48/0x68
[   62.628906] [&lt;ffffffff8042d990&gt;] register_framebuffer+0x228/0x260
[   62.628906] [&lt;ffffffff8047e010&gt;] drm_fb_helper_single_fb_probe+0x260/0x314
[   62.628906] [&lt;ffffffff8047e2c4&gt;] drm_fb_helper_initial_config+0x200/0x234
[   62.628906] [&lt;ffffffff804e5560&gt;] radeon_fbdev_init+0xd4/0xf4
[   62.628906] [&lt;ffffffff804e0e08&gt;] radeon_modeset_init+0x9bc/0xa18
[   62.628906] [&lt;ffffffff804bfc14&gt;] radeon_driver_load_kms+0xdc/0x12c
[   62.628906] [&lt;ffffffff8048b548&gt;] drm_get_pci_dev+0x148/0x238
[   62.628906] [&lt;ffffffff80423564&gt;] local_pci_probe+0x5c/0xd0
[   62.628906] [&lt;ffffffff80241ac4&gt;] work_for_cpu_fn+0x1c/0x30
[   62.628906] [&lt;ffffffff802427c8&gt;] process_one_work+0x274/0x3bc
[   62.628906] [&lt;ffffffff80242934&gt;] process_scheduled_works+0x24/0x44
[   62.628906] [&lt;ffffffff8024515c&gt;] worker_thread+0x31c/0x3f4
[   62.628906] [&lt;ffffffff802497a8&gt;] kthread+0x88/0x90
[   62.628906] [&lt;ffffffff80206794&gt;] kernel_thread_helper+0x10/0x18

Signed-off-by: Huacai Chen &lt;chenhc@lemote.com&gt;
Signed-off-by: Binbin Zhou &lt;zhoubb@lemote.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Reviewed-by: Michel Dänzer &lt;michel.daenzer@amd.com&gt;
Acked-by: Paul Menzel &lt;paulepanter@users.sourceforge.net&gt;
Signed-off-by: Dave Airlie &lt;airlied@gmail.com&gt;
</content>
</entry>
<entry>
<title>drm: small fix in drm_send_vblank_event()</title>
<updated>2013-02-17T22:55:42+00:00</updated>
<author>
<name>Rob Clark</name>
<email>robdclark@gmail.com</email>
</author>
<published>2012-12-10T16:49:46+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=21a245d2d62ef617978316203af032d499805cd2'/>
<id>urn:sha1:21a245d2d62ef617978316203af032d499805cd2</id>
<content type='text'>
Initialize e-&gt;pipe.. some drivers set this themselves, others do not.
Setting it in drm_send_vblank_event() should help ensure more consistent
behavior with the different drivers.

Signed-off-by: Rob Clark &lt;robdclark@gmail.com&gt;
</content>
</entry>
<entry>
<title>drm: make frame duration time calculation more precise</title>
<updated>2013-02-08T04:00:48+00:00</updated>
<author>
<name>Daniel Kurtz</name>
<email>djkurtz@chromium.org</email>
</author>
<published>2012-12-27T01:01:46+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=85a7ce67f3ebfd5975ffd1febcabfe4999ca911d'/>
<id>urn:sha1:85a7ce67f3ebfd5975ffd1febcabfe4999ca911d</id>
<content type='text'>
It is a bit more precise to compute the total number of pixels first and
then divide, rather than multiplying the line pixel count by the
already-rounded line duration.

Signed-off-by: Daniel Kurtz &lt;djkurtz@chromium.org&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm: Allow vblank support without DRIVER_HAVE_IRQ</title>
<updated>2013-02-08T03:53:04+00:00</updated>
<author>
<name>Thierry Reding</name>
<email>thierry.reding@avionic-design.de</email>
</author>
<published>2013-01-14T16:05:56+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=03f6509df9218c760ae74f41a609233220d33f19'/>
<id>urn:sha1:03f6509df9218c760ae74f41a609233220d33f19</id>
<content type='text'>
Drivers that register interrupt handlers without the DRM core helpers
don't initialize the .irq_enabled field and drm_dev_to_irq() may fail
when called on them. This shouldn't preclude them from implementing
the vblank IOCTL.

Signed-off-by: Thierry Reding &lt;thierry.reding@avionic-design.de&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm: hold event_lock while accessing vblank_event_list</title>
<updated>2012-11-29T11:30:34+00:00</updated>
<author>
<name>Imre Deak</name>
<email>imre.deak@intel.com</email>
</author>
<published>2012-11-02T11:30:50+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=e7783ba3bf1c631278be6620875fbfa6b0eba905'/>
<id>urn:sha1:e7783ba3bf1c631278be6620875fbfa6b0eba905</id>
<content type='text'>
Currently the only users of drm_vblank_off() are i915 and gma500,
neither of which holds the event_lock when calling this function.
Fix this by holding the event_lock while traversing the list.

Signed-off-by: Imre Deak &lt;imre.deak@intel.com&gt;
Signed-off-by: Inki Dae &lt;inki.dae@samsung.com&gt;
Signed-off-by: Kyungmin Park &lt;kyungmin.park@samsung.com&gt;
</content>
</entry>
<entry>
<title>DRM/KMS: Add Bail-Out Conditions for Loop.</title>
<updated>2012-11-20T06:07:49+00:00</updated>
<author>
<name>Egbert Eich</name>
<email>eich@suse.de</email>
</author>
<published>2012-10-13T11:36:14+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=0355cf3a0f49e26f4b84d9da7189b2324cf1df6d'/>
<id>urn:sha1:0355cf3a0f49e26f4b84d9da7189b2324cf1df6d</id>
<content type='text'>
When trying to obtain an accurate timestamp for the last vsync interrupt
in vblank_disable_and_save() we loop until the vsync counter after reading
the time stamp is identical to the one before.
In the case where no hardware timestamp can be obtained there is probably
no point in trying to make sure we remain within the same vsync during
the time we obtain the counter.
Furthermore we should make sure there's an 'emergency exit' so that we
don't end up in an endless loop when the driver get_vblank_timestamp()
function doesn't manage to return within the same vsync.
This may happen when this function prints out debugging information over
a slow (ie serial) line.

Signed-off-by: Egbert Eich &lt;eich@suse.de&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm: add support for monotonic vblank timestamps</title>
<updated>2012-11-20T06:06:16+00:00</updated>
<author>
<name>Imre Deak</name>
<email>imre.deak@intel.com</email>
</author>
<published>2012-10-23T18:53:26+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=c61eef726a78ae77b6ce223d01ea2130f465fe5c'/>
<id>urn:sha1:c61eef726a78ae77b6ce223d01ea2130f465fe5c</id>
<content type='text'>
Jumps in the vblank and page flip event timestamps cause trouble for
clients, so we should avoid them. The timestamp we get currently with
gettimeofday can jump, so use instead monotonic timestamps.

For backward compatibility use a module flag to revert back to using
gettimeofday timestamps. Add also a DRM_CAP_TIMESTAMP_MONOTONIC flag
that is simply a read only version of the module flag, so that clients
can query this without depending on sysfs.

Signed-off-by: Imre Deak &lt;imre.deak@intel.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm: use monotonic time in drm_calc_vbltimestamp_from_scanoutpos</title>
<updated>2012-11-20T06:06:15+00:00</updated>
<author>
<name>Imre Deak</name>
<email>imre.deak@intel.com</email>
</author>
<published>2012-10-23T18:53:25+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=e62f2f5acba1d466da047983ae16f6b96b68b310'/>
<id>urn:sha1:e62f2f5acba1d466da047983ae16f6b96b68b310</id>
<content type='text'>
For measuring duration we want to avoid that our start/end timestamps
jump, so use monotonic instead of real time for that.

Signed-off-by: Imre Deak &lt;imre.deak@intel.com&gt;
Reviewed-by: mario.kleiner
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>drm: add drm_send_vblank_event() helper (v5)</title>
<updated>2012-11-20T05:47:21+00:00</updated>
<author>
<name>Rob Clark</name>
<email>rob@ti.com</email>
</author>
<published>2012-10-16T22:48:40+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=c6eefa1750ec0308956895027c3a79eee2ef9726'/>
<id>urn:sha1:c6eefa1750ec0308956895027c3a79eee2ef9726</id>
<content type='text'>
A helper that drivers can use to send vblank event after a pageflip.
If the driver doesn't support proper vblank irq based time/seqn then
just pass -1 for the pipe # to get do_gettimestamp() behavior (since
there are a lot of drivers that don't use drm_vblank_count_and_time())

Also an internal send_vblank_event() helper for the various other code
paths within drm_irq that also need to send vblank events.

v1: original
v2: add back 'vblwait-&gt;reply.sequence = seq' which should not have
    been deleted
v3: add WARN_ON() in case lock is not held and comments
v4: use WARN_ON_SMP() instead to fix issue with !SMP &amp;&amp; !DEBUG_SPINLOCK
    as pointed out by Marcin Slusarz
v5: update docbook

Signed-off-by: Rob Clark &lt;rob@ti.com&gt;
Signed-off-by: Dave Airlie &lt;airlied@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux</title>
<updated>2012-10-04T06:29:23+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-10-04T06:29:23+00:00</published>
<link rel='alternate' type='text/html' href='http://mirrors.hust.edu.cn/git/lwn.git/commit/?id=612a9aab56a93533e76e3ad91642db7033e03b69'/>
<id>urn:sha1:612a9aab56a93533e76e3ad91642db7033e03b69</id>
<content type='text'>
Pull drm merge (part 1) from Dave Airlie:
 "So first of all my tree and uapi stuff has a conflict mess, its my
  fault as the nouveau stuff didn't hit -next as were trying to rebase
  regressions out of it before we merged.

  Highlights:
   - SH mobile modesetting driver and associated helpers
   - some DRM core documentation
   - i915 modesetting rework, haswell hdmi, haswell and vlv fixes, write
     combined pte writing, ilk rc6 support,
   - nouveau: major driver rework into a hw core driver, makes features
     like SLI a lot saner to implement,
   - psb: add eDP/DP support for Cedarview
   - radeon: 2 layer page tables, async VM pte updates, better PLL
     selection for &gt; 2 screens, better ACPI interactions

  The rest is general grab bag of fixes.

  So why part 1? well I have the exynos pull req which came in a bit
  late but was waiting for me to do something they shouldn't have and it
  looks fairly safe, and David Howells has some more header cleanups
  he'd like me to pull, that seem like a good idea, but I'd like to get
  this merge out of the way so -next dosen't get blocked."

Tons of conflicts mostly due to silly include line changes, but mostly
mindless.  A few other small semantic conflicts too, noted from Dave's
pre-merged branch.

* 'drm-next' of git://people.freedesktop.org/~airlied/linux: (447 commits)
  drm/nv98/crypt: fix fuc build with latest envyas
  drm/nouveau/devinit: fixup various issues with subdev ctor/init ordering
  drm/nv41/vm: fix and enable use of "real" pciegart
  drm/nv44/vm: fix and enable use of "real" pciegart
  drm/nv04/dmaobj: fixup vm target handling in preparation for nv4x pcie
  drm/nouveau: store supported dma mask in vmmgr
  drm/nvc0/ibus: initial implementation of subdev
  drm/nouveau/therm: add support for fan-control modes
  drm/nouveau/hwmon: rename pwm0* to pmw1* to follow hwmon's rules
  drm/nouveau/therm: calculate the pwm divisor on nv50+
  drm/nouveau/fan: rewrite the fan tachometer driver to get more precision, faster
  drm/nouveau/therm: move thermal-related functions to the therm subdev
  drm/nouveau/bios: parse the pwm divisor from the perf table
  drm/nouveau/therm: use the EXTDEV table to detect i2c monitoring devices
  drm/nouveau/therm: rework thermal table parsing
  drm/nouveau/gpio: expose the PWM/TOGGLE parameter found in the gpio vbios table
  drm/nouveau: fix pm initialization order
  drm/nouveau/bios: check that fixed tvdac gpio data is valid before using it
  drm/nouveau: log channel debug/error messages from client object rather than drm client
  drm/nouveau: have drm debugging macros build on top of core macros
  ...
</content>
</entry>
</feed>
