All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jochen Rollwagen <joro-2013-zqRNUXuvxA0b1SvskN2V4Q@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [PATCH] Fix RadeonCopyData bpp=2 case for big-endian
Date: Fri, 4 Nov 2016 09:21:40 +0100	[thread overview]
Message-ID: <581C4514.2040806@t-online.de> (raw)

[-- 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

             reply	other threads:[~2016-11-04  8:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-04  8:21 Jochen Rollwagen [this message]
     [not found] ` <581C4514.2040806-zqRNUXuvxA0b1SvskN2V4Q@public.gmane.org>
2016-11-07  2:06   ` [PATCH] Fix RadeonCopyData bpp=2 case for big-endian Michel Dänzer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=581C4514.2040806@t-online.de \
    --to=joro-2013-zqrnuxuvxa0b1svskn2v4q@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.