All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/vc4: Fix scaling of uni-planar formats
@ 2018-05-07 12:13 Boris Brezillon
  2018-05-07 15:56   ` Eric Anholt
  2018-05-09  7:50 ` Boris Brezillon
  0 siblings, 2 replies; 7+ messages in thread
From: Boris Brezillon @ 2018-05-07 12:13 UTC (permalink / raw)
  To: David Airlie, Daniel Vetter, dri-devel
  Cc: Eric Anholt, Boris Brezillon, stable

When using uni-planar formats (like RGB), the scaling parameters are
stored in plane 0, not plane 1.

Fixes: fc04023fafec ("drm/vc4: Add support for YUV planes.")
Cc: stable@vger.kernel.org
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
---
 drivers/gpu/drm/vc4/vc4_plane.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c
index ebf081c7a53b..6831975604b5 100644
--- a/drivers/gpu/drm/vc4/vc4_plane.c
+++ b/drivers/gpu/drm/vc4/vc4_plane.c
@@ -541,7 +541,7 @@ static int vc4_plane_mode_set(struct drm_plane *plane,
 	 * the scl fields here.
 	 */
 	if (num_planes == 1) {
-		scl0 = vc4_get_scl_field(state, 1);
+		scl0 = vc4_get_scl_field(state, 0);
 		scl1 = scl0;
 	} else {
 		scl0 = vc4_get_scl_field(state, 1);
-- 
2.14.1

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

* Re: [PATCH] drm/vc4: Fix scaling of uni-planar formats
  2018-05-07 12:13 [PATCH] drm/vc4: Fix scaling of uni-planar formats Boris Brezillon
@ 2018-05-07 15:56   ` Eric Anholt
  2018-05-09  7:50 ` Boris Brezillon
  1 sibling, 0 replies; 7+ messages in thread
From: Eric Anholt @ 2018-05-07 15:56 UTC (permalink / raw)
  To: Boris Brezillon, David Airlie, Daniel Vetter, dri-devel
  Cc: Boris Brezillon, stable

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

Boris Brezillon <boris.brezillon@bootlin.com> writes:

> When using uni-planar formats (like RGB), the scaling parameters are
> stored in plane 0, not plane 1.
>
> Fixes: fc04023fafec ("drm/vc4: Add support for YUV planes.")
> Cc: stable@vger.kernel.org
> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>

Reviewed-by: Eric Anholt <eric@anholt.net>

Looking at the other branch, did I get the scl0/scl1 backwards?  HVS
docs say for non-444 YCBCR: "In these cases Channel 0 performs Y/Alpha
scaling and Channel 1 performs CB/CR scaling and should be configured as
appropriate."

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

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

* Re: [PATCH] drm/vc4: Fix scaling of uni-planar formats
@ 2018-05-07 15:56   ` Eric Anholt
  0 siblings, 0 replies; 7+ messages in thread
From: Eric Anholt @ 2018-05-07 15:56 UTC (permalink / raw)
  To: David Airlie, Daniel Vetter, dri-devel; +Cc: Boris Brezillon, stable


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

Boris Brezillon <boris.brezillon@bootlin.com> writes:

> When using uni-planar formats (like RGB), the scaling parameters are
> stored in plane 0, not plane 1.
>
> Fixes: fc04023fafec ("drm/vc4: Add support for YUV planes.")
> Cc: stable@vger.kernel.org
> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>

Reviewed-by: Eric Anholt <eric@anholt.net>

Looking at the other branch, did I get the scl0/scl1 backwards?  HVS
docs say for non-444 YCBCR: "In these cases Channel 0 performs Y/Alpha
scaling and Channel 1 performs CB/CR scaling and should be configured as
appropriate."

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

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

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

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

* Re: [PATCH] drm/vc4: Fix scaling of uni-planar formats
  2018-05-07 15:56   ` Eric Anholt
  (?)
@ 2018-05-07 16:11   ` Boris Brezillon
  2018-05-09  7:43       ` Boris Brezillon
  -1 siblings, 1 reply; 7+ messages in thread
From: Boris Brezillon @ 2018-05-07 16:11 UTC (permalink / raw)
  To: Eric Anholt; +Cc: David Airlie, Daniel Vetter, dri-devel, stable

On Mon, 07 May 2018 08:56:14 -0700
Eric Anholt <eric@anholt.net> wrote:

> Boris Brezillon <boris.brezillon@bootlin.com> writes:
> 
> > When using uni-planar formats (like RGB), the scaling parameters are
> > stored in plane 0, not plane 1.
> >
> > Fixes: fc04023fafec ("drm/vc4: Add support for YUV planes.")
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>  
> 
> Reviewed-by: Eric Anholt <eric@anholt.net>
> 
> Looking at the other branch, did I get the scl0/scl1 backwards?  HVS
> docs say for non-444 YCBCR: "In these cases Channel 0 performs Y/Alpha
> scaling and Channel 1 performs CB/CR scaling and should be configured as
> appropriate."

Didn't test, but I think rescaling of multi-planar format is correct.

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

* Re: [PATCH] drm/vc4: Fix scaling of uni-planar formats
  2018-05-07 16:11   ` Boris Brezillon
@ 2018-05-09  7:43       ` Boris Brezillon
  0 siblings, 0 replies; 7+ messages in thread
From: Boris Brezillon @ 2018-05-09  7:43 UTC (permalink / raw)
  To: Eric Anholt; +Cc: David Airlie, Daniel Vetter, dri-devel, stable

On Mon, 7 May 2018 18:11:02 +0200
Boris Brezillon <boris.brezillon@bootlin.com> wrote:

> On Mon, 07 May 2018 08:56:14 -0700
> Eric Anholt <eric@anholt.net> wrote:
> 
> > Boris Brezillon <boris.brezillon@bootlin.com> writes:
> >   
> > > When using uni-planar formats (like RGB), the scaling parameters are
> > > stored in plane 0, not plane 1.
> > >
> > > Fixes: fc04023fafec ("drm/vc4: Add support for YUV planes.")
> > > Cc: stable@vger.kernel.org
> > > Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>    
> > 
> > Reviewed-by: Eric Anholt <eric@anholt.net>
> > 
> > Looking at the other branch, did I get the scl0/scl1 backwards?  HVS
> > docs say for non-444 YCBCR: "In these cases Channel 0 performs Y/Alpha
> > scaling and Channel 1 performs CB/CR scaling and should be configured as
> > appropriate."  
> 
> Didn't test, but I think rescaling of multi-planar format is correct.

I just tested, and I confirm the other branch is correct.

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

* Re: [PATCH] drm/vc4: Fix scaling of uni-planar formats
@ 2018-05-09  7:43       ` Boris Brezillon
  0 siblings, 0 replies; 7+ messages in thread
From: Boris Brezillon @ 2018-05-09  7:43 UTC (permalink / raw)
  To: Eric Anholt; +Cc: David Airlie, stable, dri-devel

On Mon, 7 May 2018 18:11:02 +0200
Boris Brezillon <boris.brezillon@bootlin.com> wrote:

> On Mon, 07 May 2018 08:56:14 -0700
> Eric Anholt <eric@anholt.net> wrote:
> 
> > Boris Brezillon <boris.brezillon@bootlin.com> writes:
> >   
> > > When using uni-planar formats (like RGB), the scaling parameters are
> > > stored in plane 0, not plane 1.
> > >
> > > Fixes: fc04023fafec ("drm/vc4: Add support for YUV planes.")
> > > Cc: stable@vger.kernel.org
> > > Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>    
> > 
> > Reviewed-by: Eric Anholt <eric@anholt.net>
> > 
> > Looking at the other branch, did I get the scl0/scl1 backwards?  HVS
> > docs say for non-444 YCBCR: "In these cases Channel 0 performs Y/Alpha
> > scaling and Channel 1 performs CB/CR scaling and should be configured as
> > appropriate."  
> 
> Didn't test, but I think rescaling of multi-planar format is correct.

I just tested, and I confirm the other branch is correct.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm/vc4: Fix scaling of uni-planar formats
  2018-05-07 12:13 [PATCH] drm/vc4: Fix scaling of uni-planar formats Boris Brezillon
  2018-05-07 15:56   ` Eric Anholt
@ 2018-05-09  7:50 ` Boris Brezillon
  1 sibling, 0 replies; 7+ messages in thread
From: Boris Brezillon @ 2018-05-09  7:50 UTC (permalink / raw)
  To: David Airlie, Daniel Vetter, dri-devel; +Cc: Eric Anholt, stable

On Mon,  7 May 2018 14:13:03 +0200
Boris Brezillon <boris.brezillon@bootlin.com> wrote:

> When using uni-planar formats (like RGB), the scaling parameters are
> stored in plane 0, not plane 1.
> 
> Fixes: fc04023fafec ("drm/vc4: Add support for YUV planes.")
> Cc: stable@vger.kernel.org
> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>

Queued to drm-misc-fixes.

> ---
>  drivers/gpu/drm/vc4/vc4_plane.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c
> index ebf081c7a53b..6831975604b5 100644
> --- a/drivers/gpu/drm/vc4/vc4_plane.c
> +++ b/drivers/gpu/drm/vc4/vc4_plane.c
> @@ -541,7 +541,7 @@ static int vc4_plane_mode_set(struct drm_plane *plane,
>  	 * the scl fields here.
>  	 */
>  	if (num_planes == 1) {
> -		scl0 = vc4_get_scl_field(state, 1);
> +		scl0 = vc4_get_scl_field(state, 0);
>  		scl1 = scl0;
>  	} else {
>  		scl0 = vc4_get_scl_field(state, 1);

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

end of thread, other threads:[~2018-05-09  7:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-07 12:13 [PATCH] drm/vc4: Fix scaling of uni-planar formats Boris Brezillon
2018-05-07 15:56 ` Eric Anholt
2018-05-07 15:56   ` Eric Anholt
2018-05-07 16:11   ` Boris Brezillon
2018-05-09  7:43     ` Boris Brezillon
2018-05-09  7:43       ` Boris Brezillon
2018-05-09  7:50 ` Boris Brezillon

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.