* [PATCH] Fix RadeonCopyData bpp=2 case for big-endian
@ 2016-11-04 8:21 Jochen Rollwagen
[not found] ` <581C4514.2040806-zqRNUXuvxA0b1SvskN2V4Q@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Jochen Rollwagen @ 2016-11-04 8:21 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
[-- Attachment #1: Type: text/plain, Size: 1106 bytes --]
From 66b8b1513464aa3258ae6a024fcaea7a02e2def0 Mon Sep 17 00:00:00 2001
From: Jochen Rollwagen <joro-2013-zqRNUXuvxA0b1SvskN2V4Q@public.gmane.org>
Date: Fri, 4 Nov 2016 09:11:38 +0100
Subject: [PATCH] Fix RadeonCopyData bpp=2 case for big-endian
The current code in RadeonCopyData blocks the bpp=2 case setting
swappiness to RADEON_HOST_DATA_SWAP_16BIT.
This patch fixes this.
---
src/radeon_video.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/src/radeon_video.c b/src/radeon_video.c
index d058986..2de0b48 100644
--- a/src/radeon_video.c
+++ b/src/radeon_video.c
@@ -198,15 +198,10 @@ RADEONCopyData(
unsigned int w,
unsigned int bpp
){
- /* Get the byte-swapping right for big endian systems */
- if ( bpp == 2 ) {
- w *= 2;
- bpp = 1;
- }
-
- {
int swap = RADEON_HOST_DATA_SWAP_NONE;
+ /* Get the byte-swapping right for big endian systems */
+
#if X_BYTE_ORDER == X_BIG_ENDIAN
switch(bpp) {
case 2:
@@ -229,7 +224,6 @@ RADEONCopyData(
dst += dstPitch;
}
}
- }
}
--
1.7.9.5
[-- Attachment #2: 0001-Fix-RadeonCopyData-bpp-2-case-for-big-endian.patch --]
[-- Type: text/x-patch, Size: 1072 bytes --]
>From 66b8b1513464aa3258ae6a024fcaea7a02e2def0 Mon Sep 17 00:00:00 2001
From: Jochen Rollwagen <joro-2013-zqRNUXuvxA0b1SvskN2V4Q@public.gmane.org>
Date: Fri, 4 Nov 2016 09:11:38 +0100
Subject: [PATCH] Fix RadeonCopyData bpp=2 case for big-endian
The current code in RadeonCopyData blocks the bpp=2 case setting swappiness to RADEON_HOST_DATA_SWAP_16BIT.
This patch fixes this.
---
src/radeon_video.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/src/radeon_video.c b/src/radeon_video.c
index d058986..2de0b48 100644
--- a/src/radeon_video.c
+++ b/src/radeon_video.c
@@ -198,15 +198,10 @@ RADEONCopyData(
unsigned int w,
unsigned int bpp
){
- /* Get the byte-swapping right for big endian systems */
- if ( bpp == 2 ) {
- w *= 2;
- bpp = 1;
- }
-
- {
int swap = RADEON_HOST_DATA_SWAP_NONE;
+ /* Get the byte-swapping right for big endian systems */
+
#if X_BYTE_ORDER == X_BIG_ENDIAN
switch(bpp) {
case 2:
@@ -229,7 +224,6 @@ RADEONCopyData(
dst += dstPitch;
}
}
- }
}
--
1.7.9.5
[-- 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 related [flat|nested] 2+ messages in thread
* Re: [PATCH] Fix RadeonCopyData bpp=2 case for big-endian
[not found] ` <581C4514.2040806-zqRNUXuvxA0b1SvskN2V4Q@public.gmane.org>
@ 2016-11-07 2:06 ` Michel Dänzer
0 siblings, 0 replies; 2+ messages in thread
From: Michel Dänzer @ 2016-11-07 2:06 UTC (permalink / raw)
To: Jochen Rollwagen
Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
On 04/11/16 05:21 PM, Jochen Rollwagen wrote:
> From 66b8b1513464aa3258ae6a024fcaea7a02e2def0 Mon Sep 17 00:00:00 2001
> From: Jochen Rollwagen <joro-2013@t-online.de>
> Date: Fri, 4 Nov 2016 09:11:38 +0100
> Subject: [PATCH] Fix RadeonCopyData bpp=2 case for big-endian
>
> The current code in RadeonCopyData blocks the bpp=2 case setting
> swappiness to RADEON_HOST_DATA_SWAP_16BIT.
> This patch fixes this.
> ---
> src/radeon_video.c | 10 ++--------
> 1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/src/radeon_video.c b/src/radeon_video.c
> index d058986..2de0b48 100644
> --- a/src/radeon_video.c
> +++ b/src/radeon_video.c
> @@ -198,15 +198,10 @@ RADEONCopyData(
> unsigned int w,
> unsigned int bpp
> ){
> - /* Get the byte-swapping right for big endian systems */
> - if ( bpp == 2 ) {
> - w *= 2;
> - bpp = 1;
> - }
Unless this actually fixes anything for you, NAK, see
https://cgit.freedesktop.org/xorg/driver/xf86-video-ati/commit/?id=5249f450a2487475a95531603cc8668db2c21c33
.
--
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] 2+ messages in thread
end of thread, other threads:[~2016-11-07 2:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-04 8:21 [PATCH] Fix RadeonCopyData bpp=2 case for big-endian Jochen Rollwagen
[not found] ` <581C4514.2040806-zqRNUXuvxA0b1SvskN2V4Q@public.gmane.org>
2016-11-07 2:06 ` Michel Dänzer
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.