xf86-video-ati: Branch 'master' - 3 commits

Michel Dänzer daenzer at kemper.freedesktop.org
Tue Dec 11 10:05:53 PST 2012


 src/drmmode_display.c               |    2 --
 src/evergreen_textured_videofuncs.c |   12 ------------
 src/r600_textured_videofuncs.c      |   12 ------------
 src/radeon_kms.c                    |    8 +-------
 src/radeon_probe.c                  |    1 -
 src/radeon_textured_videofuncs.c    |   12 ------------
 6 files changed, 1 insertion(+), 46 deletions(-)

New commits:
commit bdbd84a6c99943f4e012c92ad9cb920cbd676621
Author: Michel Dänzer <michel.daenzer at amd.com>
Date:   Mon Dec 10 23:35:41 2012 +0100

    Remove local variables total_size_bytes.
    
    Not actually used for anything. Refactoring gone wrong?
    
    Also remove a comment that doesn't seem to make sense anymore.
    
    Stumbled over this due to a warning by clang:
    
    ../../src/radeon_kms.c:1562:6: warning: variable 'total_size_bytes' is uninitialized when used here [-Wuninitialized]
                total_size_bytes += (64 * 4 * 64);
                ^~~~~~~~~~~~~~~~
    ../../src/radeon_kms.c:1557:25: note: initialize the variable 'total_size_bytes' to silence this warning
        int total_size_bytes;
                            ^
                             = 0
    
    Reviewed-by: Alex Deucher <aleander.deucher at amd.com>
    Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>

diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 261e1cb..bb5ef43 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -1403,7 +1403,6 @@ static Bool radeon_setup_kernel_mem(ScreenPtr pScreen)
     int cpp = info->pixel_bytes;
     int screen_size;
     int pitch, base_align;
-    int total_size_bytes = 0;
     uint32_t tiling_flags = 0;
     struct radeon_surface surface;
 
@@ -1511,14 +1510,11 @@ static Bool radeon_setup_kernel_mem(ScreenPtr pScreen)
                 }
 
                 drmmode_set_cursor(pScrn, &info->drmmode, c, info->cursor_bo[c]);
-                total_size_bytes += cursor_size;
             }
         }
     }
 
     screen_size = RADEON_ALIGN(screen_size, RADEON_GPU_PAGE_SIZE);
-    /* keep area front front buffer - but don't allocate it yet */
-    total_size_bytes += screen_size;
 
     if (info->front_bo == NULL) {
         info->front_bo = radeon_bo_open(info->bufmgr, 0, screen_size,
@@ -1554,16 +1550,14 @@ void radeon_kms_update_vram_limit(ScrnInfoPtr pScrn, int new_fb_size)
     xf86CrtcConfigPtr   xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
     RADEONInfoPtr info = RADEONPTR(pScrn);
     int remain_size_bytes;
-    int total_size_bytes;
     int c;
 
     for (c = 0; c < xf86_config->num_crtc; c++) {
 	if (info->cursor_bo[c] != NULL) {
-	    total_size_bytes += (64 * 4 * 64);
+	    new_fb_size += (64 * 4 * 64);
 	}
     }
 
-    total_size_bytes += new_fb_size;
     remain_size_bytes = info->vram_size - new_fb_size;
     remain_size_bytes = (remain_size_bytes / 10) * 9;
     radeon_cs_set_limit(info->cs, RADEON_GEM_DOMAIN_VRAM, remain_size_bytes);
commit cf0a81547bcde32bdd2b080c0a546a49dd2eb628
Author: Michel Dänzer <michel.daenzer at amd.com>
Date:   Tue Dec 11 11:48:33 2012 +0100

    Remove unused local variable 'path'.
    
    ../../src/radeon_probe.c: In function 'radeon_platform_probe':
    ../../src/radeon_probe.c:270:11: error: unused variable 'path' [-Werror=unused-variable]
    
    Reviewed-by: Alex Deucher <aleander.deucher at amd.com>
    Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>

diff --git a/src/radeon_probe.c b/src/radeon_probe.c
index 2533357..5f372c7 100644
--- a/src/radeon_probe.c
+++ b/src/radeon_probe.c
@@ -267,7 +267,6 @@ radeon_platform_probe(DriverPtr pDriver,
 		      intptr_t match_data)
 {
     ScrnInfoPtr pScrn;
-    char *path = xf86_get_platform_device_attrib(dev, ODEV_ATTRIB_PATH);
     int scr_flags = 0;
     EntityInfoPtr pEnt;
 
commit d268038a5bdd1655f7533c8dd2edf74fbc82bbee
Author: Michel Dänzer <michel.daenzer at amd.com>
Date:   Mon Jul 2 09:07:14 2012 +0200

    Remove dead code flagged by gcc -Wunused-but-set-variable.
    
    Reviewed-by: Alex Deucher <aleander.deucher at amd.com>
    Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index d00e60d..db106ea 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1535,11 +1535,9 @@ drm_wakeup_handler(pointer data, int err, pointer p)
 
 Bool drmmode_pre_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, int cpp)
 {
-	xf86CrtcConfigPtr xf86_config;
 	int i, num_dvi = 0, num_hdmi = 0;
 
 	xf86CrtcConfigInit(pScrn, &drmmode_xf86crtc_config_funcs);
-	xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
 
 	drmmode->scrn = pScrn;
 	drmmode->cpp = cpp;
diff --git a/src/evergreen_textured_videofuncs.c b/src/evergreen_textured_videofuncs.c
index 6daf30e..a1956e7 100644
--- a/src/evergreen_textured_videofuncs.c
+++ b/src/evergreen_textured_videofuncs.c
@@ -106,7 +106,6 @@ EVERGREENDisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
     float uco[3], vco[3], off[3];
     float bright, cont, gamma;
     int ref = pPriv->transform_index;
-    Bool needgamma = FALSE;
     float *ps_alu_consts;
     const_config_t ps_const_conf;
     float *vs_alu_consts;
@@ -133,17 +132,6 @@ EVERGREENDisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
     // XXX
     gamma = 1.0;
 
-    if (gamma != 1.0) {
-	needgamma = TRUE;
-	/* note: gamma correction is out = in ^ gamma;
-	   gpu can only do LG2/EX2 therefore we transform into
-	   in ^ gamma = 2 ^ (log2(in) * gamma).
-	   Lots of scalar ops, unfortunately (better solution?) -
-	   without gamma that's 3 inst, with gamma it's 10...
-	   could use different gamma factors per channel,
-	   if that's of any use. */
-    }
-
     CLEAR (cb_conf);
     CLEAR (tex_res);
     CLEAR (tex_samp);
diff --git a/src/r600_textured_videofuncs.c b/src/r600_textured_videofuncs.c
index 970ab8e..19cf82d 100644
--- a/src/r600_textured_videofuncs.c
+++ b/src/r600_textured_videofuncs.c
@@ -106,7 +106,6 @@ R600DisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
     float uco[3], vco[3], off[3];
     float bright, cont, gamma;
     int ref = pPriv->transform_index;
-    Bool needgamma = FALSE;
     float ps_alu_consts[12];
     float vs_alu_consts[4];
 
@@ -131,17 +130,6 @@ R600DisplayTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
     // XXX
     gamma = 1.0;
 
-    if (gamma != 1.0) {
-	needgamma = TRUE;
-	/* note: gamma correction is out = in ^ gamma;
-	   gpu can only do LG2/EX2 therefore we transform into
-	   in ^ gamma = 2 ^ (log2(in) * gamma).
-	   Lots of scalar ops, unfortunately (better solution?) -
-	   without gamma that's 3 inst, with gamma it's 10...
-	   could use different gamma factors per channel,
-	   if that's of any use. */
-    }
-
     /* setup the ps consts */
     ps_alu_consts[0] = off[0];
     ps_alu_consts[1] = off[1];
diff --git a/src/radeon_textured_videofuncs.c b/src/radeon_textured_videofuncs.c
index c1bdc65..02eb0b7 100644
--- a/src/radeon_textured_videofuncs.c
+++ b/src/radeon_textured_videofuncs.c
@@ -3248,7 +3248,6 @@ R500PrepareTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
 	float uco[3], vco[3], off[3];
 	float bright, cont, gamma;
 	int ref = pPriv->transform_index;
-	Bool needgamma = FALSE;
 
 	cont = RTFContrast(pPriv->contrast);
 	bright = RTFBrightness(pPriv->brightness);
@@ -3270,17 +3269,6 @@ R500PrepareTexturedVideo(ScrnInfoPtr pScrn, RADEONPortPrivPtr pPriv)
 
 	//XXX gamma
 
-	if (gamma != 1.0) {
-	    needgamma = TRUE;
-	    /* note: gamma correction is out = in ^ gamma;
-	       gpu can only do LG2/EX2 therefore we transform into
-	       in ^ gamma = 2 ^ (log2(in) * gamma).
-	       Lots of scalar ops, unfortunately (better solution?) -
-	       without gamma that's 3 inst, with gamma it's 10...
-	       could use different gamma factors per channel,
-	       if that's of any use. */
-	}
-
 	if (pPriv->is_planar) {
 	    BEGIN_RING(2*56);
 	    /* 2 components: 2 for tex0 */


More information about the xorg-commit mailing list