Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/dist/drm/radeon We use -Wno-shadow for...



details:   https://anonhg.NetBSD.org/src/rev/3385c305e065
branches:  trunk
changeset: 969274:3385c305e065
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Fri Feb 14 04:29:42 2020 +0000

description:
We use -Wno-shadow for radeon; remove unused diff.

diffstat:

 sys/external/bsd/drm2/dist/drm/radeon/radeon_ci_dpm.c       |  38 ++++++------
 sys/external/bsd/drm2/dist/drm/radeon/radeon_evergreen_cs.c |  16 ++--
 sys/external/bsd/drm2/dist/drm/radeon/radeon_rv770_dpm.c    |  14 ++--
 sys/external/bsd/drm2/dist/drm/radeon/radeon_si_dpm.c       |  32 +++++-----
 sys/external/bsd/drm2/dist/drm/radeon/radeon_sumo_dpm.c     |  10 +-
 sys/external/bsd/drm2/dist/drm/radeon/radeon_trinity_dpm.c  |  10 +-
 6 files changed, 60 insertions(+), 60 deletions(-)

diffs (truncated from 340 to 300 lines):

diff -r 6c1b6484a9a0 -r 3385c305e065 sys/external/bsd/drm2/dist/drm/radeon/radeon_ci_dpm.c
--- a/sys/external/bsd/drm2/dist/drm/radeon/radeon_ci_dpm.c     Fri Feb 14 04:29:19 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/radeon/radeon_ci_dpm.c     Fri Feb 14 04:29:42 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: radeon_ci_dpm.c,v 1.2 2020/02/14 04:29:19 riastradh Exp $      */
+/*     $NetBSD: radeon_ci_dpm.c,v 1.3 2020/02/14 04:29:42 riastradh Exp $      */
 
 /*
  * Copyright 2013 Advanced Micro Devices, Inc.
@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeon_ci_dpm.c,v 1.2 2020/02/14 04:29:19 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeon_ci_dpm.c,v 1.3 2020/02/14 04:29:42 riastradh Exp $");
 
 #include <linux/firmware.h>
 #include "drmP.h"
@@ -386,29 +386,29 @@
        struct ci_power_info *pi = ci_get_pi(rdev);
        u8 *hi_vid = pi->smc_powertune_table.BapmVddCVidHiSidd;
        u8 *lo_vid = pi->smc_powertune_table.BapmVddCVidLoSidd;
-       int i, vmin, vmax;
-
-       vmin = vmax = hi_vid[0];
+       int i, min, max;
+
+       min = max = hi_vid[0];
        for (i = 0; i < 8; i++) {
                if (0 != hi_vid[i]) {
-                       if (vmin > hi_vid[i])
-                               vmin = hi_vid[i];
-                       if (vmax < hi_vid[i])
-                               vmax = hi_vid[i];
+                       if (min > hi_vid[i])
+                               min = hi_vid[i];
+                       if (max < hi_vid[i])
+                               max = hi_vid[i];
                }
 
                if (0 != lo_vid[i]) {
-                       if (vmin > lo_vid[i])
-                               vmin = lo_vid[i];
-                       if (vmax < lo_vid[i])
-                               vmax = lo_vid[i];
+                       if (min > lo_vid[i])
+                               min = lo_vid[i];
+                       if (max < lo_vid[i])
+                               max = lo_vid[i];
                }
        }
 
-       if ((vmin == 0) || (vmax == 0))
+       if ((min == 0) || (max == 0))
                return -EINVAL;
-       pi->smc_powertune_table.GnbLPMLMaxVid = (u8)vmax;
-       pi->smc_powertune_table.GnbLPMLMinVid = (u8)vmin;
+       pi->smc_powertune_table.GnbLPMLMaxVid = (u8)max;
+       pi->smc_powertune_table.GnbLPMLMinVid = (u8)min;
 
        return 0;
 }
@@ -2443,15 +2443,15 @@
 {
        u32 i;
        u32 tmp;
-       u32 vmin = (min_sclk_in_sr > CISLAND_MINIMUM_ENGINE_CLOCK) ?
+       u32 min = (min_sclk_in_sr > CISLAND_MINIMUM_ENGINE_CLOCK) ?
                min_sclk_in_sr : CISLAND_MINIMUM_ENGINE_CLOCK;
 
-       if (sclk < vmin)
+       if (sclk < min)
                return 0;
 
        for (i = CISLAND_MAX_DEEPSLEEP_DIVIDER_ID;  ; i--) {
                tmp = sclk / (1 << i);
-               if (tmp >= vmin || i == 0)
+               if (tmp >= min || i == 0)
                        break;
        }
 
diff -r 6c1b6484a9a0 -r 3385c305e065 sys/external/bsd/drm2/dist/drm/radeon/radeon_evergreen_cs.c
--- a/sys/external/bsd/drm2/dist/drm/radeon/radeon_evergreen_cs.c       Fri Feb 14 04:29:19 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/radeon/radeon_evergreen_cs.c       Fri Feb 14 04:29:42 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: radeon_evergreen_cs.c,v 1.2 2019/02/08 04:11:53 mrg Exp $      */
+/*     $NetBSD: radeon_evergreen_cs.c,v 1.3 2020/02/14 04:29:42 riastradh Exp $        */
 
 /*
  * Copyright 2010 Advanced Micro Devices, Inc.
@@ -28,7 +28,7 @@
  *          Jerome Glisse
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeon_evergreen_cs.c,v 1.2 2019/02/08 04:11:53 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeon_evergreen_cs.c,v 1.3 2020/02/14 04:29:42 riastradh Exp $");
 
 #include <drm/drmP.h>
 #include "radeon.h"
@@ -37,8 +37,8 @@
 #include "cayman_reg_safe.h"
 
 #ifndef __NetBSD__
-#define MAX(a,b)                       (((a)>(b))?(a):(b))
-#define MIN(a,b)                       (((a)<(b))?(a):(b))
+#define MAX(a,b)                   (((a)>(b))?(a):(b))
+#define MIN(a,b)                   (((a)<(b))?(a):(b))
 #endif
 
 #define REG_SAFE_BM_SIZE ARRAY_SIZE(evergreen_reg_safe_bm)
@@ -455,21 +455,21 @@
                 */
                if (!surf.mode) {
                        uint32_t *ib = p->ib.ptr;
-                       unsigned long tmp, nby, bsize, size, vmin = 0;
+                       unsigned long tmp, nby, bsize, size, min = 0;
 
                        /* find the height the ddx wants */
                        if (surf.nby > 8) {
-                               vmin = surf.nby - 8;
+                               min = surf.nby - 8;
                        }
                        bsize = radeon_bo_size(track->cb_color_bo[id]);
                        tmp = track->cb_color_bo_offset[id] << 8;
-                       for (nby = surf.nby; nby > vmin; nby--) {
+                       for (nby = surf.nby; nby > min; nby--) {
                                size = nby * surf.nbx * surf.bpe * surf.nsamples;
                                if ((tmp + size * mslice) <= bsize) {
                                        break;
                                }
                        }
-                       if (nby > vmin) {
+                       if (nby > min) {
                                surf.nby = nby;
                                slice = ((nby * surf.nbx) / 64) - 1;
                                if (!evergreen_surface_check(p, &surf, "cb")) {
diff -r 6c1b6484a9a0 -r 3385c305e065 sys/external/bsd/drm2/dist/drm/radeon/radeon_rv770_dpm.c
--- a/sys/external/bsd/drm2/dist/drm/radeon/radeon_rv770_dpm.c  Fri Feb 14 04:29:19 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/radeon/radeon_rv770_dpm.c  Fri Feb 14 04:29:42 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: radeon_rv770_dpm.c,v 1.1 2018/08/27 14:38:20 riastradh Exp $   */
+/*     $NetBSD: radeon_rv770_dpm.c,v 1.2 2020/02/14 04:29:42 riastradh Exp $   */
 
 /*
  * Copyright 2011 Advanced Micro Devices, Inc.
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeon_rv770_dpm.c,v 1.1 2018/08/27 14:38:20 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeon_rv770_dpm.c,v 1.2 2020/02/14 04:29:42 riastradh Exp $");
 
 #include "drmP.h"
 #include "radeon.h"
@@ -1237,16 +1237,16 @@
 static int rv770_construct_vddc_table(struct radeon_device *rdev)
 {
        struct rv7xx_power_info *pi = rv770_get_pi(rdev);
-       u16 vmin, vmax, step;
+       u16 min, max, step;
        u32 steps = 0;
        u8 vddc_index = 0;
        u32 i;
 
-       radeon_atom_get_min_voltage(rdev, SET_VOLTAGE_TYPE_ASIC_VDDC, &vmin);
-       radeon_atom_get_max_voltage(rdev, SET_VOLTAGE_TYPE_ASIC_VDDC, &vmax);
+       radeon_atom_get_min_voltage(rdev, SET_VOLTAGE_TYPE_ASIC_VDDC, &min);
+       radeon_atom_get_max_voltage(rdev, SET_VOLTAGE_TYPE_ASIC_VDDC, &max);
        radeon_atom_get_voltage_step(rdev, SET_VOLTAGE_TYPE_ASIC_VDDC, &step);
 
-       steps = (vmax - vmin) / step + 1;
+       steps = (max - min) / step + 1;
 
        if (steps > MAX_NO_VREG_STEPS)
                return -EINVAL;
@@ -1254,7 +1254,7 @@
        for (i = 0; i < steps; i++) {
                u32 gpio_pins, gpio_mask;
 
-               pi->vddc_table[i].vddc = (u16)(vmin + i * step);
+               pi->vddc_table[i].vddc = (u16)(min + i * step);
                radeon_atom_get_voltage_gpio_settings(rdev,
                                                      pi->vddc_table[i].vddc,
                                                      SET_VOLTAGE_TYPE_ASIC_VDDC,
diff -r 6c1b6484a9a0 -r 3385c305e065 sys/external/bsd/drm2/dist/drm/radeon/radeon_si_dpm.c
--- a/sys/external/bsd/drm2/dist/drm/radeon/radeon_si_dpm.c     Fri Feb 14 04:29:19 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/radeon/radeon_si_dpm.c     Fri Feb 14 04:29:42 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: radeon_si_dpm.c,v 1.2 2020/02/14 04:29:19 riastradh Exp $      */
+/*     $NetBSD: radeon_si_dpm.c,v 1.3 2020/02/14 04:29:42 riastradh Exp $      */
 
 /*
  * Copyright 2013 Advanced Micro Devices, Inc.
@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeon_si_dpm.c,v 1.2 2020/02/14 04:29:19 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeon_si_dpm.c,v 1.3 2020/02/14 04:29:42 riastradh Exp $");
 
 #include "drmP.h"
 #include "radeon.h"
@@ -2535,7 +2535,7 @@
 }
 
 static int si_get_cac_std_voltage_max_min(struct radeon_device *rdev,
-                                         u16 *vmax, u16 *vmin)
+                                         u16 *max, u16 *min)
 {
        struct si_power_info *si_pi = si_get_pi(rdev);
        struct radeon_cac_leakage_table *table =
@@ -2547,35 +2547,35 @@
        if (table == NULL)
                return -EINVAL;
 
-       *vmax = 0;
-       *vmin = 0xFFFF;
+       *max = 0;
+       *min = 0xFFFF;
 
        for (i = 0; i < table->count; i++) {
-               if (table->entries[i].vddc > *vmax)
-                       *vmax = table->entries[i].vddc;
-               if (table->entries[i].vddc < *vmin)
-                       *vmin = table->entries[i].vddc;
+               if (table->entries[i].vddc > *max)
+                       *max = table->entries[i].vddc;
+               if (table->entries[i].vddc < *min)
+                       *min = table->entries[i].vddc;
        }
 
        if (si_pi->powertune_data->lkge_lut_v0_percent > 100)
                return -EINVAL;
 
-       v0_loadline = (*vmin) * (100 - si_pi->powertune_data->lkge_lut_v0_percent) / 100;
+       v0_loadline = (*min) * (100 - si_pi->powertune_data->lkge_lut_v0_percent) / 100;
 
        if (v0_loadline > 0xFFFFUL)
                return -EINVAL;
 
-       *vmin = (u16)v0_loadline;
-
-       if ((*vmin > *vmax) || (*vmax == 0) || (*vmin == 0))
+       *min = (u16)v0_loadline;
+
+       if ((*min > *max) || (*max == 0) || (*min == 0))
                return -EINVAL;
 
        return 0;
 }
 
-static u16 si_get_cac_std_voltage_step(u16 vmax, u16 vmin)
-{
-       return ((vmax - vmin) + (SMC_SISLANDS_LKGE_LUT_NUM_OF_VOLT_ENTRIES - 1)) /
+static u16 si_get_cac_std_voltage_step(u16 max, u16 min)
+{
+       return ((max - min) + (SMC_SISLANDS_LKGE_LUT_NUM_OF_VOLT_ENTRIES - 1)) /
                SMC_SISLANDS_LKGE_LUT_NUM_OF_VOLT_ENTRIES;
 }
 
diff -r 6c1b6484a9a0 -r 3385c305e065 sys/external/bsd/drm2/dist/drm/radeon/radeon_sumo_dpm.c
--- a/sys/external/bsd/drm2/dist/drm/radeon/radeon_sumo_dpm.c   Fri Feb 14 04:29:19 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/radeon/radeon_sumo_dpm.c   Fri Feb 14 04:29:42 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: radeon_sumo_dpm.c,v 1.1 2018/08/27 14:38:20 riastradh Exp $    */
+/*     $NetBSD: radeon_sumo_dpm.c,v 1.2 2020/02/14 04:29:42 riastradh Exp $    */
 
 /*
  * Copyright 2012 Advanced Micro Devices, Inc.
@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: radeon_sumo_dpm.c,v 1.1 2018/08/27 14:38:20 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: radeon_sumo_dpm.c,v 1.2 2020/02/14 04:29:42 riastradh Exp $");
 
 #include "drmP.h"
 #include "radeon.h"
@@ -1013,10 +1013,10 @@
        struct sumo_power_info *pi = sumo_get_pi(rdev);
        u32 i;
        u32 temp;
-       u32 vmin = (min_sclk_in_sr > SUMO_MINIMUM_ENGINE_CLOCK) ?
+       u32 min = (min_sclk_in_sr > SUMO_MINIMUM_ENGINE_CLOCK) ?
                min_sclk_in_sr : SUMO_MINIMUM_ENGINE_CLOCK;
 
-       if (sclk < vmin)
+       if (sclk < min)
                return 0;
 
        if (!pi->enable_sclk_ds)
@@ -1025,7 +1025,7 @@
        for (i = SUMO_MAX_DEEPSLEEP_DIVIDER_ID;  ; i--) {
                temp = sclk / sumo_get_sleep_divider_from_id(i);
 
-               if (temp >= vmin || i == 0)
+               if (temp >= min || i == 0)
                        break;
        }
        return i;



Home | Main Index | Thread Index | Old Index