https://bugs.freedesktop.org/show_bug.cgi?id=68451
--- Comment #20 from Peter Kraus peter.kr...@geeksonbikes.net ---
Hello,
I wont be able to test it until October. Will update then, unless someone else
can test it instead.
Peter
--
You are receiving this mail because:
You are the assignee for
From: Paul Zimmerman
Sent: Thursday, September 19, 2013 11:21 AM
From: Dave Airlie [mailto:airl...@gmail.com]
Sent: Wednesday, September 18, 2013 7:40 PM
On Thu, Sep 19, 2013 at 12:02 PM, Paul Zimmerman
paul.zimmer...@synopsys.com wrote:
I have an ASUS P6X58D-Premium mobo with a
From: Dave Airlie [mailto:airl...@gmail.com]
Sent: Thursday, September 19, 2013 1:15 PM
On Fri, Sep 20, 2013 at 6:10 AM, Daniel Vetter dan...@ffwll.ch wrote:
On Thu, Sep 19, 2013 at 06:32:47PM +, Paul Zimmerman wrote:
From: Paul Zimmerman
Sent: Thursday, September 19, 2013 11:21
This started out as a request to look at the DMA mask situation, and how
to solve the issues which we have on ARM - notably how the DMA mask
should be setup.
However, I started off reviewing how the dma_mask and coherent_dma_mask
was being used, and what I found was rather messy, and in some
The fallback to 32-bit DMA mask is rather odd:
if (!dma_set_mask(pdev-dev, DMA_BIT_MASK(64))
!dma_set_coherent_mask(pdev-dev, DMA_BIT_MASK(64))) {
pci_using_dac = 1;
} else {
err = dma_set_mask(pdev-dev, DMA_BIT_MASK(32));
The fallback to 32-bit DMA mask is rather odd:
if (!dma_set_mask(pdev-dev, DMA_BIT_MASK(64))
!dma_set_coherent_mask(pdev-dev, DMA_BIT_MASK(64))) {
pci_using_dac = 1;
} else {
err = dma_set_mask(pdev-dev, DMA_BIT_MASK(32));
The fallback to 32-bit DMA mask is rather odd:
err = dma_set_mask(pdev-dev, DMA_BIT_MASK(64));
if (!err) {
err = dma_set_coherent_mask(pdev-dev, DMA_BIT_MASK(64));
if (!err)
pci_using_dac = 1;
} else {
The fallback to 32-bit DMA mask is rather odd:
err = dma_set_mask(pdev-dev, DMA_BIT_MASK(64));
if (!err) {
err = dma_set_coherent_mask(pdev-dev, DMA_BIT_MASK(64));
if (!err)
pci_using_dac = 1;
} else {
From: Santosh Shilimkar santosh.shilim...@ti.com
DMA bounce limit is the maximum direct DMA'able memory beyond which
bounce buffers has to be used to perform dma operations. SCSI driver
relies on dma_mask but its calculation is based on max_*pfn which
don't have uniform meaning across
From: Santosh Shilimkar santosh.shilim...@ti.com
The blk_queue_bounce_limit() API parameter 'dma_mask' is actually the
maximum address the device can handle rather than a dma_mask. Rename
it accordingly to avoid it being interpreted as dma_mask.
No functional change.
The idea is to fix the bad
https://bugs.freedesktop.org/show_bug.cgi?id=68451
--- Comment #21 from Alexandre Demers alexandre.f.dem...@gmail.com ---
(In reply to comment #20)
Hello,
I wont be able to test it until October. Will update then, unless someone
else can test it instead.
Peter
I may give it a try this
The fallback to 32-bit DMA mask is rather odd:
err = dma_set_mask(pdev-dev, DMA_BIT_MASK(64));
if (!err) {
err = dma_set_coherent_mask(pdev-dev, DMA_BIT_MASK(64));
if (!err)
pci_using_dac = 1;
} else {
The fallback to 32-bit DMA mask is rather odd:
if (!dma_set_mask(pdev-dev, DMA_BIT_MASK(64))
!dma_set_coherent_mask(pdev-dev, DMA_BIT_MASK(64))) {
*using_dac = true;
} else {
err = dma_set_mask(pdev-dev, DMA_BIT_MASK(32));
17.09.2013, в 23:33, Alex Ivanov gnido...@p0n4ik.tk написал(а):
17.09.2013, в 18:24, Alex Deucher alexdeuc...@gmail.com написал(а):
On Tue, Sep 17, 2013 at 5:23 AM, Alex Ivanov gnido...@p0n4ik.tk wrote:
Alex,
10.09.2013, в 16:37, Alex Deucher alexdeuc...@gmail.com написал(а):
The dummy
On Tue, 17 Sep 2013, Aaron Lu aaron...@intel.com wrote:
According to Matthew Garrett, Windows 8 leaves backlight control up
to individual graphics drivers rather than making ACPI calls itself.
There's plenty of evidence to suggest that the Intel driver for
Windows 8 doesn't use the ACPI
https://bugs.freedesktop.org/show_bug.cgi?id=60182
--- Comment #34 from Michel Dänzer mic...@daenzer.net ---
(In reply to comment #33)
(which AFAIK is normal, but didn't happen before).
Yes, that's normal and not related to this problem.
Note that the 'Attempted to destroy previously destroyed
https://bugzilla.kernel.org/show_bug.cgi?id=54381
--- Comment #15 from Andrew Stubbs a...@codesourcery.com ---
I fixed the problem now! (At least, for my own needs.)
The patch turns out to be very simple.
1. Disregard the mode setting (why does the PPLL care?)
2. Allow a little leeway in the
https://bugzilla.kernel.org/show_bug.cgi?id=54381
--- Comment #16 from Andrew Stubbs a...@codesourcery.com ---
Created attachment 108951
-- https://bugzilla.kernel.org/attachment.cgi?id=108951action=edit
Proposed patch
--
You are receiving this mail because:
You are watching the assignee of
Signed-off-by: Damien Lespiau damien.lesp...@intel.com
---
edid-decode.c | 20 +---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/edid-decode.c b/edid-decode.c
index bf0c3da..d3e3118 100644
--- a/edid-decode.c
+++ b/edid-decode.c
@@ -829,12 +829,26 @@
The lower layers of sysfs will not allow an offset of more than
GEN7_L3LOG_SIZE and also l3_access_valid() caps it a second time. But
it's a little easier to audit if we don't have to worry that the
subtraction will result in negative values.
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com
https://bugs.freedesktop.org/show_bug.cgi?id=69463
--- Comment #7 from samit vats hysv...@gmail.com ---
The Debug output with EGL_DRIVER=egl_dri2
II) [KMS] Kernel modesetting enabled.
libEGL debug: Native platform type: drm (environment overwrite)
libEGL debug: ignore EGL_DRIVERS_PATH for
Am 19.09.2013 04:07, schrieb Dave Airlie:
Hi Linus,
mostly radeon fixes, with some nouveau bios parser, ttm fix and a fix
for AST driver.
Dave.
The following changes since commit
01172772c7c973debf5b4881fcb9463891ea97ec:
drm/nouveau: fix oops on runtime suspend/resume (2013-09-10
On Fri, Sep 20, 2013 at 8:01 AM, Dieter Nützel die...@nuetzel-hh.de wrote:
Am 19.09.2013 04:07, schrieb Dave Airlie:
Hi Linus,
mostly radeon fixes, with some nouveau bios parser, ttm fix and a fix
for AST driver.
Dave.
The following changes since commit
Prevent NULL pointer dereference in case when radeon_ring_fini() did it's job.
Reading of r100_cp_ring_info and radeon_ring_gfx debugfs entries will lead to a
KP if ring buffer was deallocated, e.g. on failed ring test.
Seen on PA-RISC machine having radeon: ring test failed
On Thu, Sep 19, 2013 at 05:40:29PM +0100, Damien Lespiau wrote:
When using the frame packing and a single big framebuffer, some hardware
requires that we do everything like if we were scanning out the big
buffer itself. Let's instrument drm_mode_set_crtcinfo() to be able to do
this adjustement
https://bugs.freedesktop.org/show_bug.cgi?id=69463
--- Comment #8 from Michel Dänzer mic...@daenzer.net ---
(In reply to comment #7)
The Debug output with EGL_DRIVER=egl_dri2
Yet another crash... Can you get a backtrace for this one with gdb? You'll need
to do that from a remote shell, e.g.
This code appears to be calling psb_gtt_free_range twice with the same args.
(The second call didn't appear in the diff output, it's right after the
mutex_unlock)
Spotted with Coverity, not tested due to lack of hardware.
Signed-off-by: Dave Jones da...@fedoraproject.org
diff --git
On Don, 2013-09-19 at 18:37 +0200, Marek Olšák wrote:
On Thu, Sep 19, 2013 at 4:41 PM, Michel Dänzer mic...@daenzer.net wrote:
On Don, 2013-09-19 at 14:33 +0200, Marek Olšák wrote:
This fixes VM protection faults.
I have a new piglit test which can iterate over all possible widths,
On Thu, Sep 19, 2013 at 05:40:32PM +0100, Damien Lespiau wrote:
When booting with i915.fastboot=1, we always take tha code path and end
up undoing what we're trying to do with adjusted_mode.
Hopefully, as the fastboot hardware readout code is using adjusted_mode
as well, it should be
On Fri, Sep 20, 2013 at 05:54:55PM +0300, Ville Syrjälä wrote:
On Thu, Sep 19, 2013 at 05:40:32PM +0100, Damien Lespiau wrote:
When booting with i915.fastboot=1, we always take tha code path and end
up undoing what we're trying to do with adjusted_mode.
Hopefully, as the fastboot
I agree we should make npix_x/y/z more useful, but at the same time
it's a public interface and current and old Mesa depends on the
seemingly incorrect values we set there. This wouldn't be an issue if
we merged the allocator to Mesa, along with xf86-video-ati. Who's with
me? :)
In particular, I
https://bugs.freedesktop.org/show_bug.cgi?id=64810
--- Comment #27 from Rafael Castillo jrch2...@gmail.com ---
many thanks for your hard work, ill test it tonight and report back
--
You are receiving this mail because:
You are the assignee for the bug.
On Thu, Sep 19, 2013 at 05:40:15PM +0100, Damien Lespiau wrote:
v4 was:
http://lists.freedesktop.org/archives/dri-devel/2013-September/045340.html
Changes from v4:
- The kernel is now in charge of adjusting the stereo mode timings.
- There is a per-connector opt-in boolean to expose
On Fri, 20 Sep 2013 16:33:47 +0100
Damien Lespiau damien.lesp...@intel.com wrote:
On Fri, Sep 20, 2013 at 05:54:55PM +0300, Ville Syrjälä wrote:
On Thu, Sep 19, 2013 at 05:40:32PM +0100, Damien Lespiau wrote:
When booting with i915.fastboot=1, we always take tha code path and end
up
https://bugs.freedesktop.org/show_bug.cgi?id=69623
Laurent carlier lordhea...@gmail.com changed:
What|Removed |Added
Attachment #86224|text/plain |image/png
https://bugs.freedesktop.org/show_bug.cgi?id=60182
--- Comment #35 from Jose P. lbdkm...@sharklasers.com ---
(In reply to comment #34)
(In reply to comment #33)
(which AFAIK is normal, but didn't happen before).
Yes, that's normal and not related to this problem.
Note that the 'Attempted
On Fri, Sep 20, 2013 at 9:36 AM, Alex Ivanov gnido...@p0n4ik.tk wrote:
Prevent NULL pointer dereference in case when radeon_ring_fini() did it's job.
Reading of r100_cp_ring_info and radeon_ring_gfx debugfs entries will lead to
a KP if ring buffer was deallocated, e.g. on failed ring test.
This is a minor cleanup of Dave's initial patches to
add runtime PM to radeon powerxpress laptops. It
seems to work well on PX laptop I have access to at
the moment. This patch set requires kernel 3.12.
Dave Airlie (2):
drm/radeon: convert to pmops
drm/radeon: add runtime PM support (v2)
From: Dave Airlie airl...@redhat.com
This is a pre-requisite for runtime pm on powerxpress systems.
Signed-off-by: Alex Deucher alexander.deuc...@amd.com
---
drivers/gpu/drm/radeon/radeon.h| 4 +--
drivers/gpu/drm/radeon/radeon_device.c | 27 +--
On Fri, Sep 20, 2013 at 3:56 PM, Dave Jones da...@redhat.com wrote:
This code appears to be calling psb_gtt_free_range twice with the same args.
(The second call didn't appear in the diff output, it's right after the
mutex_unlock)
Spotted with Coverity, not tested due to lack of hardware.
On Fri, Sep 20, 2013 at 02:20:18PM +0300, Dan Carpenter wrote:
The lower layers of sysfs will not allow an offset of more than
GEN7_L3LOG_SIZE and also l3_access_valid() caps it a second time. But
it's a little easier to audit if we don't have to worry that the
subtraction will result in
https://bugs.freedesktop.org/show_bug.cgi?id=66738
--- Comment #14 from lh jarry...@gmail.com ---
problem still exist in kernel git 20130918
--
You are receiving this mail because:
You are the assignee for the bug.
___
dri-devel mailing list
On Fri, Sep 20, 2013 at 4:25 PM, Mike Lothian m...@fireburn.co.uk wrote:
Hi
Is there an easy way to check this is on?
It's on by default if your system is a powerxpress system (hybrid laptop).
I have radeon.dynpm=1 in grub but usually when I use switcheroo I see
messages saying the card if
On Tue, Sep 17, 2013 at 3:33 PM, Alex Ivanov gnido...@p0n4ik.tk wrote:
17.09.2013, в 18:24, Alex Deucher alexdeuc...@gmail.com написал(а):
On Tue, Sep 17, 2013 at 5:23 AM, Alex Ivanov gnido...@p0n4ik.tk wrote:
Alex,
10.09.2013, в 16:37, Alex Deucher alexdeuc...@gmail.com написал(а):
The
From: Dave Airlie airl...@redhat.com
This hooks radeon up to the runtime PM system to enable
dynamic power management for secondary GPUs in switchable
and powerxpress laptops.
v2: agd5f: clean up, add module parameter
Signed-off-by: Dave Airlie airl...@redhat.com
Signed-off-by: Alex Deucher
https://bugs.freedesktop.org/show_bug.cgi?id=69623
Priority: medium
Bug ID: 69623
Assignee: dri-devel@lists.freedesktop.org
Summary: Pink Pony misrenders - - shader requires 126 registers
Severity: normal
Classification: Unclassified
https://bugs.freedesktop.org/show_bug.cgi?id=55951
--- Comment #1 from Sven Arvidsson s...@whiz.se ---
This is still a problem with Mesa 9.2 and the game build from 2013-05-21, but
something has changed, now I get a BadDrawable error and the game exits so
there's no crash or backtrace to get:
X
On Fri, Sep 20, 2013 at 6:10 PM, Mike Lothian m...@fireburn.co.uk wrote:
Sorry that was a typo on my part. I'm using radeon.runpm=1
I can see audio is switched off
[drm] Disabling audio 0 support
When I use DRI_PRIME=1 I see the DRM initialisation for my card each time I
fire up an
On Sat, Sep 21, 2013 at 8:30 AM, Mike Lothian m...@fireburn.co.uk wrote:
It's probably easier if I just show you this:
http://pastebin.com/xpBJkZDw
Is that expected behaviour? I'm used to seeing something more definite when
echoing OFF into /sys/kernel/debug/vgaswitcheroo/switch
I've just
On Thu, Aug 15, 2013 at 11:48 AM, Alex Deucher alexdeuc...@gmail.com wrote:
The vrefresh field of the mode is 0 for most modes
fetched from the EDID (e.g., established timings).
When dealing with monitors that have a bogus preferred
mode, we may not always select the mode we want because
we
https://bugs.freedesktop.org/show_bug.cgi?id=64810
--- Comment #28 from Rafael Castillo jrch2...@gmail.com ---
Sadly this patch breaks mesa to the point glamor/xinit/weston hangs my 7770
--
You are receiving this mail because:
You are the assignee for the bug.
https://bugs.freedesktop.org/show_bug.cgi?id=37117
--- Comment #2 from Antonio Alecrim Jr antonio.alec...@gmail.com ---
Just for records:
Check the the comment bug 57018#c3
--
You are receiving this mail because:
You are the assignee for the bug.
___
https://bugs.freedesktop.org/show_bug.cgi?id=68451
--- Comment #22 from Alexandre Demers alexandre.f.dem...@gmail.com ---
Doesn't seem to fix anything over here.
--
You are receiving this mail because:
You are the assignee for the bug.
___
dri-devel
https://bugs.freedesktop.org/show_bug.cgi?id=66067
--- Comment #13 from Roland Scheidegger srol...@vmware.com ---
(In reply to comment #12)
(In reply to comment #11)
ARB_fragment_program_shadow may leave it undefined, but the GL spec ...
Which spec exactly? GL specifications only cover
21.09.2013, в 1:27, Alex Deucher alexdeuc...@gmail.com написал(а):
On Tue, Sep 17, 2013 at 3:33 PM, Alex Ivanov gnido...@p0n4ik.tk wrote:
17.09.2013, в 18:24, Alex Deucher alexdeuc...@gmail.com написал(а):
On Tue, Sep 17, 2013 at 5:23 AM, Alex Ivanov gnido...@p0n4ik.tk wrote:
Alex,
https://bugs.freedesktop.org/show_bug.cgi?id=68802
--- Comment #2 from russianneuroman...@ya.ru ---
Probably should be solved by this:
http://cgit.freedesktop.org/~deathsimple/mesa/commit/?id=9334f7d0f16738b4817e853d6d8cb1432953abfb
--
You are receiving this mail because:
You are the assignee
ler_kms(DRM_IRQ_ARGS)
> {
> struct drm_device *dev = (struct drm_device *) arg;
> struct radeon_device *rdev = dev->dev_private;
> + irqreturn_t ret;
>
> - return radeon_irq_process(rdev);
> + ret = radeon_irq_process(rdev);
> + if (ret == IRQ_HANDLED)
> + pm_runtime_mark_last_busy(dev->dev);
> + return ret;
> }
>
> /*
> diff --git a/drivers/gpu/drm/radeon/radeon_kms.c
> b/drivers/gpu/drm/radeon/radeon_kms.c
> index 61580dd..b51 100644
> --- a/drivers/gpu/drm/radeon/radeon_kms.c
> +++ b/drivers/gpu/drm/radeon/radeon_kms.c
> @@ -32,7 +32,7 @@
>
> #include
> #include
> -
> +#include
> /**
> * radeon_driver_unload_kms - Main unload function for KMS.
> *
> @@ -50,9 +50,14 @@ int radeon_driver_unload_kms(struct drm_device *dev)
>
> if (rdev == NULL)
> return 0;
> +
> if (rdev->rmmio == NULL)
> goto done_free;
> +
> + pm_runtime_get_sync(dev->dev);
> +
> radeon_acpi_fini(rdev);
> +
> radeon_modeset_fini(rdev);
> radeon_device_fini(rdev);
>
> @@ -125,9 +130,20 @@ int radeon_driver_load_kms(struct drm_device *dev,
> unsigned long flags)
> "Error during ACPI methods call\n");
> }
>
> + if (radeon_runtime_pm != 0) {
> + pm_runtime_use_autosuspend(dev->dev);
> + pm_runtime_set_autosuspend_delay(dev->dev, 5000);
> + pm_runtime_set_active(dev->dev);
> + pm_runtime_allow(dev->dev);
> + pm_runtime_mark_last_busy(dev->dev);
> + pm_runtime_put_autosuspend(dev->dev);
> + }
> +
> out:
> if (r)
> radeon_driver_unload_kms(dev);
> +
> +
> return r;
> }
>
> @@ -475,9 +491,14 @@ void radeon_driver_lastclose_kms(struct drm_device
> *dev)
> int radeon_driver_open_kms(struct drm_device *dev, struct drm_file
> *file_priv)
> {
> struct radeon_device *rdev = dev->dev_private;
> + int r;
>
> file_priv->driver_priv = NULL;
>
> + r = pm_runtime_get_sync(dev->dev);
> + if (r < 0)
> + return r;
> +
> /* new gpu have virtual address space support */
> if (rdev->family >= CHIP_CAYMAN) {
> struct radeon_fpriv *fpriv;
> @@ -506,6 +527,9 @@ int radeon_driver_open_kms(struct drm_device *dev,
> struct drm_file *file_priv)
>
> file_priv->driver_priv = fpriv;
> }
> +
> + pm_runtime_mark_last_busy(dev->dev);
> + pm_runtime_put_autosuspend(dev->dev);
> return 0;
> }
>
> --
> 1.8.3.1
>
> ___
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
>
-- next part --
An HTML attachment was scrubbed...
URL:
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130920/cb790232/attachment-0001.html>
crtc
> >> active\n");
> >> + return -EBUSY;
> >> + }
> >> + }
> >> +
> >> + pm_runtime_mark_last_busy(dev);
> >> + pm_runtime_autosuspend(dev);
> >> + /* we don't want the main rpm_idle to call suspend - we want to
> >> autosuspend */
> >> + return 1;
> >> +}
> >> +
> >> +long radeon_drm_ioctl(struct file *filp,
> >> + unsigned int cmd, unsigned long arg)
> >> +{
> >> + struct drm_file *file_priv = filp->private_data;
> >> + struct drm_device *dev;
> >> + long ret;
> >> + dev = file_priv->minor->dev;
> >> + ret = pm_runtime_get_sync(dev->dev);
> >> + if (ret < 0)
> >> + return ret;
> >> +
> >> + ret = drm_ioctl(filp, cmd, arg);
> >> +
> >> + pm_runtime_mark_last_busy(dev->dev);
> >> + pm_runtime_put_autosuspend(dev->dev);
> >> + return ret;
> >> }
> >>
> >> static const struct dev_pm_ops radeon_pm_ops = {
> >> @@ -388,13 +489,16 @@ static const struct dev_pm_ops radeon_pm_ops = {
> >> .thaw = radeon_pmops_thaw,
> >> .poweroff = radeon_pmops_freeze,
> >> .restore = radeon_pmops_resume,
> >> + .runtime_suspend = radeon_pmops_runtime_suspend,
> >> + .runtime_resume = radeon_pmops_runtime_resume,
> >> + .runtime_idle = radeon_pmops_runtime_idle,
> >> };
> >>
> >> static const struct file_operations radeon_driver_kms_fops = {
> >> .owner = THIS_MODULE,
> >> .open = drm_open,
> >> .release = drm_release,
> >> - .unlocked_ioctl = drm_ioctl,
> >> + .unlocked_ioctl = radeon_drm_ioctl,
> >> .mmap = radeon_mmap,
> >> .poll = drm_poll,
> >> .read = drm_read,
> >> diff --git a/drivers/gpu/drm/radeon/radeon_drv.h
> >> b/drivers/gpu/drm/radeon/radeon_drv.h
> >> index b369d42..543dcfa 100644
> >> --- a/drivers/gpu/drm/radeon/radeon_drv.h
> >> +++ b/drivers/gpu/drm/radeon/radeon_drv.h
> >> @@ -113,6 +113,9 @@
> >> #define DRIVER_MINOR 33
> >> #define DRIVER_PATCHLEVEL 0
> >>
> >> +long radeon_drm_ioctl(struct file *filp,
> >> + unsigned int cmd, unsigned long arg);
> >> +
> >> /* The rest of the file is DEPRECATED! */
> >> #ifdef CONFIG_DRM_RADEON_UMS
> >>
> >> diff --git a/drivers/gpu/drm/radeon/radeon_ioc32.c
> >> b/drivers/gpu/drm/radeon/radeon_ioc32.c
> >> index c180df8..bdb0f93 100644
> >> --- a/drivers/gpu/drm/radeon/radeon_ioc32.c
> >> +++ b/drivers/gpu/drm/radeon/radeon_ioc32.c
> >> @@ -418,7 +418,7 @@ long radeon_kms_compat_ioctl(struct file *filp,
> >> unsigned int cmd, unsigned long
> >> if (nr < DRM_COMMAND_BASE)
> >> return drm_compat_ioctl(filp, cmd, arg);
> >>
> >> - ret = drm_ioctl(filp, cmd, arg);
> >> + ret = radeon_drm_ioctl(filp, cmd, arg);
> >>
> >> return ret;
> >> }
> >> diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c
> >> b/drivers/gpu/drm/radeon/radeon_irq_kms.c
> >> index cc9e848..ec6240b 100644
> >> --- a/drivers/gpu/drm/radeon/radeon_irq_kms.c
> >> +++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c
> >> @@ -32,6 +32,8 @@
> >> #include "radeon.h"
> >> #include "atom.h"
> >>
> >> +#include
> >> +
> >> #define RADEON_WAIT_IDLE_TIMEOUT 200
> >>
> >> /**
> >> @@ -47,8 +49,12 @@ irqreturn_t
> radeon_driver_irq_handler_kms(DRM_IRQ_ARGS)
> >> {
> >> struct drm_device *dev = (struct drm_device *) arg;
> >> struct radeon_device *rdev = dev->dev_private;
> >> + irqreturn_t ret;
> >>
> >> - return radeon_irq_process(rdev);
> >> + ret = radeon_irq_process(rdev);
> >> + if (ret == IRQ_HANDLED)
> >> + pm_runtime_mark_last_busy(dev->dev);
> >> + return ret;
> >> }
> >>
> >> /*
> >> diff --git a/drivers/gpu/drm/radeon/radeon_kms.c
> >> b/drivers/gpu/drm/radeon/radeon_kms.c
> >> index 61580dd..b51 100644
> >> --- a/drivers/gpu/drm/radeon/radeon_kms.c
> >> +++ b/drivers/gpu/drm/radeon/radeon_kms.c
> >> @@ -32,7 +32,7 @@
> >>
> >> #include
> >> #include
> >> -
> >> +#include
> >> /**
> >> * radeon_driver_unload_kms - Main unload function for KMS.
> >> *
> >> @@ -50,9 +50,14 @@ int radeon_driver_unload_kms(struct drm_device *dev)
> >>
> >> if (rdev == NULL)
> >> return 0;
> >> +
> >> if (rdev->rmmio == NULL)
> >> goto done_free;
> >> +
> >> + pm_runtime_get_sync(dev->dev);
> >> +
> >> radeon_acpi_fini(rdev);
> >> +
> >> radeon_modeset_fini(rdev);
> >> radeon_device_fini(rdev);
> >>
> >> @@ -125,9 +130,20 @@ int radeon_driver_load_kms(struct drm_device *dev,
> >> unsigned long flags)
> >> "Error during ACPI methods call\n");
> >> }
> >>
> >> + if (radeon_runtime_pm != 0) {
> >> + pm_runtime_use_autosuspend(dev->dev);
> >> + pm_runtime_set_autosuspend_delay(dev->dev, 5000);
> >> + pm_runtime_set_active(dev->dev);
> >> + pm_runtime_allow(dev->dev);
> >> + pm_runtime_mark_last_busy(dev->dev);
> >> + pm_runtime_put_autosuspend(dev->dev);
> >> + }
> >> +
> >> out:
> >> if (r)
> >> radeon_driver_unload_kms(dev);
> >> +
> >> +
> >> return r;
> >> }
> >>
> >> @@ -475,9 +491,14 @@ void radeon_driver_lastclose_kms(struct drm_device
> >> *dev)
> >> int radeon_driver_open_kms(struct drm_device *dev, struct drm_file
> >> *file_priv)
> >> {
> >> struct radeon_device *rdev = dev->dev_private;
> >> + int r;
> >>
> >> file_priv->driver_priv = NULL;
> >>
> >> + r = pm_runtime_get_sync(dev->dev);
> >> + if (r < 0)
> >> + return r;
> >> +
> >> /* new gpu have virtual address space support */
> >> if (rdev->family >= CHIP_CAYMAN) {
> >> struct radeon_fpriv *fpriv;
> >> @@ -506,6 +527,9 @@ int radeon_driver_open_kms(struct drm_device *dev,
> >> struct drm_file *file_priv)
> >>
> >> file_priv->driver_priv = fpriv;
> >> }
> >> +
> >> + pm_runtime_mark_last_busy(dev->dev);
> >> + pm_runtime_put_autosuspend(dev->dev);
> >> return 0;
> >> }
> >>
> >> --
> >> 1.8.3.1
> >>
> >> ___
> >> dri-devel mailing list
> >> dri-devel at lists.freedesktop.org
> >> http://lists.freedesktop.org/mailman/listinfo/dri-devel
> >
> >
>
-- next part --
An HTML attachment was scrubbed...
URL:
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130920/d5d3b5d7/attachment-0001.html>
gt;> >> struct drm_device *drm_dev = pci_get_drvdata(pdev);
> >> >> - return radeon_resume_kms(drm_dev, 0);
> >> >> + return radeon_resume_kms(drm_dev, false, true);
> >> >> +}
> >> >> +
> >> >> +static int radeon_pmops_runtime_suspend(struct device *dev)
> >> >> +{
> >> >> + struct pci_dev *pdev = to_pci_dev(dev);
> >> >> + struct drm_device *drm_dev = pci_get_drvdata(pdev);
> >> >> + int ret;
> >> >> +
> >> >> + if (radeon_runtime_pm == 0)
> >> >> + return -EINVAL;
> >> >> +
> >> >> + drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
> >> >> + drm_kms_helper_poll_disable(drm_dev);
> >> >> + vga_switcheroo_set_dynamic_switch(pdev, VGA_SWITCHEROO_OFF);
> >> >> +
> >> >> + ret = radeon_suspend_kms(drm_dev, false, false);
> >> >> + pci_save_state(pdev);
> >> >> + pci_disable_device(pdev);
> >> >> + pci_set_power_state(pdev, PCI_D3cold);
> >> >> + drm_dev->switch_power_state = DRM_SWITCH_POWER_DYNAMIC_OFF;
> >> >> +
> >> >> + return 0;
> >> >> +}
> >> >> +
> >> >> +static int radeon_pmops_runtime_resume(struct device *dev)
> >> >> +{
> >> >> + struct pci_dev *pdev = to_pci_dev(dev);
> >> >> + struct drm_device *drm_dev = pci_get_drvdata(pdev);
> >> >> + int ret;
> >> >> +
> >> >> + if (radeon_runtime_pm == 0)
> >> >> + return -EINVAL;
> >> >> +
> >> >> + drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
> >> >> +
> >> >> + pci_set_power_state(pdev, PCI_D0);
> >> >> + pci_restore_state(pdev);
> >> >> + ret = pci_enable_device(pdev);
> >> >> + if (ret)
> >> >> + return ret;
> >> >> + pci_set_master(pdev);
> >> >> +
> >> >> + ret = radeon_resume_kms(drm_dev, false, false);
> >> >> + drm_kms_helper_poll_enable(drm_dev);
> >> >> + vga_switcheroo_set_dynamic_switch(pdev, VGA_SWITCHEROO_ON);
> >> >> + drm_dev->switch_power_state = DRM_SWITCH_POWER_ON;
> >> >> + return 0;
> >> >> +}
> >> >> +
> >> >> +static int radeon_pmops_runtime_idle(struct device *dev)
> >> >> +{
> >> >> + struct pci_dev *pdev = to_pci_dev(dev);
> >> >> + struct drm_device *drm_dev = pci_get_drvdata(pdev);
> >> >> + struct drm_crtc *crtc;
> >> >> +
> >> >> + if (radeon_runtime_pm == 0)
> >> >> + return -EBUSY;
> >> >> +
> >> >> + /* are we PX enabled? */
> >> >> + if (radeon_runtime_pm == -1 && !radeon_is_px()) {
> >> >> + DRM_DEBUG_DRIVER("failing to power off - not px\n");
> >> >> + return -EBUSY;
> >> >> + }
> >> >> +
> >> >> + list_for_each_entry(crtc, _dev->mode_config.crtc_list,
> >> >> head) {
> >> >> + if (crtc->enabled) {
> >> >> + DRM_DEBUG_DRIVER("failing to power off - crtc
> >> >> active\n");
> >> >> + return -EBUSY;
> >> >> + }
> >> >> + }
> >> >> +
> >> >> + pm_runtime_mark_last_busy(dev);
> >> >> + pm_runtime_autosuspend(dev);
> >> >> + /* we don't want the main rpm_idle to call suspend - we want
> to
> >> >> autosuspend */
> >> >> + return 1;
> >> >> +}
> >> >> +
> >> >> +long radeon_drm_ioctl(struct file *filp,
> >> >> + unsigned int cmd, unsigned long arg)
> >> >> +{
> >> >> + struct drm_file *file_priv = filp->private_data;
> >> >> + struct drm_device *dev;
> >> >> + long ret;
> >> >> + dev = file_priv->minor->dev;
> >> >> + ret = pm_runtime_get_sync(dev->dev);
> >> >> + if (ret < 0)
> >> >> + return ret;
> >> >> +
> >> >> + ret = drm_ioctl(filp, cmd, arg);
> >> >> +
> >> >> + pm_runtime_mark_last_busy(dev->dev);
> >> >> + pm_runtime_put_autosuspend(dev->dev);
> >> >> + return ret;
> >> >> }
> >> >>
> >> >> static const struct dev_pm_ops radeon_pm_ops = {
> >> >> @@ -388,13 +489,16 @@ static const struct dev_pm_ops radeon_pm_ops =
> {
> >> >> .thaw = radeon_pmops_thaw,
> >> >> .poweroff = radeon_pmops_freeze,
> >> >> .restore = radeon_pmops_resume,
> >> >> + .runtime_suspend = radeon_pmops_runtime_suspend,
> >> >> + .runtime_resume = radeon_pmops_runtime_resume,
> >> >> + .runtime_idle = radeon_pmops_runtime_idle,
> >> >> };
> >> >>
> >> >> static const struct file_operations radeon_driver_kms_fops = {
> >> >> .owner = THIS_MODULE,
> >> >> .open = drm_open,
> >> >> .release = drm_release,
> >> >> - .unlocked_ioctl = drm_ioctl,
> >> >> + .unlocked_ioctl = radeon_drm_ioctl,
> >> >> .mmap = radeon_mmap,
> >> >> .poll = drm_poll,
> >> >> .read = drm_read,
> >> >> diff --git a/drivers/gpu/drm/radeon/radeon_drv.h
> >> >> b/drivers/gpu/drm/radeon/radeon_drv.h
> >> >> index b369d42..543dcfa 100644
> >> >> --- a/drivers/gpu/drm/radeon/radeon_drv.h
> >> >> +++ b/drivers/gpu/drm/radeon/radeon_drv.h
> >> >> @@ -113,6 +113,9 @@
> >> >> #define DRIVER_MINOR 33
> >> >> #define DRIVER_PATCHLEVEL 0
> >> >>
> >> >> +long radeon_drm_ioctl(struct file *filp,
> >> >> + unsigned int cmd, unsigned long arg);
> >> >> +
> >> >> /* The rest of the file is DEPRECATED! */
> >> >> #ifdef CONFIG_DRM_RADEON_UMS
> >> >>
> >> >> diff --git a/drivers/gpu/drm/radeon/radeon_ioc32.c
> >> >> b/drivers/gpu/drm/radeon/radeon_ioc32.c
> >> >> index c180df8..bdb0f93 100644
> >> >> --- a/drivers/gpu/drm/radeon/radeon_ioc32.c
> >> >> +++ b/drivers/gpu/drm/radeon/radeon_ioc32.c
> >> >> @@ -418,7 +418,7 @@ long radeon_kms_compat_ioctl(struct file *filp,
> >> >> unsigned int cmd, unsigned long
> >> >> if (nr < DRM_COMMAND_BASE)
> >> >> return drm_compat_ioctl(filp, cmd, arg);
> >> >>
> >> >> - ret = drm_ioctl(filp, cmd, arg);
> >> >> + ret = radeon_drm_ioctl(filp, cmd, arg);
> >> >>
> >> >> return ret;
> >> >> }
> >> >> diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c
> >> >> b/drivers/gpu/drm/radeon/radeon_irq_kms.c
> >> >> index cc9e848..ec6240b 100644
> >> >> --- a/drivers/gpu/drm/radeon/radeon_irq_kms.c
> >> >> +++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c
> >> >> @@ -32,6 +32,8 @@
> >> >> #include "radeon.h"
> >> >> #include "atom.h"
> >> >>
> >> >> +#include
> >> >> +
> >> >> #define RADEON_WAIT_IDLE_TIMEOUT 200
> >> >>
> >> >> /**
> >> >> @@ -47,8 +49,12 @@ irqreturn_t
> >> >> radeon_driver_irq_handler_kms(DRM_IRQ_ARGS)
> >> >> {
> >> >> struct drm_device *dev = (struct drm_device *) arg;
> >> >> struct radeon_device *rdev = dev->dev_private;
> >> >> + irqreturn_t ret;
> >> >>
> >> >> - return radeon_irq_process(rdev);
> >> >> + ret = radeon_irq_process(rdev);
> >> >> + if (ret == IRQ_HANDLED)
> >> >> + pm_runtime_mark_last_busy(dev->dev);
> >> >> + return ret;
> >> >> }
> >> >>
> >> >> /*
> >> >> diff --git a/drivers/gpu/drm/radeon/radeon_kms.c
> >> >> b/drivers/gpu/drm/radeon/radeon_kms.c
> >> >> index 61580dd..b51 100644
> >> >> --- a/drivers/gpu/drm/radeon/radeon_kms.c
> >> >> +++ b/drivers/gpu/drm/radeon/radeon_kms.c
> >> >> @@ -32,7 +32,7 @@
> >> >>
> >> >> #include
> >> >> #include
> >> >> -
> >> >> +#include
> >> >> /**
> >> >> * radeon_driver_unload_kms - Main unload function for KMS.
> >> >> *
> >> >> @@ -50,9 +50,14 @@ int radeon_driver_unload_kms(struct drm_device
> *dev)
> >> >>
> >> >> if (rdev == NULL)
> >> >> return 0;
> >> >> +
> >> >> if (rdev->rmmio == NULL)
> >> >> goto done_free;
> >> >> +
> >> >> + pm_runtime_get_sync(dev->dev);
> >> >> +
> >> >> radeon_acpi_fini(rdev);
> >> >> +
> >> >> radeon_modeset_fini(rdev);
> >> >> radeon_device_fini(rdev);
> >> >>
> >> >> @@ -125,9 +130,20 @@ int radeon_driver_load_kms(struct drm_device
> *dev,
> >> >> unsigned long flags)
> >> >> "Error during ACPI methods call\n");
> >> >> }
> >> >>
> >> >> + if (radeon_runtime_pm != 0) {
> >> >> + pm_runtime_use_autosuspend(dev->dev);
> >> >> + pm_runtime_set_autosuspend_delay(dev->dev, 5000);
> >> >> + pm_runtime_set_active(dev->dev);
> >> >> + pm_runtime_allow(dev->dev);
> >> >> + pm_runtime_mark_last_busy(dev->dev);
> >> >> + pm_runtime_put_autosuspend(dev->dev);
> >> >> + }
> >> >> +
> >> >> out:
> >> >> if (r)
> >> >> radeon_driver_unload_kms(dev);
> >> >> +
> >> >> +
> >> >> return r;
> >> >> }
> >> >>
> >> >> @@ -475,9 +491,14 @@ void radeon_driver_lastclose_kms(struct
> drm_device
> >> >> *dev)
> >> >> int radeon_driver_open_kms(struct drm_device *dev, struct drm_file
> >> >> *file_priv)
> >> >> {
> >> >> struct radeon_device *rdev = dev->dev_private;
> >> >> + int r;
> >> >>
> >> >> file_priv->driver_priv = NULL;
> >> >>
> >> >> + r = pm_runtime_get_sync(dev->dev);
> >> >> + if (r < 0)
> >> >> + return r;
> >> >> +
> >> >> /* new gpu have virtual address space support */
> >> >> if (rdev->family >= CHIP_CAYMAN) {
> >> >> struct radeon_fpriv *fpriv;
> >> >> @@ -506,6 +527,9 @@ int radeon_driver_open_kms(struct drm_device
> *dev,
> >> >> struct drm_file *file_priv)
> >> >>
> >> >> file_priv->driver_priv = fpriv;
> >> >> }
> >> >> +
> >> >> + pm_runtime_mark_last_busy(dev->dev);
> >> >> + pm_runtime_put_autosuspend(dev->dev);
> >> >> return 0;
> >> >> }
> >> >>
> >> >> --
> >> >> 1.8.3.1
> >> >>
> >> >> ___
> >> >> dri-devel mailing list
> >> >> dri-devel at lists.freedesktop.org
> >> >> http://lists.freedesktop.org/mailman/listinfo/dri-devel
> >> >
> >> >
>
-- next part --
An HTML attachment was scrubbed...
URL:
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130920/f1b1262c/attachment-0001.html>
gt;> >> struct drm_device *drm_dev = pci_get_drvdata(pdev);
> >> >> - return radeon_resume_kms(drm_dev, 0);
> >> >> + return radeon_resume_kms(drm_dev, false, true);
> >> >> +}
> >> >> +
> >> >> +static int radeon_pmops_runtime_suspend(struct device *dev)
> >> >> +{
> >> >> + struct pci_dev *pdev = to_pci_dev(dev);
> >> >> + struct drm_device *drm_dev = pci_get_drvdata(pdev);
> >> >> + int ret;
> >> >> +
> >> >> + if (radeon_runtime_pm == 0)
> >> >> + return -EINVAL;
> >> >> +
> >> >> + drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
> >> >> + drm_kms_helper_poll_disable(drm_dev);
> >> >> + vga_switcheroo_set_dynamic_switch(pdev, VGA_SWITCHEROO_OFF);
> >> >> +
> >> >> + ret = radeon_suspend_kms(drm_dev, false, false);
> >> >> + pci_save_state(pdev);
> >> >> + pci_disable_device(pdev);
> >> >> + pci_set_power_state(pdev, PCI_D3cold);
> >> >> + drm_dev->switch_power_state = DRM_SWITCH_POWER_DYNAMIC_OFF;
> >> >> +
> >> >> + return 0;
> >> >> +}
> >> >> +
> >> >> +static int radeon_pmops_runtime_resume(struct device *dev)
> >> >> +{
> >> >> + struct pci_dev *pdev = to_pci_dev(dev);
> >> >> + struct drm_device *drm_dev = pci_get_drvdata(pdev);
> >> >> + int ret;
> >> >> +
> >> >> + if (radeon_runtime_pm == 0)
> >> >> + return -EINVAL;
> >> >> +
> >> >> + drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
> >> >> +
> >> >> + pci_set_power_state(pdev, PCI_D0);
> >> >> + pci_restore_state(pdev);
> >> >> + ret = pci_enable_device(pdev);
> >> >> + if (ret)
> >> >> + return ret;
> >> >> + pci_set_master(pdev);
> >> >> +
> >> >> + ret = radeon_resume_kms(drm_dev, false, false);
> >> >> + drm_kms_helper_poll_enable(drm_dev);
> >> >> + vga_switcheroo_set_dynamic_switch(pdev, VGA_SWITCHEROO_ON);
> >> >> + drm_dev->switch_power_state = DRM_SWITCH_POWER_ON;
> >> >> + return 0;
> >> >> +}
> >> >> +
> >> >> +static int radeon_pmops_runtime_idle(struct device *dev)
> >> >> +{
> >> >> + struct pci_dev *pdev = to_pci_dev(dev);
> >> >> + struct drm_device *drm_dev = pci_get_drvdata(pdev);
> >> >> + struct drm_crtc *crtc;
> >> >> +
> >> >> + if (radeon_runtime_pm == 0)
> >> >> + return -EBUSY;
> >> >> +
> >> >> + /* are we PX enabled? */
> >> >> + if (radeon_runtime_pm == -1 && !radeon_is_px()) {
> >> >> + DRM_DEBUG_DRIVER("failing to power off - not px\n");
> >> >> + return -EBUSY;
> >> >> + }
> >> >> +
> >> >> + list_for_each_entry(crtc, _dev->mode_config.crtc_list,
> >> >> head) {
> >> >> + if (crtc->enabled) {
> >> >> + DRM_DEBUG_DRIVER("failing to power off - crtc
> >> >> active\n");
> >> >> + return -EBUSY;
> >> >> + }
> >> >> + }
> >> >> +
> >> >> + pm_runtime_mark_last_busy(dev);
> >> >> + pm_runtime_autosuspend(dev);
> >> >> + /* we don't want the main rpm_idle to call suspend - we want
> to
> >> >> autosuspend */
> >> >> + return 1;
> >> >> +}
> >> >> +
> >> >> +long radeon_drm_ioctl(struct file *filp,
> >> >> + unsigned int cmd, unsigned long arg)
> >> >> +{
> >> >> + struct drm_file *file_priv = filp->private_data;
> >> >> + struct drm_device *dev;
> >> >> + long ret;
> >> >> + dev = file_priv->minor->dev;
> >> >> + ret = pm_runtime_get_sync(dev->dev);
> >> >> + if (ret < 0)
> >> >> + return ret;
> >> >> +
> >> >> + ret = drm_ioctl(filp, cmd, arg);
> >> >> +
> >> >> + pm_runtime_mark_last_busy(dev->dev);
> >> >> + pm_runtime_put_autosuspend(dev->dev);
> >> >> + return ret;
> >> >> }
> >> >>
> >> >> static const struct dev_pm_ops radeon_pm_ops = {
> >> >> @@ -388,13 +489,16 @@ static const struct dev_pm_ops radeon_pm_ops =
> {
> >> >> .thaw = radeon_pmops_thaw,
> >> >> .poweroff = radeon_pmops_freeze,
> >> >> .restore = radeon_pmops_resume,
> >> >> + .runtime_suspend = radeon_pmops_runtime_suspend,
> >> >> + .runtime_resume = radeon_pmops_runtime_resume,
> >> >> + .runtime_idle = radeon_pmops_runtime_idle,
> >> >> };
> >> >>
> >> >> static const struct file_operations radeon_driver_kms_fops = {
> >> >> .owner = THIS_MODULE,
> >> >> .open = drm_open,
> >> >> .release = drm_release,
> >> >> - .unlocked_ioctl = drm_ioctl,
> >> >> + .unlocked_ioctl = radeon_drm_ioctl,
> >> >> .mmap = radeon_mmap,
> >> >> .poll = drm_poll,
> >> >> .read = drm_read,
> >> >> diff --git a/drivers/gpu/drm/radeon/radeon_drv.h
> >> >> b/drivers/gpu/drm/radeon/radeon_drv.h
> >> >> index b369d42..543dcfa 100644
> >> >> --- a/drivers/gpu/drm/radeon/radeon_drv.h
> >> >> +++ b/drivers/gpu/drm/radeon/radeon_drv.h
> >> >> @@ -113,6 +113,9 @@
> >> >> #define DRIVER_MINOR 33
> >> >> #define DRIVER_PATCHLEVEL 0
> >> >>
> >> >> +long radeon_drm_ioctl(struct file *filp,
> >> >> + unsigned int cmd, unsigned long arg);
> >> >> +
> >> >> /* The rest of the file is DEPRECATED! */
> >> >> #ifdef CONFIG_DRM_RADEON_UMS
> >> >>
> >> >> diff --git a/drivers/gpu/drm/radeon/radeon_ioc32.c
> >> >> b/drivers/gpu/drm/radeon/radeon_ioc32.c
> >> >> index c180df8..bdb0f93 100644
> >> >> --- a/drivers/gpu/drm/radeon/radeon_ioc32.c
> >> >> +++ b/drivers/gpu/drm/radeon/radeon_ioc32.c
> >> >> @@ -418,7 +418,7 @@ long radeon_kms_compat_ioctl(struct file *filp,
> >> >> unsigned int cmd, unsigned long
> >> >> if (nr < DRM_COMMAND_BASE)
> >> >> return drm_compat_ioctl(filp, cmd, arg);
> >> >>
> >> >> - ret = drm_ioctl(filp, cmd, arg);
> >> >> + ret = radeon_drm_ioctl(filp, cmd, arg);
> >> >>
> >> >> return ret;
> >> >> }
> >> >> diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c
> >> >> b/drivers/gpu/drm/radeon/radeon_irq_kms.c
> >> >> index cc9e848..ec6240b 100644
> >> >> --- a/drivers/gpu/drm/radeon/radeon_irq_kms.c
> >> >> +++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c
> >> >> @@ -32,6 +32,8 @@
> >> >> #include "radeon.h"
> >> >> #include "atom.h"
> >> >>
> >> >> +#include
> >> >> +
> >> >> #define RADEON_WAIT_IDLE_TIMEOUT 200
> >> >>
> >> >> /**
> >> >> @@ -47,8 +49,12 @@ irqreturn_t
> >> >> radeon_driver_irq_handler_kms(DRM_IRQ_ARGS)
> >> >> {
> >> >> struct drm_device *dev = (struct drm_device *) arg;
> >> >> struct radeon_device *rdev = dev->dev_private;
> >> >> + irqreturn_t ret;
> >> >>
> >> >> - return radeon_irq_process(rdev);
> >> >> + ret = radeon_irq_process(rdev);
> >> >> + if (ret == IRQ_HANDLED)
> >> >> + pm_runtime_mark_last_busy(dev->dev);
> >> >> + return ret;
> >> >> }
> >> >>
> >> >> /*
> >> >> diff --git a/drivers/gpu/drm/radeon/radeon_kms.c
> >> >> b/drivers/gpu/drm/radeon/radeon_kms.c
> >> >> index 61580dd..b51 100644
> >> >> --- a/drivers/gpu/drm/radeon/radeon_kms.c
> >> >> +++ b/drivers/gpu/drm/radeon/radeon_kms.c
> >> >> @@ -32,7 +32,7 @@
> >> >>
> >> >> #include
> >> >> #include
> >> >> -
> >> >> +#include
> >> >> /**
> >> >> * radeon_driver_unload_kms - Main unload function for KMS.
> >> >> *
> >> >> @@ -50,9 +50,14 @@ int radeon_driver_unload_kms(struct drm_device
> *dev)
> >> >>
> >> >> if (rdev == NULL)
> >> >> return 0;
> >> >> +
> >> >> if (rdev->rmmio == NULL)
> >> >> goto done_free;
> >> >> +
> >> >> + pm_runtime_get_sync(dev->dev);
> >> >> +
> >> >> radeon_acpi_fini(rdev);
> >> >> +
> >> >> radeon_modeset_fini(rdev);
> >> >> radeon_device_fini(rdev);
> >> >>
> >> >> @@ -125,9 +130,20 @@ int radeon_driver_load_kms(struct drm_device
> *dev,
> >> >> unsigned long flags)
> >> >> "Error during ACPI methods call\n");
> >> >> }
> >> >>
> >> >> + if (radeon_runtime_pm != 0) {
> >> >> + pm_runtime_use_autosuspend(dev->dev);
> >> >> + pm_runtime_set_autosuspend_delay(dev->dev, 5000);
> >> >> + pm_runtime_set_active(dev->dev);
> >> >> + pm_runtime_allow(dev->dev);
> >> >> + pm_runtime_mark_last_busy(dev->dev);
> >> >> + pm_runtime_put_autosuspend(dev->dev);
> >> >> + }
> >> >> +
> >> >> out:
> >> >> if (r)
> >> >> radeon_driver_unload_kms(dev);
> >> >> +
> >> >> +
> >> >> return r;
> >> >> }
> >> >>
> >> >> @@ -475,9 +491,14 @@ void radeon_driver_lastclose_kms(struct
> drm_device
> >> >> *dev)
> >> >> int radeon_driver_open_kms(struct drm_device *dev, struct drm_file
> >> >> *file_priv)
> >> >> {
> >> >> struct radeon_device *rdev = dev->dev_private;
> >> >> + int r;
> >> >>
> >> >> file_priv->driver_priv = NULL;
> >> >>
> >> >> + r = pm_runtime_get_sync(dev->dev);
> >> >> + if (r < 0)
> >> >> + return r;
> >> >> +
> >> >> /* new gpu have virtual address space support */
> >> >> if (rdev->family >= CHIP_CAYMAN) {
> >> >> struct radeon_fpriv *fpriv;
> >> >> @@ -506,6 +527,9 @@ int radeon_driver_open_kms(struct drm_device
> *dev,
> >> >> struct drm_file *file_priv)
> >> >>
> >> >> file_priv->driver_priv = fpriv;
> >> >> }
> >> >> +
> >> >> + pm_runtime_mark_last_busy(dev->dev);
> >> >> + pm_runtime_put_autosuspend(dev->dev);
> >> >> return 0;
> >> >> }
> >> >>
> >> >> --
> >> >> 1.8.3.1
> >> >>
> >> >> ___
> >> >> dri-devel mailing list
> >> >> dri-devel at lists.freedesktop.org
> >> >> http://lists.freedesktop.org/mailman/listinfo/dri-devel
> >> >
> >> >
>
-- next part --
An HTML attachment was scrubbed...
URL:
<http://lists.freedesktop.org/archives/dri-devel/attachments/20130920/3dc8b580/attachment-0001.html>
60 matches
Mail list logo