Displaying 20 results from an estimated 34 matches for "drm_mode_set".
2019 Aug 07
3
[PATCH 0/2] drm/nouveau: CRTC Runtime PM ref tracking fixes
Just some runtime PM fixes for some much less noticeable runtime PM ref
tracking issues that I got reminded of when fixing some unrelated issues
with nouveau.
Lyude Paul (2):
  drm/nouveau/dispnv04: Grab/put runtime PM refs on DPMS on/off
  drm/nouveau/dispnv50: Fix runtime PM ref tracking for non-blocking
    modesets
 drivers/gpu/drm/nouveau/dispnv04/crtc.c | 18 +++---------
2018 Dec 10
2
[PATCH 4/7] drm: Move the legacy kms disable_all helper to crtc helpers
...m_atomic_helper_shutdown(adev->ddev);
 	}
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index f660819d406e..7dabbaf033a1 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -104,37 +104,6 @@ int drm_crtc_force_disable(struct drm_crtc *crtc)
 	return drm_mode_set_config_internal(&set);
 }
 
-/**
- * drm_crtc_force_disable_all - Forcibly turn off all enabled CRTCs
- * @dev: DRM device whose CRTCs to turn off
- *
- * Drivers may want to call this on unload to ensure that all displays are
- * unlit and the GPU is in a consistent, low power state. Takes mod...
2018 Dec 11
1
[PATCH 4/7] drm: Move the legacy kms disable_all helper to crtc helpers
...t amd.com>
> 
> > +{
> > +       struct drm_crtc *crtc;
> > +       int ret = 0;
> > +
> > +       drm_modeset_lock_all(dev);
> > +       drm_for_each_crtc(crtc, dev)
> > +               if (crtc->enabled) {
> > +                       struct drm_mode_set set = {
> > +                               .crtc = crtc,
> > +                       };
> > +
> > +                       ret = drm_mode_set_config_internal(&set);
> > +                       if (ret)
> > +                               goto out;
> > +...
2019 Aug 07
0
[PATCH 1/2] drm/nouveau/dispnv04: Grab/put runtime PM refs on DPMS on/off
...*crtc, int mode)
 		return;
 
 	nv_crtc->last_dpms = mode;
+	if (mode == DRM_MODE_DPMS_ON)
+		pm_runtime_get_noresume(dev->dev);
+	else
+		pm_runtime_put_noidle(dev->dev);
 
 	if (nv_two_heads(dev))
 		NVSetOwner(dev, nv_crtc->index);
@@ -1045,7 +1049,6 @@ nouveau_crtc_set_config(struct drm_mode_set *set,
 
 	dev = set->crtc->dev;
 
-	/* get a pm reference here */
 	ret = pm_runtime_get_sync(dev->dev);
 	if (ret < 0 && ret != -EACCES)
 		return ret;
@@ -1061,19 +1064,6 @@ nouveau_crtc_set_config(struct drm_mode_set *set,
 	}
 
 	pm_runtime_mark_last_busy(dev->dev);
-	/*...
2016 May 24
4
[PATCH 9/9] drm: Turn off crtc before tearing down its data structure
...y of the caller.
> + * this is the responsibility of the caller. If @crtc is currently enabled,
> + * it is turned off first.
>   */
>  void drm_crtc_cleanup(struct drm_crtc *crtc)
>  {
>  	struct drm_device *dev = crtc->dev;
>  
> +	if (crtc->enabled) {
> +		struct drm_mode_set modeset = {
> +			.crtc = crtc,
> +		};
> +
> +		drm_modeset_lock_all(dev);
> +		drm_mode_set_config_internal(&modeset);
> +		drm_modeset_unlock_all(dev);
> +	}
> +
>  	kfree(crtc->gamma_store);
>  	crtc->gamma_store = NULL;
>  
> -- 
> 2.8.1
> 
&...
2014 Feb 11
2
[PATCH] drm/nouveau: handle -EACCES runtime PM return code
On Mon, Feb 10, 2014 at 9:34 PM, Thierry Reding
<thierry.reding at gmail.com> wrote:
> On Mon, Feb 10, 2014 at 02:58:12PM +0900, Alexandre Courbot wrote:
>> pm_runtime_get*() may return -EACCESS to indicate a device does not have
>
> s/-EACCESS/-EACCES/
Oops.
>> runtime PM enabled. This is the case when the nouveau.runpm parameter is
>> set to 0, and is not an
2018 Dec 10
0
[PATCH 4/7] drm: Move the legacy kms disable_all helper to crtc helpers
...}
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index f660819d406e..7dabbaf033a1 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -104,37 +104,6 @@ int drm_crtc_force_disable(struct drm_crtc *crtc)
>         return drm_mode_set_config_internal(&set);
>  }
>
> -/**
> - * drm_crtc_force_disable_all - Forcibly turn off all enabled CRTCs
> - * @dev: DRM device whose CRTCs to turn off
> - *
> - * Drivers may want to call this on unload to ensure that all displays are
> - * unlit and the GPU is in a...
2018 Dec 17
0
[PATCH 4/7] drm: Move the legacy kms disable_all helper to crtc helpers
...p;afbdev->helper);
 
 	if (afb->obj) {
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index f660819d406e..7dabbaf033a1 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -104,37 +104,6 @@ int drm_crtc_force_disable(struct drm_crtc *crtc)
 	return drm_mode_set_config_internal(&set);
 }
 
-/**
- * drm_crtc_force_disable_all - Forcibly turn off all enabled CRTCs
- * @dev: DRM device whose CRTCs to turn off
- *
- * Drivers may want to call this on unload to ensure that all displays are
- * unlit and the GPU is in a consistent, low power state. Takes mod...
2009 Aug 17
5
[PATCH 1/6] drm/i2c/ch7006: Fix some sparse warnings.
---
 drivers/gpu/drm/i2c/ch7006_drv.c  |    2 +-
 drivers/gpu/drm/i2c/ch7006_mode.c |    2 +-
 drivers/gpu/drm/i2c/ch7006_priv.h |    5 ++---
 3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i2c/ch7006_drv.c b/drivers/gpu/drm/i2c/ch7006_drv.c
index c2594a1..7df4b86 100644
--- a/drivers/gpu/drm/i2c/ch7006_drv.c
+++ b/drivers/gpu/drm/i2c/ch7006_drv.c
@@ -351,7 +351,7
2019 Jan 17
2
[PATCH] drm: Split out drm_probe_helper.h
...>  include/drm/drm_crtc_helper.h                 | 16 -----------
> 
> The list of include files in this file could be dropped and replaced by:
> struct drm_connector;
> struct drm_device;
> struct drm_display_mode;
> struct drm_encoder;
> struct drm_framebuffer;
> struct drm_mode_set;
> struct drm_modeset_acquire_ctx;
> 
> I tried to do so on top of your patch.
> But there were too many build errros and I somehow lost the motivation.
Yeah the drm_crtc_helper.h header is a bit the miniature drmP.h for legacy
kms drivers. Just removing it from all the atomic drivers...
2009 Aug 17
5
[PATCHv2 1/6] drm/i2c/ch7006: Fix some sparse warnings.
Signed-off-by: Francisco Jerez <currojerez at riseup.net>
---
 drivers/gpu/drm/i2c/ch7006_drv.c  |    2 +-
 drivers/gpu/drm/i2c/ch7006_mode.c |    2 +-
 drivers/gpu/drm/i2c/ch7006_priv.h |    5 ++---
 3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i2c/ch7006_drv.c b/drivers/gpu/drm/i2c/ch7006_drv.c
index c2594a1..7df4b86 100644
---
2019 Aug 07
2
[PATCH 1/2] drm/nouveau/dispnv04: Grab/put runtime PM refs on DPMS on/off
...d
I think would leak your runtime PM reference here. At least temporarily.
No idea how to best fix that. Aside from "use atomic" :-)
Cheers, Daniel
>  
>  	if (nv_two_heads(dev))
>  		NVSetOwner(dev, nv_crtc->index);
> @@ -1045,7 +1049,6 @@ nouveau_crtc_set_config(struct drm_mode_set *set,
>  
>  	dev = set->crtc->dev;
>  
> -	/* get a pm reference here */
>  	ret = pm_runtime_get_sync(dev->dev);
>  	if (ret < 0 && ret != -EACCES)
>  		return ret;
> @@ -1061,19 +1064,6 @@ nouveau_crtc_set_config(struct drm_mode_set *set,
>  	}
>...
2016 May 24
5
[PATCH 0/9] Fix runtime pm ref leaks
In preparation for runtime pm on muxed dual GPU laptops,
I've fixed all runtime pm ref leaks I could find in nouveau,
radeon and amdgpu.
To ease reviewing, I've pushed this series to GitHub:
https://github.com/l1k/linux/commits/drm_runpm_fixes_v1
@Alex Deucher: I do not have an AMD GPU so couldn't test this
beyond verifying that it compiles. Please double-check the patches
and test
2016 Jun 08
8
[PATCH v2 00/15] Runtime pm ref leak bonanza
Second iteration of my endeavour to rid nouveau, radeon and amdgpu of
runtime pm ref leaks.
Patches 1 to 8 are identical to v1.
Patch 9 of v1 modified the DRM core to turn off all CRTCs on driver
unload. Based on feedback by Daniel Vetter, I've replaced this with
a helper to turn off all CRTCs, which is called by nouveau, radeon
and amdgpu on unload. In other words, this is now opt-in.
So
2016 May 24
0
[PATCH 9/9] drm: Turn off crtc before tearing down its data structure
...ructure itself,
- * this is the responsibility of the caller.
+ * this is the responsibility of the caller. If @crtc is currently enabled,
+ * it is turned off first.
  */
 void drm_crtc_cleanup(struct drm_crtc *crtc)
 {
 	struct drm_device *dev = crtc->dev;
 
+	if (crtc->enabled) {
+		struct drm_mode_set modeset = {
+			.crtc = crtc,
+		};
+
+		drm_modeset_lock_all(dev);
+		drm_mode_set_config_internal(&modeset);
+		drm_modeset_unlock_all(dev);
+	}
+
 	kfree(crtc->gamma_store);
 	crtc->gamma_store = NULL;
 
-- 
2.8.1
2019 Jan 16
0
[PATCH] drm: Split out drm_probe_helper.h
...infrastructure,
but it is not in use.
>  include/drm/drm_crtc_helper.h                 | 16 -----------
The list of include files in this file could be dropped and replaced by:
struct drm_connector;
struct drm_device;
struct drm_display_mode;
struct drm_encoder;
struct drm_framebuffer;
struct drm_mode_set;
struct drm_modeset_acquire_ctx;
I tried to do so on top of your patch.
But there were too many build errros and I somehow lost the motivation.
>  include/drm/drm_probe_helper.h                | 27 +++++++++++++++++++
This on the other hand is fine - as expected as this is a new file.
But th...
2019 Jan 17
0
[PATCH] drm: Split out drm_probe_helper.h
...| 16 -----------
> > 
> > The list of include files in this file could be dropped and replaced by:
> > struct drm_connector;
> > struct drm_device;
> > struct drm_display_mode;
> > struct drm_encoder;
> > struct drm_framebuffer;
> > struct drm_mode_set;
> > struct drm_modeset_acquire_ctx;
> > 
> > I tried to do so on top of your patch.
> > But there were too many build errros and I somehow lost the motivation.
> 
> Yeah the drm_crtc_helper.h header is a bit the miniature drmP.h for legacy
> kms drivers. Just remov...
2014 Feb 01
0
[RFC 01/16] drm/nouveau: handle -EACCES runtime PM return code
...nsertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/dispnv04/crtc.c b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
index 0e3270c..1caef1f 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
@@ -1048,7 +1048,7 @@ nouveau_crtc_set_config(struct drm_mode_set *set)
 
 	/* get a pm reference here */
 	ret = pm_runtime_get_sync(dev->dev);
-	if (ret < 0)
+	if (ret < 0 && ret != -EACCES)
 		return ret;
 
 	ret = drm_crtc_helper_set_config(set);
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connec...
2014 Feb 12
0
[PATCH v2] drm/nouveau: handle -EACCES runtime PM return code
...+), 4 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/dispnv04/crtc.c b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
index 0e3270c3ffd2..1caef1fd139e 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
@@ -1048,7 +1048,7 @@ nouveau_crtc_set_config(struct drm_mode_set *set)
 
 	/* get a pm reference here */
 	ret = pm_runtime_get_sync(dev->dev);
-	if (ret < 0)
+	if (ret < 0 && ret != -EACCES)
 		return ret;
 
 	ret = drm_crtc_helper_set_config(set);
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connec...
2016 May 25
0
[PATCH 9/9] drm: Turn off crtc before tearing down its data structure
...sponsibility of the caller. If @crtc is currently enabled,
> > + * it is turned off first.
> >   */
> >  void drm_crtc_cleanup(struct drm_crtc *crtc)
> >  {
> >  	struct drm_device *dev = crtc->dev;
> >  
> > +	if (crtc->enabled) {
> > +		struct drm_mode_set modeset = {
> > +			.crtc = crtc,
> > +		};
> > +
> > +		drm_modeset_lock_all(dev);
> > +		drm_mode_set_config_internal(&modeset);
> > +		drm_modeset_unlock_all(dev);
> > +	}
> > +
> >  	kfree(crtc->gamma_store);
> >  	crtc->gamm...