All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: add more cases to DCE11 possible crtc mask setup
@ 2017-02-10  5:02 ` Alex Deucher
  0 siblings, 0 replies; 5+ messages in thread
From: Alex Deucher @ 2017-02-10  5:02 UTC (permalink / raw)
  To: amd-gfx; +Cc: Alex Deucher, stable

Add cases for asics with 3 and 5 crtcs.  Fixes an artificial
limitation on asics with 3 or 5 crtcs.

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=99744

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
---
 drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
index 1cf1d9d..5b24e89 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
@@ -3737,9 +3737,15 @@ static void dce_v11_0_encoder_add(struct amdgpu_device *adev,
 	default:
 		encoder->possible_crtcs = 0x3;
 		break;
+	case 3:
+		encoder->possible_crtcs = 0x7;
+		break;
 	case 4:
 		encoder->possible_crtcs = 0xf;
 		break;
+	case 5:
+		encoder->possible_crtcs = 0x1f;
+		break;
 	case 6:
 		encoder->possible_crtcs = 0x3f;
 		break;
-- 
2.5.5


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

* [PATCH] drm/amdgpu: add more cases to DCE11 possible crtc mask setup
@ 2017-02-10  5:02 ` Alex Deucher
  0 siblings, 0 replies; 5+ messages in thread
From: Alex Deucher @ 2017-02-10  5:02 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: Alex Deucher, stable-u79uwXL29TY76Z2rM5mHXA

Add cases for asics with 3 and 5 crtcs.  Fixes an artificial
limitation on asics with 3 or 5 crtcs.

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=99744

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
---
 drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
index 1cf1d9d..5b24e89 100644
--- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
@@ -3737,9 +3737,15 @@ static void dce_v11_0_encoder_add(struct amdgpu_device *adev,
 	default:
 		encoder->possible_crtcs = 0x3;
 		break;
+	case 3:
+		encoder->possible_crtcs = 0x7;
+		break;
 	case 4:
 		encoder->possible_crtcs = 0xf;
 		break;
+	case 5:
+		encoder->possible_crtcs = 0x1f;
+		break;
 	case 6:
 		encoder->possible_crtcs = 0x3f;
 		break;
-- 
2.5.5

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

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

* Re: [PATCH] drm/amdgpu: add more cases to DCE11 possible crtc mask setup
       [not found] ` <1486702974-11645-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
@ 2017-02-10  6:47   ` Michel Dänzer
  0 siblings, 0 replies; 5+ messages in thread
From: Michel Dänzer @ 2017-02-10  6:47 UTC (permalink / raw)
  To: Alex Deucher; +Cc: Alex Deucher, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

On 10/02/17 02:02 PM, Alex Deucher wrote:
> Add cases for asics with 3 and 5 crtcs.  Fixes an artificial
> limitation on asics with 3 or 5 crtcs.
> 
> Fixes:
> https://bugs.freedesktop.org/show_bug.cgi?id=99744
> 
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> Cc: stable@vger.kernel.org
> ---
>  drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
> index 1cf1d9d..5b24e89 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
> @@ -3737,9 +3737,15 @@ static void dce_v11_0_encoder_add(struct amdgpu_device *adev,
>  	default:
>  		encoder->possible_crtcs = 0x3;
>  		break;
> +	case 3:
> +		encoder->possible_crtcs = 0x7;
> +		break;
>  	case 4:
>  		encoder->possible_crtcs = 0xf;
>  		break;
> +	case 5:
> +		encoder->possible_crtcs = 0x1f;
> +		break;
>  	case 6:
>  		encoder->possible_crtcs = 0x3f;
>  		break;
> 

The switch statement could be simplified to something like:

	switch (adev->mode_info.num_crtc) {
        case 2:
        default:
                encoder->possible_crtcs = 0x3;
                break;
	case 1:
	case 3:
        case 4:
	case 5:
        case 6:
                encoder->possible_crtcs = (1 << adev->mode_info.num_crtc) - 1;
                break;
        }

Either way,

Reviewed-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] 5+ messages in thread

* Re: [PATCH] drm/amdgpu: add more cases to DCE11 possible crtc mask setup
       [not found] ` <1486702974-11645-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
@ 2017-02-10 10:04   ` Christian König
  0 siblings, 0 replies; 5+ messages in thread
From: Christian König @ 2017-02-10 10:04 UTC (permalink / raw)
  To: Alex Deucher, amd-gfx; +Cc: Alex Deucher, stable

Am 10.02.2017 um 06:02 schrieb Alex Deucher:
> Add cases for asics with 3 and 5 crtcs.  Fixes an artificial
> limitation on asics with 3 or 5 crtcs.
>
> Fixes:
> https://bugs.freedesktop.org/show_bug.cgi?id=99744
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> Cc: stable@vger.kernel.org

Reviewed-by: Christian König <christian.koenig@amd.com>.

> ---
>   drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
> index 1cf1d9d..5b24e89 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
> @@ -3737,9 +3737,15 @@ static void dce_v11_0_encoder_add(struct amdgpu_device *adev,
>   	default:
>   		encoder->possible_crtcs = 0x3;
>   		break;
> +	case 3:
> +		encoder->possible_crtcs = 0x7;
> +		break;
>   	case 4:
>   		encoder->possible_crtcs = 0xf;
>   		break;
> +	case 5:
> +		encoder->possible_crtcs = 0x1f;
> +		break;
>   	case 6:
>   		encoder->possible_crtcs = 0x3f;
>   		break;



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

* Re: [PATCH] drm/amdgpu: add more cases to DCE11 possible crtc mask setup
@ 2017-02-10 10:04   ` Christian König
  0 siblings, 0 replies; 5+ messages in thread
From: Christian König @ 2017-02-10 10:04 UTC (permalink / raw)
  To: Alex Deucher, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: Alex Deucher, stable-u79uwXL29TY76Z2rM5mHXA

Am 10.02.2017 um 06:02 schrieb Alex Deucher:
> Add cases for asics with 3 and 5 crtcs.  Fixes an artificial
> limitation on asics with 3 or 5 crtcs.
>
> Fixes:
> https://bugs.freedesktop.org/show_bug.cgi?id=99744
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> Cc: stable@vger.kernel.org

Reviewed-by: Christian König <christian.koenig@amd.com>.

> ---
>   drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 6 ++++++
>   1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
> index 1cf1d9d..5b24e89 100644
> --- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c
> @@ -3737,9 +3737,15 @@ static void dce_v11_0_encoder_add(struct amdgpu_device *adev,
>   	default:
>   		encoder->possible_crtcs = 0x3;
>   		break;
> +	case 3:
> +		encoder->possible_crtcs = 0x7;
> +		break;
>   	case 4:
>   		encoder->possible_crtcs = 0xf;
>   		break;
> +	case 5:
> +		encoder->possible_crtcs = 0x1f;
> +		break;
>   	case 6:
>   		encoder->possible_crtcs = 0x3f;
>   		break;


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

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

end of thread, other threads:[~2017-02-10 13:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-10  5:02 [PATCH] drm/amdgpu: add more cases to DCE11 possible crtc mask setup Alex Deucher
2017-02-10  5:02 ` Alex Deucher
     [not found] ` <1486702974-11645-1-git-send-email-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2017-02-10  6:47   ` Michel Dänzer
2017-02-10 10:04 ` Christian König
2017-02-10 10:04   ` Christian König

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.