All of lore.kernel.org
 help / color / mirror / Atom feed
* Enable vblank_disable_immediate on more drivers.
@ 2017-06-21  1:44 Mario Kleiner
       [not found] ` <20170621014457.26587-1-mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Mario Kleiner @ 2017-06-21  1:44 UTC (permalink / raw)
  To: dri-devel; +Cc: nouveau, amd-gfx

This patch series sets dev->vblank_disable_immediate = true on
radeon/amdgpu-kms, nouveau-kms for nv50+, and vc4 for the real
kms driver (as opposed to dispmanx firmware backed kms).

All the drivers should be ready in theory, given their implementation,
for fast vblank disable/enable. In practice, i have performed timing
tests with my measurement equipment for all those drivers with the
current 4.12.0-rc5 based drm-next tree, and the rpi-4.12.0-rc5
Raspberry Pi kernel tree under Raspian during the last days, and
everything seems to work fine.

Thanks to Chris Wilsons nice vblank on/off/query optimizations from
Linux 4.12 this should now generally be a win for power saving without
degradation in performance, so time to flip the switch on and see if
it works out on non-Intel gpu's as well.

One restriction for vc4: I couldn't test yet if this could cause
any trouble for the vc4-fkms-v3d devicetree binding, using the firmware
based kms path. For some reason the rpi-4.12-rc5 kernel never makes it
to a working display if i choose vc4-fkms-v3d instead of vc4-kms-v3d dt.
This also happens with the unpatched kernel, so is not related to this
patch, but with a black screen, dead network and nothing logged in any log,
i gave up debugging this atm. Just to say, that path is untested, only
the proper kms driver is successfully tested.

thanks,
-mario

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH 1/4] drm/vc4: Allow vblank_disable_immediate on non-fw-kms.
       [not found] ` <20170621014457.26587-1-mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2017-06-21  1:44   ` Mario Kleiner
       [not found]     ` <20170621014457.26587-2-mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2017-06-21  1:44   ` [PATCH 2/4] drm/radeon: Allow vblank_disable_immediate Mario Kleiner
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 11+ messages in thread
From: Mario Kleiner @ 2017-06-21  1:44 UTC (permalink / raw)
  To: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	eric-WhKQ6XTQaPysTnJN9+BGXg

With instantaneous high precision vblank timestamping
that updates at leading edge of vblank, the emulated
"hw vblank counter" from vblank timestamping which
increments at leading edge of vblank, and reliable
page flip execution and completion at leading edge
of vblank, we should meet the requirements for fast
vblank irq disable/enable.

Testing against rpi-4.12-rc5 Linux kernel with timing
measurement equipment indicates this works fine,
so allow immediate vblank disable for power saving.

For debugging in case of unexpected trouble, booting
with kernel cmdline option drm.vblankoffdelay=0
would keep vblank irqs on to approximate old behavior.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Cc: Eric Anholt <eric@anholt.net>
---
 drivers/gpu/drm/vc4/vc4_kms.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c
index 928d191..70c4e17 100644
--- a/drivers/gpu/drm/vc4/vc4_kms.c
+++ b/drivers/gpu/drm/vc4/vc4_kms.c
@@ -216,6 +216,10 @@ int vc4_kms_load(struct drm_device *dev)
 
 	sema_init(&vc4->async_modeset, 1);
 
+	/* Set support for vblank irq fast disable, before drm_vblank_init() */
+	if (!vc4->firmware_kms)
+		dev->vblank_disable_immediate = true;
+
 	ret = drm_vblank_init(dev, dev->mode_config.num_crtc);
 	if (ret < 0) {
 		dev_err(dev->dev, "failed to initialize vblank\n");
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 2/4] drm/radeon: Allow vblank_disable_immediate.
       [not found] ` <20170621014457.26587-1-mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2017-06-21  1:44   ` [PATCH 1/4] drm/vc4: Allow vblank_disable_immediate on non-fw-kms Mario Kleiner
@ 2017-06-21  1:44   ` Mario Kleiner
       [not found]     ` <20170621014457.26587-3-mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2017-06-21  1:44   ` [PATCH 3/4] drm/amdgpu: " Mario Kleiner
  2017-06-21  1:44   ` [PATCH 4/4] drm/nouveau/kms/nv50-: " Mario Kleiner
  3 siblings, 1 reply; 11+ messages in thread
From: Mario Kleiner @ 2017-06-21  1:44 UTC (permalink / raw)
  To: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w,
	nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Michel Dänzer,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	eric-WhKQ6XTQaPysTnJN9+BGXg, Alex Deucher

With instantaneous high precision vblank timestamping
that updates at leading edge of vblank, a cooked hw
vblank counter which increments at leading edge of
vblank, and reliable page flip execution and completion
at leading edge of vblank, we should meet the requirements
for fast/immediate vblank irq disable/enable.

Testing on Linux-4.12-rc5 + drm-next on a Radeon HD 5770
(DCE 4) with timing measurement equipment indicates this
works fine, so allow immediate vblank disable for power
saving.

For debugging in case of unexpected trouble, booting
with kernel cmdline option drm.vblankoffdelay=0
(or echo 0 > /sys/module/drm/parameters/vblankoffdelay)
would keep vblank irqs permanently on to approximate old
behavior.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Michel Dänzer <michel.daenzer@amd.com>
---
 drivers/gpu/drm/radeon/radeon_irq_kms.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/radeon/radeon_irq_kms.c b/drivers/gpu/drm/radeon/radeon_irq_kms.c
index 7aacb44..1860764 100644
--- a/drivers/gpu/drm/radeon/radeon_irq_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c
@@ -283,6 +283,10 @@ int radeon_irq_kms_init(struct radeon_device *rdev)
 	int r = 0;
 
 	spin_lock_init(&rdev->irq.lock);
+
+	/* Disable vblank irqs aggressively for power-saving */
+	rdev->ddev->vblank_disable_immediate = true;
+
 	r = drm_vblank_init(rdev->ddev, rdev->num_crtc);
 	if (r) {
 		return r;
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 3/4] drm/amdgpu: Allow vblank_disable_immediate.
       [not found] ` <20170621014457.26587-1-mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2017-06-21  1:44   ` [PATCH 1/4] drm/vc4: Allow vblank_disable_immediate on non-fw-kms Mario Kleiner
  2017-06-21  1:44   ` [PATCH 2/4] drm/radeon: Allow vblank_disable_immediate Mario Kleiner
@ 2017-06-21  1:44   ` Mario Kleiner
  2017-06-21  7:22     ` Michel Dänzer
  2017-06-21  1:44   ` [PATCH 4/4] drm/nouveau/kms/nv50-: " Mario Kleiner
  3 siblings, 1 reply; 11+ messages in thread
From: Mario Kleiner @ 2017-06-21  1:44 UTC (permalink / raw)
  To: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w,
	nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Michel Dänzer,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	eric-WhKQ6XTQaPysTnJN9+BGXg, Alex Deucher

With instantaneous high precision vblank timestamping
that updates at leading edge of vblank, a cooked hw
vblank counter which increments at leading edge of
vblank, and reliable page flip execution and completion
at leading edge of vblank, we should meet the requirements
for fast/immediate vblank irq disable/enable.

Testing on Linux-4.12-rc5 + drm-next on a Radeon R9 380
Tonga Pro (DCE 10) with timing measurement equipment
indicates this works fine, so allow immediate vblank
disable for power saving.

For debugging in case of unexpected trouble, booting
with kernel cmdline option drm.vblankoffdelay=0
(or echo 0 > /sys/module/drm/parameters/vblankoffdelay)
would keep vblank irqs permanently on to approximate old
behavior.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Michel Dänzer <michel.daenzer@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
index 62da6c5..a28f8aa 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
@@ -220,6 +220,10 @@ int amdgpu_irq_init(struct amdgpu_device *adev)
 	int r = 0;
 
 	spin_lock_init(&adev->irq.lock);
+
+	/* Disable vblank irqs aggressively for power-saving */
+	adev->ddev->vblank_disable_immediate = true;
+
 	r = drm_vblank_init(adev->ddev, adev->mode_info.num_crtc);
 	if (r) {
 		return r;
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH 4/4] drm/nouveau/kms/nv50-: Allow vblank_disable_immediate.
       [not found] ` <20170621014457.26587-1-mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
                     ` (2 preceding siblings ...)
  2017-06-21  1:44   ` [PATCH 3/4] drm/amdgpu: " Mario Kleiner
@ 2017-06-21  1:44   ` Mario Kleiner
  3 siblings, 0 replies; 11+ messages in thread
From: Mario Kleiner @ 2017-06-21  1:44 UTC (permalink / raw)
  To: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w, Ben Skeggs,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	eric-WhKQ6XTQaPysTnJN9+BGXg

With instantaneous high precision vblank timestamping
that updates at leading edge of vblank, the emulated
"hw vblank counter" from vblank timestamping, which
increments at leading edge of vblank, and reliable
page flip execution and completion at leading edge of
vblank, we should meet the requirements for fast/
immediate vblank irq disable/enable.

This is only allowed on nv50+ gpu's, ie. the ones with
atomic modesetting. One requirement for immediate vblank
disable is that high precision vblank timestamping works
reliably all the time on all connectors. This is not the
case on all pre-nv50 parts for analog VGA outputs, where we
currently don't always have support for scanout position
queries and therefore fall back to vblank interrupt
timestamping. The implementation in nv04_head_state() does
not return valid values for vblanks, vtotal, hblanks, htotal
for VGA outputs on all cards, but those are needed for scanout
position queries.

Testing on Linux-4.12-rc5 + drm-next on a GeForce 9500 GT
(NV G96) with timing measurement equipment indicates this
works fine, so allow immediate vblank disable for power
saving.

For debugging in case of unexpected trouble, booting
with kernel cmdline option drm.vblankoffdelay=0
(or echo 0 > /sys/module/drm/parameters/vblankoffdelay)
would keep vblank irqs permanently on to approximate old
behavior.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
---
 drivers/gpu/drm/nouveau/nv50_display.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c
index e3132a2..f2f2a7c 100644
--- a/drivers/gpu/drm/nouveau/nv50_display.c
+++ b/drivers/gpu/drm/nouveau/nv50_display.c
@@ -4495,6 +4495,9 @@ nv50_display_create(struct drm_device *dev)
 		connector->funcs->destroy(connector);
 	}
 
+	/* Disable vblank irqs aggressively for power-saving, safe on nv50+ */
+	dev->vblank_disable_immediate = true;
+
 out:
 	if (ret)
 		nv50_display_destroy(dev);
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/4] drm/amdgpu: Allow vblank_disable_immediate.
  2017-06-21  1:44   ` [PATCH 3/4] drm/amdgpu: " Mario Kleiner
@ 2017-06-21  7:22     ` Michel Dänzer
       [not found]       ` <423330d7-44ef-041a-2c76-c06731febc61-otUistvHUpPR7s880joybQ@public.gmane.org>
  0 siblings, 1 reply; 11+ messages in thread
From: Michel Dänzer @ 2017-06-21  7:22 UTC (permalink / raw)
  To: Mario Kleiner; +Cc: Alex Deucher, amd-gfx, dri-devel

On 21/06/17 10:44 AM, Mario Kleiner wrote:
> With instantaneous high precision vblank timestamping
> that updates at leading edge of vblank, a cooked hw
> vblank counter which increments at leading edge of
> vblank, and reliable page flip execution and completion
> at leading edge of vblank, we should meet the requirements
> for fast/immediate vblank irq disable/enable.
> 
> Testing on Linux-4.12-rc5 + drm-next on a Radeon R9 380
> Tonga Pro (DCE 10) with timing measurement equipment
> indicates this works fine, so allow immediate vblank
> disable for power saving.
> 
> For debugging in case of unexpected trouble, booting
> with kernel cmdline option drm.vblankoffdelay=0
> (or echo 0 > /sys/module/drm/parameters/vblankoffdelay)
> would keep vblank irqs permanently on to approximate old
> behavior.
> 
> Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: Michel Dänzer <michel.daenzer@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> index 62da6c5..a28f8aa 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
> @@ -220,6 +220,10 @@ int amdgpu_irq_init(struct amdgpu_device *adev)
>  	int r = 0;
>  
>  	spin_lock_init(&adev->irq.lock);
> +
> +	/* Disable vblank irqs aggressively for power-saving */
> +	adev->ddev->vblank_disable_immediate = true;
> +
>  	r = drm_vblank_init(adev->ddev, adev->mode_info.num_crtc);
>  	if (r) {
>  		return r;
> 

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 2/4] drm/radeon: Allow vblank_disable_immediate.
       [not found]     ` <20170621014457.26587-3-mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2017-06-21  7:23       ` Michel Dänzer
  0 siblings, 0 replies; 11+ messages in thread
From: Michel Dänzer @ 2017-06-21  7:23 UTC (permalink / raw)
  To: Mario Kleiner
  Cc: Alex Deucher, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

On 21/06/17 10:44 AM, Mario Kleiner wrote:
> With instantaneous high precision vblank timestamping
> that updates at leading edge of vblank, a cooked hw
> vblank counter which increments at leading edge of
> vblank, and reliable page flip execution and completion
> at leading edge of vblank, we should meet the requirements
> for fast/immediate vblank irq disable/enable.
> 
> Testing on Linux-4.12-rc5 + drm-next on a Radeon HD 5770
> (DCE 4) with timing measurement equipment indicates this
> works fine, so allow immediate vblank disable for power
> saving.
> 
> For debugging in case of unexpected trouble, booting
> with kernel cmdline option drm.vblankoffdelay=0
> (or echo 0 > /sys/module/drm/parameters/vblankoffdelay)
> would keep vblank irqs permanently on to approximate old
> behavior.
> 
> Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: Michel Dänzer <michel.daenzer@amd.com>

My only doubt is whether this is also reliable on older (e.g. pre-R600)
GPUs. For newer GPUs (tested on Kaveri):

Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/4] drm/vc4: Allow vblank_disable_immediate on non-fw-kms.
       [not found]     ` <20170621014457.26587-2-mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2017-06-21 16:19       ` Eric Anholt
       [not found]         ` <87r2ydco07.fsf-omZaPlIz5HhaEpDpdNBo/KxOck334EZe@public.gmane.org>
  2017-06-21 19:08       ` kbuild test robot
  1 sibling, 1 reply; 11+ messages in thread
From: Eric Anholt @ 2017-06-21 16:19 UTC (permalink / raw)
  To: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1017 bytes --]

Mario Kleiner <mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> With instantaneous high precision vblank timestamping
> that updates at leading edge of vblank, the emulated
> "hw vblank counter" from vblank timestamping which
> increments at leading edge of vblank, and reliable
> page flip execution and completion at leading edge
> of vblank, we should meet the requirements for fast
> vblank irq disable/enable.
>
> Testing against rpi-4.12-rc5 Linux kernel with timing
> measurement equipment indicates this works fine,
> so allow immediate vblank disable for power saving.
>
> For debugging in case of unexpected trouble, booting
> with kernel cmdline option drm.vblankoffdelay=0
> would keep vblank irqs on to approximate old behavior.
>
> Signed-off-by: Mario Kleiner <mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Cc: Eric Anholt <eric-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org>

If you can spin this against drm-misc-next instead of the downstream
tree, I can get it applied.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

[-- Attachment #2: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/4] drm/vc4: Allow vblank_disable_immediate on non-fw-kms.
       [not found]     ` <20170621014457.26587-2-mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2017-06-21 16:19       ` Eric Anholt
@ 2017-06-21 19:08       ` kbuild test robot
  1 sibling, 0 replies; 11+ messages in thread
From: kbuild test robot @ 2017-06-21 19:08 UTC (permalink / raw)
  To: Mario Kleiner
  Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, kbuild-all-JC7UmRfGjtg,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

[-- Attachment #1: Type: text/plain, Size: 1395 bytes --]

Hi Mario,

[auto build test ERROR on drm/drm-next]
[also build test ERROR on v4.12-rc6 next-20170621]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Mario-Kleiner/drm-vc4-Allow-vblank_disable_immediate-on-non-fw-kms/20170622-013723
base:   git://people.freedesktop.org/~airlied/linux.git drm-next
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/gpu//drm/vc4/vc4_kms.c: In function 'vc4_kms_load':
>> drivers/gpu//drm/vc4/vc4_kms.c:220:10: error: 'struct vc4_dev' has no member named 'firmware_kms'
     if (!vc4->firmware_kms)
             ^~

vim +220 drivers/gpu//drm/vc4/vc4_kms.c

   214		struct vc4_dev *vc4 = to_vc4_dev(dev);
   215		int ret;
   216	
   217		sema_init(&vc4->async_modeset, 1);
   218	
   219		/* Set support for vblank irq fast disable, before drm_vblank_init() */
 > 220		if (!vc4->firmware_kms)
   221			dev->vblank_disable_immediate = true;
   222	
   223		ret = drm_vblank_init(dev, dev->mode_config.num_crtc);

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 59315 bytes --]

[-- Attachment #3: Type: text/plain, Size: 154 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 3/4] drm/amdgpu: Allow vblank_disable_immediate.
       [not found]       ` <423330d7-44ef-041a-2c76-c06731febc61-otUistvHUpPR7s880joybQ@public.gmane.org>
@ 2017-06-21 22:15         ` Alex Deucher
  0 siblings, 0 replies; 11+ messages in thread
From: Alex Deucher @ 2017-06-21 22:15 UTC (permalink / raw)
  To: Michel Dänzer
  Cc: Alex Deucher, Mario Kleiner, Maling list - DRI developers, amd-gfx list

On Wed, Jun 21, 2017 at 3:22 AM, Michel Dänzer <michel@daenzer.net> wrote:
> On 21/06/17 10:44 AM, Mario Kleiner wrote:
>> With instantaneous high precision vblank timestamping
>> that updates at leading edge of vblank, a cooked hw
>> vblank counter which increments at leading edge of
>> vblank, and reliable page flip execution and completion
>> at leading edge of vblank, we should meet the requirements
>> for fast/immediate vblank irq disable/enable.
>>
>> Testing on Linux-4.12-rc5 + drm-next on a Radeon R9 380
>> Tonga Pro (DCE 10) with timing measurement equipment
>> indicates this works fine, so allow immediate vblank
>> disable for power saving.
>>
>> For debugging in case of unexpected trouble, booting
>> with kernel cmdline option drm.vblankoffdelay=0
>> (or echo 0 > /sys/module/drm/parameters/vblankoffdelay)
>> would keep vblank irqs permanently on to approximate old
>> behavior.
>>
>> Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
>> Cc: Alex Deucher <alexander.deucher@amd.com>
>> Cc: Michel Dänzer <michel.daenzer@amd.com>
>> ---
>>  drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 4 ++++
>>  1 file changed, 4 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>> index 62da6c5..a28f8aa 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
>> @@ -220,6 +220,10 @@ int amdgpu_irq_init(struct amdgpu_device *adev)
>>       int r = 0;
>>
>>       spin_lock_init(&adev->irq.lock);
>> +
>> +     /* Disable vblank irqs aggressively for power-saving */
>> +     adev->ddev->vblank_disable_immediate = true;
>> +
>>       r = drm_vblank_init(adev->ddev, adev->mode_info.num_crtc);
>>       if (r) {
>>               return r;
>>
>
> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>


Applied patches 2 and 3.

Thanks,

Alex

>
>
> --
> Earthling Michel Dänzer               |               http://www.amd.com
> Libre software enthusiast             |             Mesa and X developer
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH 1/4] drm/vc4: Allow vblank_disable_immediate on non-fw-kms.
       [not found]         ` <87r2ydco07.fsf-omZaPlIz5HhaEpDpdNBo/KxOck334EZe@public.gmane.org>
@ 2017-06-22  1:39           ` Mario Kleiner
  0 siblings, 0 replies; 11+ messages in thread
From: Mario Kleiner @ 2017-06-22  1:39 UTC (permalink / raw)
  To: Eric Anholt, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

On 06/21/2017 06:19 PM, Eric Anholt wrote:
> Mario Kleiner <mario.kleiner.de@gmail.com> writes:
> 
>> With instantaneous high precision vblank timestamping
>> that updates at leading edge of vblank, the emulated
>> "hw vblank counter" from vblank timestamping which
>> increments at leading edge of vblank, and reliable
>> page flip execution and completion at leading edge
>> of vblank, we should meet the requirements for fast
>> vblank irq disable/enable.
>>
>> Testing against rpi-4.12-rc5 Linux kernel with timing
>> measurement equipment indicates this works fine,
>> so allow immediate vblank disable for power saving.
>>
>> For debugging in case of unexpected trouble, booting
>> with kernel cmdline option drm.vblankoffdelay=0
>> would keep vblank irqs on to approximate old behavior.
>>
>> Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
>> Cc: Eric Anholt <eric@anholt.net>
> 
> If you can spin this against drm-misc-next instead of the downstream
> tree, I can get it applied.
> 

Done, thanks!
-mario
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2017-06-22  1:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-21  1:44 Enable vblank_disable_immediate on more drivers Mario Kleiner
     [not found] ` <20170621014457.26587-1-mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-06-21  1:44   ` [PATCH 1/4] drm/vc4: Allow vblank_disable_immediate on non-fw-kms Mario Kleiner
     [not found]     ` <20170621014457.26587-2-mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-06-21 16:19       ` Eric Anholt
     [not found]         ` <87r2ydco07.fsf-omZaPlIz5HhaEpDpdNBo/KxOck334EZe@public.gmane.org>
2017-06-22  1:39           ` Mario Kleiner
2017-06-21 19:08       ` kbuild test robot
2017-06-21  1:44   ` [PATCH 2/4] drm/radeon: Allow vblank_disable_immediate Mario Kleiner
     [not found]     ` <20170621014457.26587-3-mario.kleiner.de-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-06-21  7:23       ` Michel Dänzer
2017-06-21  1:44   ` [PATCH 3/4] drm/amdgpu: " Mario Kleiner
2017-06-21  7:22     ` Michel Dänzer
     [not found]       ` <423330d7-44ef-041a-2c76-c06731febc61-otUistvHUpPR7s880joybQ@public.gmane.org>
2017-06-21 22:15         ` Alex Deucher
2017-06-21  1:44   ` [PATCH 4/4] drm/nouveau/kms/nv50-: " Mario Kleiner

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.