[PATCH] drm/vmwgfx: remove set but not used variable 'srf'

2019-11-01 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/vmwgfx/vmwgfx_surface.c: In function vmw_hw_surface_destroy:
drivers/gpu/drm/vmwgfx/vmwgfx_surface.c:335:22: warning: variable srf set but 
not used [-Wunused-but-set-variable]

It is introduced by commit 543831cfc976 ("drm/vmwgfx:
Break out surface and context management to separate files"),
but never used, so remove it.

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/vmwgfx/vmwgfx_surface.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c 
b/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
index 29d8794..de0530b 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_surface.c
@@ -336,7 +336,6 @@ static void vmw_hw_surface_destroy(struct vmw_resource *res)
 {

struct vmw_private *dev_priv = res->dev_priv;
-   struct vmw_surface *srf;
void *cmd;

if (res->func->destroy == vmw_gb_surface_destroy) {
@@ -360,7 +359,6 @@ static void vmw_hw_surface_destroy(struct vmw_resource *res)
 */

mutex_lock(&dev_priv->cmdbuf_mutex);
-   srf = vmw_res_to_srf(res);
dev_priv->used_memory_size -= res->backup_size;
mutex_unlock(&dev_priv->cmdbuf_mutex);
}
--
2.7.4

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

[PATCH] drm/amd/powerplay: remove set but not used variable 'threshold', 'state'

2019-11-11 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c: In function 
fiji_populate_single_graphic_level:
drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c:943:11: warning: variable 
threshold set but not used [-Wunused-but-set-variable]
drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c: In function 
fiji_populate_memory_timing_parameters:
drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c:1504:8: warning: variable 
state set but not used [-Wunused-but-set-variable]

They are introduced by commit 2e112b4ae3ba ("drm/amd/pp:
remove fiji_smc/smumgr split."), but never used,
so remove it.

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c 
b/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c
index da025b1..32ebb38 100644
--- a/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c
@@ -940,7 +940,7 @@ static int fiji_populate_single_graphic_level(struct 
pp_hwmgr *hwmgr,
 {
int result;
/* PP_Clocks minClocks; */
-   uint32_t threshold, mvdd;
+   uint32_t mvdd;
struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
struct phm_ppt_v1_information *table_info =
(struct phm_ppt_v1_information *)(hwmgr->pptable);
@@ -973,8 +973,6 @@ static int fiji_populate_single_graphic_level(struct 
pp_hwmgr *hwmgr,
level->VoltageDownHyst = 0;
level->PowerThrottle = 0;

-   threshold = clock * data->fast_watermark_threshold / 100;
-
data->display_timing.min_clock_in_sr = 
hwmgr->display_config->min_core_set_clock_in_sr;

if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps, 
PHM_PlatformCaps_SclkDeepSleep))
@@ -1501,7 +1499,7 @@ static int fiji_populate_memory_timing_parameters(struct 
pp_hwmgr *hwmgr,
uint32_t dram_timing;
uint32_t dram_timing2;
uint32_t burstTime;
-   ULONG state, trrds, trrdl;
+   ULONG trrds, trrdl;
int result;

result = atomctrl_set_engine_dram_timings_rv770(hwmgr,
@@ -1513,7 +1511,6 @@ static int fiji_populate_memory_timing_parameters(struct 
pp_hwmgr *hwmgr,
dram_timing2 = cgs_read_register(hwmgr->device, mmMC_ARB_DRAM_TIMING2);
burstTime = cgs_read_register(hwmgr->device, mmMC_ARB_BURST_TIME);

-   state = PHM_GET_FIELD(burstTime, MC_ARB_BURST_TIME, STATE0);
trrds = PHM_GET_FIELD(burstTime, MC_ARB_BURST_TIME, TRRDS0);
trrdl = PHM_GET_FIELD(burstTime, MC_ARB_BURST_TIME, TRRDL0);

--
2.7.4

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

[PATCH 1/2] drm/amd/powerplay: remove set but not used variable 'vbios_version', 'data'

2019-11-11 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c: In function 
smu7_check_mc_firmware:
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:4215:11: warning: variable 
vbios_version set but not used [-Wunused-but-set-variable]
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c: In function 
smu7_get_performance_level:
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c:5054:21: warning: variable 
data set but not used [-Wunused-but-set-variable]

'vbios_version' is introduced by commit 599a7e9fe1b6 ("drm/amd/powerplay:
implement smu7 hwmgr to manager asics with smu ip version 7."),
but never used, so remove it.

'data' is introduced by commit f688b614b643 ("drm/amd/pp:
Implement get_performance_level for legacy dgpu"), but never used,
so remove it.

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c 
b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
index c805c6f..775366a 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c
@@ -4218,7 +4218,6 @@ static int smu7_check_mc_firmware(struct pp_hwmgr *hwmgr)
 {
struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);

-   uint32_t vbios_version;
uint32_t tmp;

/* Read MC indirect register offset 0x9F bits [3:0] to see
@@ -4227,7 +4226,6 @@ static int smu7_check_mc_firmware(struct pp_hwmgr *hwmgr)
 */

smu7_get_mc_microcode_version(hwmgr);
-   vbios_version = hwmgr->microcode_version_info.MC & 0xf;

data->need_long_memory_training = false;

@@ -5057,13 +5055,11 @@ static int smu7_get_performance_level(struct pp_hwmgr 
*hwmgr, const struct pp_hw
PHM_PerformanceLevel *level)
 {
const struct smu7_power_state *ps;
-   struct smu7_hwmgr *data;
uint32_t i;

if (level == NULL || hwmgr == NULL || state == NULL)
return -EINVAL;

-   data = hwmgr->backend;
ps = cast_const_phw_smu7_power_state(state);

i = index > ps->performance_level_count - 1 ?
--
2.7.4

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

[PATCH 0/2] remove some set but not used variables in hwmgr

2019-11-11 Thread zhengbin
zhengbin (2):
  drm/amd/powerplay: remove set but not used variable
'vbios_version','data'
  drm/amd/powerplay: remove set but not used variable 'data'

 drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c   | 4 
 drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 2 --
 2 files changed, 6 deletions(-)

--
2.7.4

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

[PATCH 2/2] drm/amd/powerplay: remove set but not used variable 'data'

2019-11-11 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c: In function 
vega10_get_performance_level:
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c:5217:23: warning: variable 
data set but not used [-Wunused-but-set-variable]

'data' is introduced by commit f688b614b643 ("drm/amd/pp:
Implement get_performance_level for legacy dgpu"), but never used,
so remove it.

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c 
b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
index a4a7f85..776e632 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
@@ -5252,13 +5252,11 @@ static int vega10_get_performance_level(struct pp_hwmgr 
*hwmgr, const struct pp_
PHM_PerformanceLevel *level)
 {
const struct vega10_power_state *ps;
-   struct vega10_hwmgr *data;
uint32_t i;

if (level == NULL || hwmgr == NULL || state == NULL)
return -EINVAL;

-   data = hwmgr->backend;
ps = cast_const_phw_vega10_power_state(state);

i = index > ps->performance_level_count - 1 ?
--
2.7.4

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

[PATCH] drm/amd/display: Use static const, not const static

2019-11-12 Thread zhengbin
Move the static keyword to the front of declarations.

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c 
b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 1fdba13..0d8c663 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -69,7 +69,7 @@
 #define DC_LOGGER \
dc->ctx->logger

-const static char DC_BUILD_ID[] = "production-build";
+static const char DC_BUILD_ID[] = "production-build";

 /**
  * DOC: Overview
--
2.7.4

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

[PATCH] drm/amdkfd: remove set but not used variable 'top_dev'

2019-11-14 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/amd/amdkfd/kfd_iommu.c: In function kfd_iommu_device_init:
drivers/gpu/drm/amd/amdkfd/kfd_iommu.c:65:30: warning: variable top_dev set but 
not used [-Wunused-but-set-variable]

Reported-by: Hulk Robot 
Fixes: 1ae99eab34f9 ("drm/amdkfd: Initialize HSA_CAP_ATS_PRESENT capability in 
topology codes")
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/amd/amdkfd/kfd_iommu.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_iommu.c 
b/drivers/gpu/drm/amd/amdkfd/kfd_iommu.c
index 193e283..8d87151 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_iommu.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_iommu.c
@@ -62,9 +62,6 @@ int kfd_iommu_device_init(struct kfd_dev *kfd)
struct amd_iommu_device_info iommu_info;
unsigned int pasid_limit;
int err;
-   struct kfd_topology_device *top_dev;
-
-   top_dev = kfd_topology_device_by_id(kfd->id);

if (!kfd->device_info->needs_iommu_device)
return 0;
--
2.7.4

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

[PATCH 3/4] drm/amd/display: remove set but not used variable 'bp' in bios_parser.c

2019-11-15 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/amd/display/dc/bios/bios_parser.c: In function 
bios_get_board_layout_info:
drivers/gpu/drm/amd/display/dc/bios/bios_parser.c:2743:22: warning: variable bp 
set but not used [-Wunused-but-set-variable]

It is introduced by commit 1eeedbcc20d6 ("drm/amd/display:
get board layout for edid emulation"), but never used,
so remove it.

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c 
b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c
index 823843c..c34797c 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c
+++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c
@@ -2739,7 +2739,6 @@ static enum bp_result bios_get_board_layout_info(
struct board_layout_info *board_layout_info)
 {
unsigned int i;
-   struct bios_parser *bp;
enum bp_result record_result;

const unsigned int slot_index_to_vbios_id[MAX_BOARD_SLOTS] = {
@@ -2748,7 +2747,6 @@ static enum bp_result bios_get_board_layout_info(
0, 0
};

-   bp = BP_FROM_DCB(dcb);
if (board_layout_info == NULL) {
DC_LOG_DETECTION_EDID_PARSER("Invalid board_layout_info\n");
return BP_RESULT_BADINPUT;
--
2.7.4

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

[PATCH 0/4] drm/amd/display: remove some set but not used variables

2019-11-15 Thread zhengbin
zhengbin (4):
  drm/amd/display: remove set but not used variable 'old_plane_crtc'
  drm/amd/display: remove set but not used variable 'bp' in
bios_parser2.c
  drm/amd/display: remove set but not used variable 'bp' in
bios_parser.c
  drm/amd/display: remove set but not used variable 'min_content'

 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c   | 3 +--
 drivers/gpu/drm/amd/display/dc/bios/bios_parser.c   | 2 --
 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c  | 2 --
 drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 2 --
 4 files changed, 1 insertion(+), 8 deletions(-)

--
2.7.4

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

[PATCH 2/4] drm/amd/display: remove set but not used variable 'bp' in bios_parser2.c

2019-11-15 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c: In function 
bios_get_board_layout_info:
drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c:1826:22: warning: variable 
bp set but not used [-Wunused-but-set-variable]

It is introduced by commit 1eeedbcc20d6 ("drm/amd/display:
get board layout for edid emulation"), but never used,
so remove it.

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c 
b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
index 6e29ba8..9dc8d4e 100644
--- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
+++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
@@ -1838,7 +1838,6 @@ static enum bp_result bios_get_board_layout_info(
struct board_layout_info *board_layout_info)
 {
unsigned int i;
-   struct bios_parser *bp;
enum bp_result record_result;

const unsigned int slot_index_to_vbios_id[MAX_BOARD_SLOTS] = {
@@ -1847,7 +1846,6 @@ static enum bp_result bios_get_board_layout_info(
0, 0
};

-   bp = BP_FROM_DCB(dcb);
if (board_layout_info == NULL) {
DC_LOG_DETECTION_EDID_PARSER("Invalid board_layout_info\n");
return BP_RESULT_BADINPUT;
--
2.7.4

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

[PATCH 1/4] drm/amd/display: remove set but not used variable 'old_plane_crtc'

2019-11-15 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c: In function 
dm_determine_update_type_for_commit:
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c:6516:36: warning: variable 
old_plane_crtc set but not used [-Wunused-but-set-variable]

It is introduced by commit a87fa9938749 ("drm/amd/display:
Build stream update and plane updates in dm"), but never used,
so remove it.

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c 
b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index c2700bc..700cbd5 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -7611,7 +7611,7 @@ dm_determine_update_type_for_commit(struct 
amdgpu_display_manager *dm,
int i, j, num_plane, ret = 0;
struct drm_plane_state *old_plane_state, *new_plane_state;
struct dm_plane_state *new_dm_plane_state, *old_dm_plane_state;
-   struct drm_crtc *new_plane_crtc, *old_plane_crtc;
+   struct drm_crtc *new_plane_crtc;
struct drm_plane *plane;

struct drm_crtc *crtc;
@@ -7657,7 +7657,6 @@ dm_determine_update_type_for_commit(struct 
amdgpu_display_manager *dm,
uint64_t tiling_flags;

new_plane_crtc = new_plane_state->crtc;
-   old_plane_crtc = old_plane_state->crtc;
new_dm_plane_state = to_dm_plane_state(new_plane_state);
old_dm_plane_state = to_dm_plane_state(old_plane_state);

--
2.7.4

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

[PATCH 4/4] drm/amd/display: remove set but not used variable 'min_content'

2019-11-15 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/amd/display/modules/color/color_gamma.c: In function 
build_freesync_hdr:
drivers/gpu/drm/amd/display/modules/color/color_gamma.c:830:20: warning: 
variable min_content set but not used [-Wunused-but-set-variable]

It is not used since commit 50575eb5b339 ("drm/amd/display:
Only use EETF when maxCL > max display")

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/amd/display/modules/color/color_gamma.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c 
b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c
index 1de4805..9b121b0 100644
--- a/drivers/gpu/drm/amd/display/modules/color/color_gamma.c
+++ b/drivers/gpu/drm/amd/display/modules/color/color_gamma.c
@@ -937,7 +937,6 @@ static bool build_freesync_hdr(struct pwl_float_data_ex 
*rgb_regamma,
struct fixed31_32 max_display;
struct fixed31_32 min_display;
struct fixed31_32 max_content;
-   struct fixed31_32 min_content;
struct fixed31_32 clip = dc_fixpt_one;
struct fixed31_32 output;
bool use_eetf = false;
@@ -951,7 +950,6 @@ static bool build_freesync_hdr(struct pwl_float_data_ex 
*rgb_regamma,
max_display = dc_fixpt_from_int(fs_params->max_display);
min_display = dc_fixpt_from_fraction(fs_params->min_display, 1);
max_content = dc_fixpt_from_int(fs_params->max_content);
-   min_content = dc_fixpt_from_fraction(fs_params->min_content, 1);
sdr_white_level = dc_fixpt_from_int(fs_params->sdr_white_level);

if (fs_params->min_display > 1000) // cap at 0.1 at the bottom
--
2.7.4

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

[PATCH 1/2] drm/nouveau: remove set but not used variable 'pclks', 'width'

2019-11-17 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/nouveau/dispnv04/arb.c: In function nv04_calc_arb:
drivers/gpu/drm/nouveau/dispnv04/arb.c:59:21: warning: variable pclks set but 
not used [-Wunused-but-set-variable]
drivers/gpu/drm/nouveau/dispnv04/arb.c: In function nv04_calc_arb:
drivers/gpu/drm/nouveau/dispnv04/arb.c:58:21: warning: variable width set but 
not used [-Wunused-but-set-variable]

It is introduced by commit 6ee738610f41 ("drm/nouveau:
Add DRM driver for NVIDIA GPUs"), but never used,
so remove it.

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/nouveau/dispnv04/arb.c | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/dispnv04/arb.c 
b/drivers/gpu/drm/nouveau/dispnv04/arb.c
index 3624955..9d4a2d9 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/arb.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/arb.c
@@ -53,8 +53,8 @@ struct nv_sim_state {
 static void
 nv04_calc_arb(struct nv_fifo_info *fifo, struct nv_sim_state *arb)
 {
-   int pagemiss, cas, width, bpp;
-   int nvclks, mclks, pclks, crtpagemiss;
+   int pagemiss, cas, bpp;
+   int nvclks, mclks, crtpagemiss;
int found, mclk_extra, mclk_loop, cbs, m1, p1;
int mclk_freq, pclk_freq, nvclk_freq;
int us_m, us_n, us_p, crtc_drain_rate;
@@ -65,11 +65,9 @@ nv04_calc_arb(struct nv_fifo_info *fifo, struct nv_sim_state 
*arb)
nvclk_freq = arb->nvclk_khz;
pagemiss = arb->mem_page_miss;
cas = arb->mem_latency;
-   width = arb->memory_width >> 6;
bpp = arb->bpp;
cbs = 128;

-   pclks = 2;
nvclks = 10;
mclks = 13 + cas;
mclk_extra = 3;
--
2.7.4

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

[PATCH 5/6] drm/radeon: remove set but not used variable 'blocks'

2019-11-17 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/radeon/radeon_combios.c: In function 
radeon_combios_get_power_modes:
drivers/gpu/drm/radeon/radeon_combios.c:2638:10: warning: variable blocks set 
but not used [-Wunused-but-set-variable]

It is introduced by commit 56278a8edace ("drm/radeon/kms:
pull power mode info from bios tables (v3)"), but never used,
so remove it.

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/radeon/radeon_combios.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_combios.c 
b/drivers/gpu/drm/radeon/radeon_combios.c
index c18ae15..8779412 100644
--- a/drivers/gpu/drm/radeon/radeon_combios.c
+++ b/drivers/gpu/drm/radeon/radeon_combios.c
@@ -2638,7 +2638,7 @@ void radeon_combios_get_power_modes(struct radeon_device 
*rdev)
 {
struct drm_device *dev = rdev->ddev;
u16 offset, misc, misc2 = 0;
-   u8 rev, blocks, tmp;
+   u8 rev, tmp;
int state_index = 0;
struct radeon_i2c_bus_rec i2c_bus;

@@ -2731,7 +2731,6 @@ void radeon_combios_get_power_modes(struct radeon_device 
*rdev)
offset = combios_get_table_offset(dev, 
COMBIOS_POWERPLAY_INFO_TABLE);
if (offset) {
rev = RBIOS8(offset);
-   blocks = RBIOS8(offset + 0x2);
/* power mode 0 tends to be the only valid one */
rdev->pm.power_state[state_index].num_clock_modes = 1;
rdev->pm.power_state[state_index].clock_info[0].mclk = 
RBIOS32(offset + 0x5 + 0x2);
--
2.7.4

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

[PATCH 2/2] drm/nouveau: remove set but not used variable 'mem'

2019-11-17 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/nouveau/nouveau_ttm.c: In function nouveau_vram_manager_new:
drivers/gpu/drm/nouveau/nouveau_ttm.c:66:22: warning: variable mem set but not 
used [-Wunused-but-set-variable]
drivers/gpu/drm/nouveau/nouveau_ttm.c: In function nouveau_gart_manager_new:
drivers/gpu/drm/nouveau/nouveau_ttm.c:106:22: warning: variable mem set but not 
used [-Wunused-but-set-variable]

The first 'mem' is introduced by commit 9ce523cc3bf2 ("drm/nouveau:
separate buffer object backing memory from nvkm structures"),
but never used, so remove it.

The second 'mem' is not used since commit d7722134b825 ("drm/nouveau:
switch over to new memory and vmm interfaces")

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/nouveau/nouveau_ttm.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c 
b/drivers/gpu/drm/nouveau/nouveau_ttm.c
index 77a0c6a..7ca0a24 100644
--- a/drivers/gpu/drm/nouveau/nouveau_ttm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c
@@ -63,14 +63,12 @@ nouveau_vram_manager_new(struct ttm_mem_type_manager *man,
 {
struct nouveau_bo *nvbo = nouveau_bo(bo);
struct nouveau_drm *drm = nouveau_bdev(bo->bdev);
-   struct nouveau_mem *mem;
int ret;

if (drm->client.device.info.ram_size == 0)
return -ENOMEM;

ret = nouveau_mem_new(&drm->master, nvbo->kind, nvbo->comp, reg);
-   mem = nouveau_mem(reg);
if (ret)
return ret;

@@ -103,11 +101,9 @@ nouveau_gart_manager_new(struct ttm_mem_type_manager *man,
 {
struct nouveau_bo *nvbo = nouveau_bo(bo);
struct nouveau_drm *drm = nouveau_bdev(bo->bdev);
-   struct nouveau_mem *mem;
int ret;

ret = nouveau_mem_new(&drm->master, nvbo->kind, nvbo->comp, reg);
-   mem = nouveau_mem(reg);
if (ret)
return ret;

--
2.7.4

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

[PATCH 0/6] drm/radeon: remove some set but not used variables

2019-11-17 Thread zhengbin
zhengbin (6):
  drm/radeon: remove set but not used variable 'size','relocs_chunk'
  drm/radeon: remove set but not used variable 'backbias_response_time'
  drm/radeon: remove set but not used variable 'dig_connector'
  drm/radeon: remove set but not used variable 'radeon_connector'
  drm/radeon: remove set but not used variable 'blocks'
  drm/radeon: remove set but not used variable 'tv_pll_cntl1'

 drivers/gpu/drm/radeon/atombios_dp.c  | 3 ---
 drivers/gpu/drm/radeon/r600_cs.c  | 8 ++--
 drivers/gpu/drm/radeon/radeon_combios.c   | 3 +--
 drivers/gpu/drm/radeon/radeon_display.c   | 2 --
 drivers/gpu/drm/radeon/radeon_legacy_tv.c | 8 +---
 drivers/gpu/drm/radeon/si_dpm.c   | 3 +--
 6 files changed, 5 insertions(+), 22 deletions(-)

--
2.7.4

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

[PATCH 1/3] drm/gma500: remove set but not used variable 'htotal'

2019-11-17 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/gma500/oaktrail_hdmi.c: In function htotal_calculate:
drivers/gpu/drm/gma500/oaktrail_hdmi.c:160:6: warning: variable htotal set but 
not used [-Wunused-but-set-variable]

It is introduced by commit 39ec748f7174 ("gma600: Enable HDMI support"),
but never used, so remove it.

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/gma500/oaktrail_hdmi.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/gma500/oaktrail_hdmi.c 
b/drivers/gpu/drm/gma500/oaktrail_hdmi.c
index f4c5208..f437023 100644
--- a/drivers/gpu/drm/gma500/oaktrail_hdmi.c
+++ b/drivers/gpu/drm/gma500/oaktrail_hdmi.c
@@ -159,9 +159,7 @@ static void oaktrail_hdmi_audio_disable(struct drm_device 
*dev)

 static unsigned int htotal_calculate(struct drm_display_mode *mode)
 {
-   u32 htotal, new_crtc_htotal;
-
-   htotal = (mode->crtc_hdisplay - 1) | ((mode->crtc_htotal - 1) << 16);
+   u32 new_crtc_htotal;

/*
 * 1024 x 768  new_crtc_htotal = 0x1024;
--
2.7.4

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

[PATCH 0/2] drm/nouveau: remove some set but not used variables

2019-11-17 Thread zhengbin
zhengbin (2):
  drm/nouveau: remove set but not used variable 'pclks','width'
  drm/nouveau: remove set but not used variable 'mem'

 drivers/gpu/drm/nouveau/dispnv04/arb.c | 6 ++
 drivers/gpu/drm/nouveau/nouveau_ttm.c  | 4 
 2 files changed, 2 insertions(+), 8 deletions(-)

--
2.7.4

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

[PATCH 6/6] drm/radeon: remove set but not used variable 'tv_pll_cntl1'

2019-11-17 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/radeon/radeon_legacy_tv.c: In function 
radeon_legacy_tv_mode_set:
drivers/gpu/drm/radeon/radeon_legacy_tv.c:538:24: warning: variable 
tv_pll_cntl1 set but not used [-Wunused-but-set-variable]

It is introduced by commit 4ce001abafaf ("drm/radeon/kms:
add initial radeon tv-out support."), but never used,
so remove it.

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/radeon/radeon_legacy_tv.c | 8 +---
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_legacy_tv.c 
b/drivers/gpu/drm/radeon/radeon_legacy_tv.c
index f132eec..d9df7f3 100644
--- a/drivers/gpu/drm/radeon/radeon_legacy_tv.c
+++ b/drivers/gpu/drm/radeon/radeon_legacy_tv.c
@@ -537,7 +537,7 @@ void radeon_legacy_tv_mode_set(struct drm_encoder *encoder,
uint32_t tv_master_cntl, tv_rgb_cntl, tv_dac_cntl;
uint32_t tv_modulator_cntl1, tv_modulator_cntl2;
uint32_t tv_vscaler_cntl1, tv_vscaler_cntl2;
-   uint32_t tv_pll_cntl, tv_pll_cntl1, tv_ftotal;
+   uint32_t tv_pll_cntl, tv_ftotal;
uint32_t tv_y_fall_cntl, tv_y_rise_cntl, tv_y_saw_tooth_cntl;
uint32_t m, n, p;
const uint16_t *hor_timing;
@@ -709,12 +709,6 @@ void radeon_legacy_tv_mode_set(struct drm_encoder *encoder,
(((n >> 9) & RADEON_TV_N0HI_MASK) << RADEON_TV_N0HI_SHIFT) |
((p & RADEON_TV_P_MASK) << RADEON_TV_P_SHIFT);

-   tv_pll_cntl1 = (((4 & RADEON_TVPCP_MASK) << RADEON_TVPCP_SHIFT) |
-   ((4 & RADEON_TVPVG_MASK) << RADEON_TVPVG_SHIFT) |
-   ((1 & RADEON_TVPDC_MASK) << RADEON_TVPDC_SHIFT) |
-   RADEON_TVCLK_SRC_SEL_TVPLL |
-   RADEON_TVPLL_TEST_DIS);
-
tv_dac->tv.tv_uv_adr = 0xc8;

if (tv_dac->tv_std == TV_STD_NTSC ||
--
2.7.4

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

[PATCH 2/6] drm/radeon: remove set but not used variable 'backbias_response_time'

2019-11-17 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/radeon/si_dpm.c: In function si_program_response_times:
drivers/gpu/drm/radeon/si_dpm.c:3640:29: warning: variable 
backbias_response_time set but not used [-Wunused-but-set-variable]

It is introduced by commit a9e61410921b ("drm/radeon/kms:
add dpm support for SI (v7)"), but never used, so remove it.

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/radeon/si_dpm.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c
index a0b382a..8148a78 100644
--- a/drivers/gpu/drm/radeon/si_dpm.c
+++ b/drivers/gpu/drm/radeon/si_dpm.c
@@ -3640,14 +3640,13 @@ static int si_notify_smc_display_change(struct 
radeon_device *rdev,

 static void si_program_response_times(struct radeon_device *rdev)
 {
-   u32 voltage_response_time, backbias_response_time, acpi_delay_time, 
vbi_time_out;
+   u32 voltage_response_time, acpi_delay_time, vbi_time_out;
u32 vddc_dly, acpi_dly, vbi_dly;
u32 reference_clock;

si_write_smc_soft_register(rdev, SI_SMC_SOFT_REGISTER_mvdd_chg_time, 1);

voltage_response_time = (u32)rdev->pm.dpm.voltage_response_time;
-   backbias_response_time = (u32)rdev->pm.dpm.backbias_response_time;

if (voltage_response_time == 0)
voltage_response_time = 1000;
--
2.7.4

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

[PATCH 3/3] drm/gma500: remove set but not used variable 'is_hdmi', 'is_crt'

2019-11-17 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/gma500/cdv_intel_display.c: In function cdv_intel_crtc_mode_set:
drivers/gpu/drm/gma500/cdv_intel_display.c:594:7: warning: variable is_hdmi set 
but not used [-Wunused-but-set-variable]
drivers/gpu/drm/gma500/cdv_intel_display.c: In function cdv_intel_crtc_mode_set:
drivers/gpu/drm/gma500/cdv_intel_display.c:593:7: warning: variable is_crt set 
but not used [-Wunused-but-set-variable]

They are not used since commit acd7ef927e06 ("gma500:
Update the Cedarview clock handling")

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/gma500/cdv_intel_display.c | 7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/gma500/cdv_intel_display.c 
b/drivers/gpu/drm/gma500/cdv_intel_display.c
index 8b78494..334a203 100644
--- a/drivers/gpu/drm/gma500/cdv_intel_display.c
+++ b/drivers/gpu/drm/gma500/cdv_intel_display.c
@@ -582,8 +582,8 @@ static int cdv_intel_crtc_mode_set(struct drm_crtc *crtc,
struct gma_clock_t clock;
u32 dpll = 0, dspcntr, pipeconf;
bool ok;
-   bool is_crt = false, is_lvds = false, is_tv = false;
-   bool is_hdmi = false, is_dp = false;
+   bool is_lvds = false, is_tv = false;
+   bool is_dp = false;
struct drm_mode_config *mode_config = &dev->mode_config;
struct drm_connector *connector;
const struct gma_limit_t *limit;
@@ -607,10 +607,7 @@ static int cdv_intel_crtc_mode_set(struct drm_crtc *crtc,
is_tv = true;
break;
case INTEL_OUTPUT_ANALOG:
-   is_crt = true;
-   break;
case INTEL_OUTPUT_HDMI:
-   is_hdmi = true;
break;
case INTEL_OUTPUT_DISPLAYPORT:
is_dp = true;
--
2.7.4

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

[PATCH] drm/gma500: remove set but not used variable 'channel_eq'

2019-11-17 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/gma500/cdv_intel_dp.c: In function 
cdv_intel_dp_complete_link_train:
drivers/gpu/drm/gma500/cdv_intel_dp.c:1596:7: warning: variable channel_eq set 
but not used [-Wunused-but-set-variable]

It is never used, so remove it.

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/gma500/cdv_intel_dp.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/gma500/cdv_intel_dp.c 
b/drivers/gpu/drm/gma500/cdv_intel_dp.c
index 570b595..5772b2d 100644
--- a/drivers/gpu/drm/gma500/cdv_intel_dp.c
+++ b/drivers/gpu/drm/gma500/cdv_intel_dp.c
@@ -1594,7 +1594,6 @@ cdv_intel_dp_complete_link_train(struct gma_encoder 
*encoder)
 {
struct drm_device *dev = encoder->base.dev;
struct cdv_intel_dp *intel_dp = encoder->dev_priv;
-   bool channel_eq = false;
int tries, cr_tries;
u32 reg;
uint32_t DP = intel_dp->DP;
@@ -1602,7 +1601,6 @@ cdv_intel_dp_complete_link_train(struct gma_encoder 
*encoder)
/* channel equalization */
tries = 0;
cr_tries = 0;
-   channel_eq = false;

DRM_DEBUG_KMS("\n");
reg = DP | DP_LINK_TRAIN_PAT_2;
@@ -1648,7 +1646,6 @@ cdv_intel_dp_complete_link_train(struct gma_encoder 
*encoder)

if (cdv_intel_channel_eq_ok(encoder)) {
DRM_DEBUG_KMS("PT2 train is done\n");
-   channel_eq = true;
break;
}

--
2.7.4

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

[PATCH 0/3] drm/gma500: remove some set but not used variables

2019-11-17 Thread zhengbin
zhengbin (3):
  drm/gma500: remove set but not used variable 'htotal'
  drm/gma500: remove set but not used variable 'error'
  drm/gma500: remove set but not used variable 'is_hdmi','is_crt'

 drivers/gpu/drm/gma500/cdv_intel_display.c | 7 ++-
 drivers/gpu/drm/gma500/oaktrail_hdmi.c | 4 +---
 drivers/gpu/drm/gma500/psb_irq.c   | 2 --
 3 files changed, 3 insertions(+), 10 deletions(-)

--
2.7.4

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

[PATCH 4/6] drm/radeon: remove set but not used variable 'radeon_connector'

2019-11-17 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/radeon/radeon_display.c: In function 
radeon_crtc_scaling_mode_fixup:
drivers/gpu/drm/radeon/radeon_display.c:1685:27: warning: variable 
radeon_connector set but not used [-Wunused-but-set-variable]

It is not used since commit 377bd8a98d7d ("drm/radeon:
use a fetch function to get the edid")

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/radeon/radeon_display.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_display.c 
b/drivers/gpu/drm/radeon/radeon_display.c
index e81b01f..84d3d885 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -1687,7 +1687,6 @@ bool radeon_crtc_scaling_mode_fixup(struct drm_crtc *crtc,
struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc);
struct radeon_encoder *radeon_encoder;
struct drm_connector *connector;
-   struct radeon_connector *radeon_connector;
bool first = true;
u32 src_v = 1, dst_v = 1;
u32 src_h = 1, dst_h = 1;
@@ -1700,7 +1699,6 @@ bool radeon_crtc_scaling_mode_fixup(struct drm_crtc *crtc,
continue;
radeon_encoder = to_radeon_encoder(encoder);
connector = radeon_get_connector_for_encoder(encoder);
-   radeon_connector = to_radeon_connector(connector);

if (first) {
/* set scaling */
--
2.7.4

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

[PATCH 3/6] drm/radeon: remove set but not used variable 'dig_connector'

2019-11-17 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/radeon/atombios_dp.c: In function radeon_dp_get_panel_mode:
drivers/gpu/drm/radeon/atombios_dp.c:415:36: warning: variable dig_connector 
set but not used [-Wunused-but-set-variable]

It is not used since commit 379dfc25e257 ("drm/radeon/dp:
switch to the common i2c over aux code")

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/radeon/atombios_dp.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/radeon/atombios_dp.c 
b/drivers/gpu/drm/radeon/atombios_dp.c
index 6f38375..911735f 100644
--- a/drivers/gpu/drm/radeon/atombios_dp.c
+++ b/drivers/gpu/drm/radeon/atombios_dp.c
@@ -412,7 +412,6 @@ int radeon_dp_get_panel_mode(struct drm_encoder *encoder,
struct drm_device *dev = encoder->dev;
struct radeon_device *rdev = dev->dev_private;
struct radeon_connector *radeon_connector = 
to_radeon_connector(connector);
-   struct radeon_connector_atom_dig *dig_connector;
int panel_mode = DP_PANEL_MODE_EXTERNAL_DP_MODE;
u16 dp_bridge = 
radeon_connector_encoder_get_dp_bridge_encoder_id(connector);
u8 tmp;
@@ -423,8 +422,6 @@ int radeon_dp_get_panel_mode(struct drm_encoder *encoder,
if (!radeon_connector->con_priv)
return panel_mode;

-   dig_connector = radeon_connector->con_priv;
-
if (dp_bridge != ENCODER_OBJECT_ID_NONE) {
/* DP bridge chips */
if (drm_dp_dpcd_readb(&radeon_connector->ddc_bus->aux,
--
2.7.4

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

[PATCH 1/6] drm/radeon: remove set but not used variable 'size', 'relocs_chunk'

2019-11-17 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/radeon/r600_cs.c: In function r600_cs_track_validate_cb:
drivers/gpu/drm/radeon/r600_cs.c:353:22: warning: variable size set but not 
used [-Wunused-but-set-variable]
drivers/gpu/drm/radeon/r600_cs.c: In function r600_cs_track_validate_db:
drivers/gpu/drm/radeon/r600_cs.c:520:27: warning: variable size set but not 
used [-Wunused-but-set-variable]
drivers/gpu/drm/radeon/r600_cs.c: In function r600_dma_cs_next_reloc:
drivers/gpu/drm/radeon/r600_cs.c:2345:26: warning: variable relocs_chunk set 
but not used [-Wunused-but-set-variable]

The first 'size' is not used since commit f30df2fad0c9 ("drm/radeon/r600:
fix tiling issues in CS checker.")

The second 'size' is introduced by commit 88f50c80748b ("drm/radeon/kms:
add htile support to the cs checker v3"), but never used, so remove it.

'relocs_chunk' is not used since commit 9305ede6afe2 ("radeon/kms:
fix dma relocation checking")

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/radeon/r600_cs.c | 8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/radeon/r600_cs.c b/drivers/gpu/drm/radeon/r600_cs.c
index d6c28a5..49e8266 100644
--- a/drivers/gpu/drm/radeon/r600_cs.c
+++ b/drivers/gpu/drm/radeon/r600_cs.c
@@ -350,7 +350,7 @@ static void r600_cs_track_init(struct r600_cs_track *track)
 static int r600_cs_track_validate_cb(struct radeon_cs_parser *p, int i)
 {
struct r600_cs_track *track = p->track;
-   u32 slice_tile_max, size, tmp;
+   u32 slice_tile_max, tmp;
u32 height, height_align, pitch, pitch_align, depth_align;
u64 base_offset, base_align;
struct array_mode_checker array_check;
@@ -360,7 +360,6 @@ static int r600_cs_track_validate_cb(struct 
radeon_cs_parser *p, int i)
/* When resolve is used, the second colorbuffer has always 1 sample. */
unsigned nsamples = track->is_resolve && i == 1 ? 1 : track->nsamples;

-   size = radeon_bo_size(track->cb_color_bo[i]) - 
track->cb_color_bo_offset[i];
format = G_0280A0_FORMAT(track->cb_color_info[i]);
if (!r600_fmt_is_valid_color(format)) {
dev_warn(p->dev, "%s:%d cb invalid format %d for %d (0x%08X)\n",
@@ -517,7 +516,7 @@ static int r600_cs_track_validate_cb(struct 
radeon_cs_parser *p, int i)
 static int r600_cs_track_validate_db(struct radeon_cs_parser *p)
 {
struct r600_cs_track *track = p->track;
-   u32 nviews, bpe, ntiles, size, slice_tile_max, tmp;
+   u32 nviews, bpe, ntiles, slice_tile_max, tmp;
u32 height_align, pitch_align, depth_align;
u32 pitch = 8192;
u32 height = 8192;
@@ -564,7 +563,6 @@ static int r600_cs_track_validate_db(struct 
radeon_cs_parser *p)
}
ib[track->db_depth_size_idx] = S_028000_SLICE_TILE_MAX(tmp - 1) 
| (track->db_depth_size & 0x3FF);
} else {
-   size = radeon_bo_size(track->db_bo);
/* pitch in pixels */
pitch = (G_028000_PITCH_TILE_MAX(track->db_depth_size) + 1) * 8;
slice_tile_max = G_028000_SLICE_TILE_MAX(track->db_depth_size) 
+ 1;
@@ -2342,7 +2340,6 @@ int r600_cs_parse(struct radeon_cs_parser *p)
 int r600_dma_cs_next_reloc(struct radeon_cs_parser *p,
   struct radeon_bo_list **cs_reloc)
 {
-   struct radeon_cs_chunk *relocs_chunk;
unsigned idx;

*cs_reloc = NULL;
@@ -2350,7 +2347,6 @@ int r600_dma_cs_next_reloc(struct radeon_cs_parser *p,
DRM_ERROR("No relocation chunk !\n");
return -EINVAL;
}
-   relocs_chunk = p->chunk_relocs;
idx = p->dma_reloc_idx;
if (idx >= p->nrelocs) {
DRM_ERROR("Relocs at %d after relocations chunk end %d !\n",
--
2.7.4

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

[PATCH 2/3] drm/gma500: remove set but not used variable 'error'

2019-11-17 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/gma500/psb_irq.c: In function psb_sgx_interrupt:
drivers/gpu/drm/gma500/psb_irq.c:210:6: warning: variable error set but not 
used [-Wunused-but-set-variable]

It is introduced by commit 64a4aff283ac ("drm/gma500:
Add support for SGX interrupts"), but never used, so remove it.

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/gma500/psb_irq.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/gma500/psb_irq.c b/drivers/gpu/drm/gma500/psb_irq.c
index e6265fb..dc6a73a 100644
--- a/drivers/gpu/drm/gma500/psb_irq.c
+++ b/drivers/gpu/drm/gma500/psb_irq.c
@@ -194,7 +194,6 @@ static void psb_sgx_interrupt(struct drm_device *dev, u32 
stat_1, u32 stat_2)
 {
struct drm_psb_private *dev_priv = dev->dev_private;
u32 val, addr;
-   int error = false;

if (stat_1 & _PSB_CE_TWOD_COMPLETE)
val = PSB_RSGX32(PSB_CR_2D_BLIT_STATUS);
@@ -229,7 +228,6 @@ static void psb_sgx_interrupt(struct drm_device *dev, u32 
stat_1, u32 stat_2)

DRM_ERROR("\tMMU failing address is 0x%08x.\n",
  (unsigned int)addr);
-   error = true;
}
}

--
2.7.4

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

[PATCH 2/5] drm/sun4i: Use PTR_ERR_OR_ZERO() to simplify code in sun4i_tmds_create

2019-11-19 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c:232:1-3: WARNING: PTR_ERR_OR_ZERO 
can be used

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c 
b/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c
index fbf7da9..c90dd0a 100644
--- a/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c
+++ b/drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c
@@ -229,8 +229,5 @@ int sun4i_tmds_create(struct sun4i_hdmi *hdmi)
tmds->div_offset = hdmi->variant->tmds_clk_div_offset;

hdmi->tmds_clk = devm_clk_register(hdmi->dev, &tmds->hw);
-   if (IS_ERR(hdmi->tmds_clk))
-   return PTR_ERR(hdmi->tmds_clk);
-
-   return 0;
+   return PTR_ERR_OR_ZERO(hdmi->tmds_clk);
 }
--
2.7.4

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

[PATCH 5/5] drm/sun4i: Use PTR_ERR_OR_ZERO() to simplify code in sun8i_phy_clk_create

2019-11-19 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/sun4i/sun8i_hdmi_phy_clk.c:174:1-3: WARNING: PTR_ERR_OR_ZERO 
can be used

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/sun4i/sun8i_hdmi_phy_clk.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/sun4i/sun8i_hdmi_phy_clk.c 
b/drivers/gpu/drm/sun4i/sun8i_hdmi_phy_clk.c
index a4d31fe..fb0d77d 100644
--- a/drivers/gpu/drm/sun4i/sun8i_hdmi_phy_clk.c
+++ b/drivers/gpu/drm/sun4i/sun8i_hdmi_phy_clk.c
@@ -171,8 +171,5 @@ int sun8i_phy_clk_create(struct sun8i_hdmi_phy *phy, struct 
device *dev,
priv->hw.init = &init;

phy->clk_phy = devm_clk_register(dev, &priv->hw);
-   if (IS_ERR(phy->clk_phy))
-   return PTR_ERR(phy->clk_phy);
-
-   return 0;
+   return PTR_ERR_OR_ZERO(phy->clk_phy);
 }
--
2.7.4

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

[PATCH 2/4] drm/omap: dss: Use PTR_ERR_OR_ZERO() to simplify code in hdmi4_core_init

2019-11-19 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/omapdrm/dss/hdmi4_core.c:927:1-3: WARNING: PTR_ERR_OR_ZERO can 
be used

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c 
b/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
index ea5d5c2..ba512f8 100644
--- a/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
+++ b/drivers/gpu/drm/omapdrm/dss/hdmi4_core.c
@@ -924,8 +924,5 @@ int hdmi4_core_init(struct platform_device *pdev, struct 
hdmi_core_data *core)

res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "core");
core->base = devm_ioremap_resource(&pdev->dev, res);
-   if (IS_ERR(core->base))
-   return PTR_ERR(core->base);
-
-   return 0;
+   return PTR_ERR_OR_ZERO(core->base);
 }
--
2.7.4

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

[PATCH 3/4] drm/omap: dss: Use PTR_ERR_OR_ZERO() to simplify code in hdmi5_core_init

2019-11-19 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/omapdrm/dss/hdmi5_core.c:911:1-3: WARNING: PTR_ERR_OR_ZERO can 
be used

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/omapdrm/dss/hdmi5_core.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi5_core.c 
b/drivers/gpu/drm/omapdrm/dss/hdmi5_core.c
index ff4d35c..b577969 100644
--- a/drivers/gpu/drm/omapdrm/dss/hdmi5_core.c
+++ b/drivers/gpu/drm/omapdrm/dss/hdmi5_core.c
@@ -908,8 +908,5 @@ int hdmi5_core_init(struct platform_device *pdev, struct 
hdmi_core_data *core)

res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "core");
core->base = devm_ioremap_resource(&pdev->dev, res);
-   if (IS_ERR(core->base))
-   return PTR_ERR(core->base);
-
-   return 0;
+   return PTR_ERR_OR_ZERO(core->base);
 }
--
2.7.4

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

[PATCH 2/2] drm/tegra: Use PTR_ERR_OR_ZERO() to simplify code in tegra_gem_create

2019-11-19 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/tegra/drm.c:350:1-3: WARNING: PTR_ERR_OR_ZERO can be used

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/tegra/drm.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c
index 56e5e7a..8b6a1f7d 100644
--- a/drivers/gpu/drm/tegra/drm.c
+++ b/drivers/gpu/drm/tegra/drm.c
@@ -347,10 +347,7 @@ static int tegra_gem_create(struct drm_device *drm, void 
*data,

bo = tegra_bo_create_with_handle(file, drm, args->size, args->flags,
 &args->handle);
-   if (IS_ERR(bo))
-   return PTR_ERR(bo);
-
-   return 0;
+   return PTR_ERR_OR_ZERO(bo);
 }

 static int tegra_gem_mmap(struct drm_device *drm, void *data,
--
2.7.4

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

[PATCH 0/2] drm/tegra: Use PTR_ERR_OR_ZERO() to simplify code

2019-11-19 Thread zhengbin
zhengbin (2):
  drm/tegra: Use PTR_ERR_OR_ZERO() to simplify code in
tegra_bo_dumb_create
  drm/tegra: Use PTR_ERR_OR_ZERO() to simplify code in tegra_gem_create

 drivers/gpu/drm/tegra/drm.c | 5 +
 drivers/gpu/drm/tegra/gem.c | 5 +
 2 files changed, 2 insertions(+), 8 deletions(-)

--
2.7.4

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

[PATCH 4/5] drm/sun4i: Use PTR_ERR_OR_ZERO() to simplify code in sun4i_ddc_create

2019-11-19 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/sun4i/sun4i_hdmi_ddc_clk.c:138:1-3: WARNING: PTR_ERR_OR_ZERO 
can be used

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/sun4i/sun4i_hdmi_ddc_clk.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/sun4i/sun4i_hdmi_ddc_clk.c 
b/drivers/gpu/drm/sun4i/sun4i_hdmi_ddc_clk.c
index 2ff7801..cf7e442 100644
--- a/drivers/gpu/drm/sun4i/sun4i_hdmi_ddc_clk.c
+++ b/drivers/gpu/drm/sun4i/sun4i_hdmi_ddc_clk.c
@@ -135,8 +135,5 @@ int sun4i_ddc_create(struct sun4i_hdmi *hdmi, struct clk 
*parent)
ddc->m_offset = hdmi->variant->ddc_clk_m_offset;

hdmi->ddc_clk = devm_clk_register(hdmi->dev, &ddc->hw);
-   if (IS_ERR(hdmi->ddc_clk))
-   return PTR_ERR(hdmi->ddc_clk);
-
-   return 0;
+   return PTR_ERR_OR_ZERO(hdmi->ddc_clk);
 }
--
2.7.4

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

[PATCH 1/2] drm/tegra: Use PTR_ERR_OR_ZERO() to simplify code in tegra_bo_dumb_create

2019-11-19 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/tegra/gem.c:457:1-3: WARNING: PTR_ERR_OR_ZERO can be used

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/tegra/gem.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/tegra/gem.c b/drivers/gpu/drm/tegra/gem.c
index 746dae3..dae3efe 100644
--- a/drivers/gpu/drm/tegra/gem.c
+++ b/drivers/gpu/drm/tegra/gem.c
@@ -454,10 +454,7 @@ int tegra_bo_dumb_create(struct drm_file *file, struct 
drm_device *drm,

bo = tegra_bo_create_with_handle(file, drm, args->size, 0,
 &args->handle);
-   if (IS_ERR(bo))
-   return PTR_ERR(bo);
-
-   return 0;
+   return PTR_ERR_OR_ZERO(bo);
 }

 static vm_fault_t tegra_bo_fault(struct vm_fault *vmf)
--
2.7.4

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

[PATCH 1/5] drm/sun4i: Use PTR_ERR_OR_ZERO() to simplify code in sun4i_hdmi_init_regmap_fields

2019-11-19 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c:281:1-3: WARNING: PTR_ERR_OR_ZERO can be 
used

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c 
b/drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c
index b66fa27..ac435e5 100644
--- a/drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c
+++ b/drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c
@@ -278,10 +278,7 @@ static int sun4i_hdmi_init_regmap_fields(struct sun4i_hdmi 
*hdmi)
hdmi->field_ddc_sck_en =
devm_regmap_field_alloc(hdmi->dev, hdmi->regmap,
hdmi->variant->field_ddc_sck_en);
-   if (IS_ERR(hdmi->field_ddc_sck_en))
-   return PTR_ERR(hdmi->field_ddc_sck_en);
-
-   return 0;
+   return PTR_ERR_OR_ZERO(hdmi->field_ddc_sck_en);
 }

 int sun4i_hdmi_i2c_create(struct device *dev, struct sun4i_hdmi *hdmi)
--
2.7.4

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

[PATCH 4/4] drm/omap: dss: Use PTR_ERR_OR_ZERO() to simplify code in hdmi_phy_init

2019-11-19 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/omapdrm/dss/hdmi_phy.c:194:1-3: WARNING: PTR_ERR_OR_ZERO can be 
used

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/omapdrm/dss/hdmi_phy.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi_phy.c 
b/drivers/gpu/drm/omapdrm/dss/hdmi_phy.c
index 00bbf24..408b2e0 100644
--- a/drivers/gpu/drm/omapdrm/dss/hdmi_phy.c
+++ b/drivers/gpu/drm/omapdrm/dss/hdmi_phy.c
@@ -191,8 +191,5 @@ int hdmi_phy_init(struct platform_device *pdev, struct 
hdmi_phy_data *phy,

res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "phy");
phy->base = devm_ioremap_resource(&pdev->dev, res);
-   if (IS_ERR(phy->base))
-   return PTR_ERR(phy->base);
-
-   return 0;
+   return PTR_ERR_OR_ZERO(phy->base);
 }
--
2.7.4

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

[PATCH 3/5] drm/sun4i: Use PTR_ERR_OR_ZERO() to simplify code in sun4i_dclk_create

2019-11-19 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/sun4i/sun4i_dotclock.c:194:1-3: WARNING: PTR_ERR_OR_ZERO can be 
used

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/sun4i/sun4i_dotclock.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/sun4i/sun4i_dotclock.c 
b/drivers/gpu/drm/sun4i/sun4i_dotclock.c
index 417ade3d..b4db36c 100644
--- a/drivers/gpu/drm/sun4i/sun4i_dotclock.c
+++ b/drivers/gpu/drm/sun4i/sun4i_dotclock.c
@@ -191,10 +191,7 @@ int sun4i_dclk_create(struct device *dev, struct 
sun4i_tcon *tcon)
dclk->hw.init = &init;

tcon->dclk = clk_register(dev, &dclk->hw);
-   if (IS_ERR(tcon->dclk))
-   return PTR_ERR(tcon->dclk);
-
-   return 0;
+   return PTR_ERR_OR_ZERO(tcon->dclk);
 }
 EXPORT_SYMBOL(sun4i_dclk_create);

--
2.7.4

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

[PATCH 0/5] drm/sun4i: Use PTR_ERR_OR_ZERO() to simplify code

2019-11-19 Thread zhengbin
zhengbin (5):
  drm/sun4i: Use PTR_ERR_OR_ZERO() to simplify code in
sun4i_hdmi_init_regmap_fields
  drm/sun4i: Use PTR_ERR_OR_ZERO() to simplify code in sun4i_tmds_create
  drm/sun4i: Use PTR_ERR_OR_ZERO() to simplify code in sun4i_dclk_create
  drm/sun4i: Use PTR_ERR_OR_ZERO() to simplify code in sun4i_ddc_create
  drm/sun4i: Use PTR_ERR_OR_ZERO() to simplify code in
sun8i_phy_clk_create

 drivers/gpu/drm/sun4i/sun4i_dotclock.c  | 5 +
 drivers/gpu/drm/sun4i/sun4i_hdmi_ddc_clk.c  | 5 +
 drivers/gpu/drm/sun4i/sun4i_hdmi_i2c.c  | 5 +
 drivers/gpu/drm/sun4i/sun4i_hdmi_tmds_clk.c | 5 +
 drivers/gpu/drm/sun4i/sun8i_hdmi_phy_clk.c  | 5 +
 5 files changed, 5 insertions(+), 20 deletions(-)

--
2.7.4

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

[PATCH 0/4] drm/omap: dss: Use PTR_ERR_OR_ZERO() to simplify code

2019-11-19 Thread zhengbin
zhengbin (4):
  drm/omap: dss: Use PTR_ERR_OR_ZERO() to simplify code in
hdmi_audio_register
  drm/omap: dss: Use PTR_ERR_OR_ZERO() to simplify code in
hdmi4_core_init
  drm/omap: dss: Use PTR_ERR_OR_ZERO() to simplify code in
hdmi5_core_init
  drm/omap: dss: Use PTR_ERR_OR_ZERO() to simplify code in hdmi_phy_init

 drivers/gpu/drm/omapdrm/dss/hdmi4.c  | 5 +
 drivers/gpu/drm/omapdrm/dss/hdmi4_core.c | 5 +
 drivers/gpu/drm/omapdrm/dss/hdmi5_core.c | 5 +
 drivers/gpu/drm/omapdrm/dss/hdmi_phy.c   | 5 +
 4 files changed, 4 insertions(+), 16 deletions(-)

--
2.7.4

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

[PATCH] drm/amdgpu: remove not needed memset

2019-11-19 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c:64:13-31: WARNING: dma_alloc_coherent 
use in ih -> ring already zeroes out memory,  so memset is not needed

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c
index 6d8f055..111a301 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ih.c
@@ -66,7 +66,6 @@ int amdgpu_ih_ring_init(struct amdgpu_device *adev, struct 
amdgpu_ih_ring *ih,
if (ih->ring == NULL)
return -ENOMEM;

-   memset((void *)ih->ring, 0, ih->ring_size + 8);
ih->gpu_addr = dma_addr;
ih->wptr_addr = dma_addr + ih->ring_size;
ih->wptr_cpu = &ih->ring[ih->ring_size / 4];
--
2.7.4

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

[PATCH 1/4] drm/omap: dss: Use PTR_ERR_OR_ZERO() to simplify code in hdmi_audio_register

2019-11-19 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/omapdrm/dss/hdmi4.c:590:1-3: WARNING: PTR_ERR_OR_ZERO can be 
used

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/omapdrm/dss/hdmi4.c | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4.c 
b/drivers/gpu/drm/omapdrm/dss/hdmi4.c
index 0f557fa..eb71bae 100644
--- a/drivers/gpu/drm/omapdrm/dss/hdmi4.c
+++ b/drivers/gpu/drm/omapdrm/dss/hdmi4.c
@@ -587,10 +587,7 @@ static int hdmi_audio_register(struct omap_hdmi *hdmi)
&hdmi->pdev->dev, "omap-hdmi-audio", PLATFORM_DEVID_AUTO,
&pdata, sizeof(pdata));

-   if (IS_ERR(hdmi->audio_pdev))
-   return PTR_ERR(hdmi->audio_pdev);
-
-   return 0;
+   return PTR_ERR_OR_ZERO(hdmi->audio_pdev);
 }

 /* 
-
--
2.7.4

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

[PATCH 4/4] drm/msm/dpu: Remove unneeded semicolon in dpu_encoder.c

2019-12-14 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:2260:3-4: Unneeded semicolon

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c 
b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
index f96e142..0974aa8 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
@@ -2257,7 +2257,7 @@ int dpu_encoder_wait_for_event(struct drm_encoder 
*drm_enc,
DPU_ERROR_ENC(dpu_enc, "unknown wait event %d\n",
event);
return -EINVAL;
-   };
+   }

if (fn_wait) {
DPU_ATRACE_BEGIN("wait_for_completion_event");
--
2.7.4

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


[PATCH 1/2] drm/sun4i: Remove unneeded semicolon in sun8i_mixer.c

2019-12-14 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/sun4i/sun8i_mixer.c:289:3-4: Unneeded semicolon
drivers/gpu/drm/sun4i/sun8i_mixer.c:292:2-3: Unneeded semicolon
drivers/gpu/drm/sun4i/sun8i_mixer.c:302:3-4: Unneeded semicolon
drivers/gpu/drm/sun4i/sun8i_mixer.c:305:2-3: Unneeded semicolon

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/sun4i/sun8i_mixer.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/sun4i/sun8i_mixer.c 
b/drivers/gpu/drm/sun4i/sun8i_mixer.c
index 8b803eb..7c24f8f 100644
--- a/drivers/gpu/drm/sun4i/sun8i_mixer.c
+++ b/drivers/gpu/drm/sun4i/sun8i_mixer.c
@@ -286,10 +286,10 @@ static struct drm_plane **sun8i_layers_init(struct 
drm_device *drm,
dev_err(drm->dev,
"Couldn't initialize overlay plane\n");
return ERR_CAST(layer);
-   };
+   }

planes[i] = &layer->plane;
-   };
+   }

for (i = 0; i < mixer->cfg->ui_num; i++) {
struct sun8i_ui_layer *layer;
@@ -299,10 +299,10 @@ static struct drm_plane **sun8i_layers_init(struct 
drm_device *drm,
dev_err(drm->dev, "Couldn't initialize %s plane\n",
i ? "overlay" : "primary");
return ERR_CAST(layer);
-   };
+   }

planes[mixer->cfg->vi_num + i] = &layer->plane;
-   };
+   }

return planes;
 }
--
2.7.4

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


[PATCH] drm/amd/display: Remove unneeded semicolon

2019-12-14 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c:412:90-91: Unneeded 
semicolon

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c 
b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c
index de51ef1..a1b7e76 100644
--- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c
+++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn21/rn_clk_mgr.c
@@ -409,7 +409,7 @@ void build_watermark_ranges(struct clk_bw_params 
*bw_params, struct pp_smu_wm_ra
continue;

ranges->reader_wm_sets[num_valid_sets].wm_inst = 
bw_params->wm_table.entries[i].wm_inst;
-   ranges->reader_wm_sets[num_valid_sets].wm_type = 
bw_params->wm_table.entries[i].wm_type;;
+   ranges->reader_wm_sets[num_valid_sets].wm_type = 
bw_params->wm_table.entries[i].wm_type;
/* We will not select WM based on dcfclk, so leave it as 
unconstrained */
ranges->reader_wm_sets[num_valid_sets].min_drain_clk_mhz = 
PP_SMU_WM_SET_RANGE_CLK_UNCONSTRAINED_MIN;
ranges->reader_wm_sets[num_valid_sets].max_drain_clk_mhz = 
PP_SMU_WM_SET_RANGE_CLK_UNCONSTRAINED_MAX;
--
2.7.4

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


[PATCH 2/3] drm/amdgpu: Remove unneeded semicolon in gfx_v10_0.c

2019-12-14 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c:1967:2-3: Unneeded semicolon

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c 
b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
index 8cdef79..ce8495f 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
@@ -1964,7 +1964,7 @@ static int gfx_v10_0_parse_rlc_toc(struct amdgpu_device 
*adev)
rlc_autoload_info[rlc_toc->id].size = rlc_toc->size * 4;

rlc_toc++;
-   };
+   }

return 0;
 }
--
2.7.4

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


[PATCH 3/3] drm/amdgpu: Remove unneeded semicolon in amdgpu_ras.c

2019-12-14 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:318:2-3: Unneeded semicolon

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
index 04394c4..8b48793 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
@@ -315,7 +315,7 @@ static ssize_t amdgpu_ras_debugfs_ctrl_write(struct file 
*f, const char __user *
default:
ret = -EINVAL;
break;
-   };
+   }

if (ret)
return -EINVAL;
--
2.7.4

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


[PATCH 1/3] drm/amdgpu: Remove unneeded semicolon in amdgpu_pmu.c

2019-12-14 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c:110:3-4: Unneeded semicolon
drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c:133:2-3: Unneeded semicolon
drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c:163:2-3: Unneeded semicolon
drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c:191:2-3: Unneeded semicolon

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c
index 0e6dba9..cf21ad0 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c
@@ -107,7 +107,7 @@ static void amdgpu_perf_read(struct perf_event *event)
default:
count = 0;
break;
-   };
+   }
} while (local64_cmpxchg(&hwc->prev_count, prev, count) != prev);

local64_add(count - prev, &event->count);
@@ -130,7 +130,7 @@ static void amdgpu_perf_stop(struct perf_event *event, int 
flags)
break;
default:
break;
-   };
+   }

WARN_ON_ONCE(hwc->state & PERF_HES_STOPPED);
hwc->state |= PERF_HES_STOPPED;
@@ -160,7 +160,7 @@ static int amdgpu_perf_add(struct perf_event *event, int 
flags)
break;
default:
return 0;
-   };
+   }

if (retval)
return retval;
@@ -188,7 +188,7 @@ static void amdgpu_perf_del(struct perf_event *event, int 
flags)
break;
default:
break;
-   };
+   }

perf_event_update_userpage(event);
 }
--
2.7.4

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


[PATCH 0/4] drm/msm: Remove unneeded semicolon

2019-12-14 Thread zhengbin
zhengbin (4):
  drm/msm/hdmi: Remove unneeded semicolon
  drm/msm/mdp5: Remove unneeded semicolon
  drm/msm/dpu: Remove unneeded semicolon in dpu_plane.c
  drm/msm/dpu: Remove unneeded semicolon in dpu_encoder.c

 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 2 +-
 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c   | 2 +-
 drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c| 2 +-
 drivers/gpu/drm/msm/hdmi/hdmi_connector.c   | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

--
2.7.4

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


[PATCH 0/3] drm/amdgpu: Remove unneeded semicolon

2019-12-14 Thread zhengbin
zhengbin (3):
  drm/amdgpu: Remove unneeded semicolon in amdgpu_pmu.c
  drm/amdgpu: Remove unneeded semicolon in gfx_v10_0.c
  drm/amdgpu: Remove unneeded semicolon in amdgpu_ras.c

 drivers/gpu/drm/amd/amdgpu/amdgpu_pmu.c | 8 
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 +-
 drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c  | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

--
2.7.4

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


[PATCH 0/2] drm/sun4i: Remove unneeded semicolon

2019-12-14 Thread zhengbin
zhengbin (2):
  drm/sun4i: Remove unneeded semicolon in sun8i_mixer.c
  drm/sun4i: Remove unneeded semicolon in sun4i_layer.c

 drivers/gpu/drm/sun4i/sun4i_layer.c | 4 ++--
 drivers/gpu/drm/sun4i/sun8i_mixer.c | 8 
 2 files changed, 6 insertions(+), 6 deletions(-)

--
2.7.4

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


[PATCH 3/4] drm/msm/dpu: Remove unneeded semicolon in dpu_plane.c

2019-12-14 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c:741:2-3: Unneeded semicolon

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c 
b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
index 58d5acb..8d4fdc3 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c
@@ -738,7 +738,7 @@ int dpu_plane_validate_multirect_v2(struct 
dpu_multirect_plane_states *plane)
} else {
pstate[R0]->multirect_index = DPU_SSPP_RECT_0;
pstate[R1]->multirect_index = DPU_SSPP_RECT_1;
-   };
+   }

DPU_DEBUG_PLANE(dpu_plane[R0], "R0: %d - %d\n",
pstate[R0]->multirect_mode, pstate[R0]->multirect_index);
--
2.7.4

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


[PATCH 2/2] drm/sun4i: Remove unneeded semicolon in sun4i_layer.c

2019-12-14 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/sun4i/sun4i_layer.c:253:3-4: Unneeded semicolon
drivers/gpu/drm/sun4i/sun4i_layer.c:257:2-3: Unneeded semicolon

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/sun4i/sun4i_layer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/sun4i/sun4i_layer.c 
b/drivers/gpu/drm/sun4i/sun4i_layer.c
index c04f4ba..acfbfd4 100644
--- a/drivers/gpu/drm/sun4i/sun4i_layer.c
+++ b/drivers/gpu/drm/sun4i/sun4i_layer.c
@@ -250,11 +250,11 @@ struct drm_plane **sun4i_layers_init(struct drm_device 
*drm,
dev_err(drm->dev, "Couldn't initialize %s plane\n",
i ? "overlay" : "primary");
return ERR_CAST(layer);
-   };
+   }

layer->id = i;
planes[i] = &layer->plane;
-   };
+   }

return planes;
 }
--
2.7.4

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


[PATCH 1/4] drm/msm/hdmi: Remove unneeded semicolon

2019-12-14 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/msm/hdmi/hdmi_connector.c:104:3-4: Unneeded semicolon

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/msm/hdmi/hdmi_connector.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_connector.c 
b/drivers/gpu/drm/msm/hdmi/hdmi_connector.c
index 839822d..2ccb55a 100644
--- a/drivers/gpu/drm/msm/hdmi/hdmi_connector.c
+++ b/drivers/gpu/drm/msm/hdmi/hdmi_connector.c
@@ -101,7 +101,7 @@ static int gpio_config(struct hdmi *hdmi, bool on)

gpiod_set_value_cansleep(gpio.gpiod, value);
}
-   };
+   }

DBG("gpio off");
}
--
2.7.4

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


[PATCH 2/4] drm/msm/mdp5: Remove unneeded semicolon

2019-12-14 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c:905:2-3: Unneeded semicolon

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c 
b/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c
index 1f48f64..e3c4c25 100644
--- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c
+++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c
@@ -902,7 +902,7 @@ struct mdp5_cfg_handler *mdp5_cfg_init(struct mdp5_kms 
*mdp5_kms,
major, minor);
ret = -ENXIO;
goto fail;
-   };
+   }

/* only after mdp5_cfg global pointer's init can we access the hw */
for (i = 0; i < num_handlers; i++) {
--
2.7.4

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


[PATCH] drm: meson: Remove unneeded semicolon

2019-12-16 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/meson/meson_crtc.c:360:3-4: Unneeded semicolon
drivers/gpu/drm/meson/meson_plane.c:181:2-3: Unneeded semicolon

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/meson/meson_crtc.c  | 2 +-
 drivers/gpu/drm/meson/meson_plane.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/meson/meson_crtc.c 
b/drivers/gpu/drm/meson/meson_crtc.c
index 57ae1c1..eefefc4 100644
--- a/drivers/gpu/drm/meson/meson_crtc.c
+++ b/drivers/gpu/drm/meson/meson_crtc.c
@@ -357,7 +357,7 @@ void meson_crtc_irq(struct meson_drm *priv)
MESON_CANVAS_WRAP_NONE,
MESON_CANVAS_BLKMODE_LINEAR,
MESON_CANVAS_ENDIAN_SWAP64);
-   };
+   }

writel_relaxed(priv->viu.vd1_if0_gen_reg,
priv->io_base + meson_crtc->viu_offset +
diff --git a/drivers/gpu/drm/meson/meson_plane.c 
b/drivers/gpu/drm/meson/meson_plane.c
index ed54322..b96fa43 100644
--- a/drivers/gpu/drm/meson/meson_plane.c
+++ b/drivers/gpu/drm/meson/meson_plane.c
@@ -178,7 +178,7 @@ static void meson_plane_atomic_update(struct drm_plane 
*plane,
priv->viu.osd1_blk0_cfg[0] |= OSD_BLK_MODE_16 |
  OSD_COLOR_MATRIX_16_RGB565;
break;
-   };
+   }

/* Default scaler parameters */
vsc_bot_rcv_num = 0;
--
2.7.4

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


[PATCH] drm/nouveau/mmu: Remove unneeded semicolon

2019-12-16 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:583:2-3: Unneeded semicolon
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h:307:2-3: Unneeded semicolon

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c | 2 +-
 drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c 
b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c
index 41640e0..199f94e 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c
@@ -580,7 +580,7 @@ nvkm_vmm_iter(struct nvkm_vmm *vmm, const struct 
nvkm_vmm_page *page,
it.pte[it.lvl]++;
}
}
-   };
+   }

nvkm_vmm_flush(&it);
return ~0ULL;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h 
b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h
index 5e55ecb..321bfca 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h
@@ -304,7 +304,7 @@ int tu102_vmm_new(struct nvkm_mmu *, bool, u64, u64, void 
*, u32,
FILL(VMM, PT, PTEI, _ptes, MAP, _addr);\
PTEI += _ptes; \
PTEN -= _ptes; \
-   }; \
+   } \
nvkm_done((PT)->memory);   \
 } while(0)

--
2.7.4

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


[PATCH] drm/bochs: Remove unneeded semicolon

2019-12-16 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/bochs/bochs_hw.c:258:2-3: Unneeded semicolon

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/bochs/bochs_hw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/bochs/bochs_hw.c b/drivers/gpu/drm/bochs/bochs_hw.c
index e567bdf..b615b7d 100644
--- a/drivers/gpu/drm/bochs/bochs_hw.c
+++ b/drivers/gpu/drm/bochs/bochs_hw.c
@@ -255,7 +255,7 @@ void bochs_hw_setformat(struct bochs_device *bochs,
DRM_ERROR("%s: Huh? Got framebuffer format 0x%x",
  __func__, format->format);
break;
-   };
+   }
 }

 void bochs_hw_setbase(struct bochs_device *bochs,
--
2.7.4

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


[PATCH] drm/i915: Remove unneeded semicolon

2019-12-16 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/i915/gem/i915_gem_region.c:88:2-3: Unneeded semicolon
drivers/gpu/drm/i915/gvt/gtt.c:1285:2-3: Unneeded semicolon

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/i915/gem/i915_gem_region.c | 2 +-
 drivers/gpu/drm/i915/gvt/gtt.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_region.c 
b/drivers/gpu/drm/i915/gem/i915_gem_region.c
index 2f7bcfb..d50adac 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_region.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_region.c
@@ -85,7 +85,7 @@ i915_gem_object_get_pages_buddy(struct drm_i915_gem_object 
*obj)
}

prev_end = offset + block_size;
-   };
+   }

sg_page_sizes |= sg->length;
sg_mark_end(sg);
diff --git a/drivers/gpu/drm/i915/gvt/gtt.c b/drivers/gpu/drm/i915/gvt/gtt.c
index 4b04af5..34cb404 100644
--- a/drivers/gpu/drm/i915/gvt/gtt.c
+++ b/drivers/gpu/drm/i915/gvt/gtt.c
@@ -1282,7 +1282,7 @@ static int ppgtt_populate_shadow_entry(struct intel_vgpu 
*vgpu,
return -EINVAL;
default:
GEM_BUG_ON(1);
-   };
+   }

/* direct shadow */
ret = intel_gvt_hypervisor_dma_map_guest_page(vgpu, gfn, page_size,
--
2.7.4

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


[PATCH v2] drm/nouveau/mmu: Remove unneeded semicolon

2019-12-18 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c:583:2-3: Unneeded semicolon
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h:307:2-3: Unneeded semicolon

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
v1->v2: add missing one space after the closing curly bracket
 drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c | 2 +-
 drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c 
b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c
index 41640e0..199f94e 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c
@@ -580,7 +580,7 @@ nvkm_vmm_iter(struct nvkm_vmm *vmm, const struct 
nvkm_vmm_page *page,
it.pte[it.lvl]++;
}
}
-   };
+   }

nvkm_vmm_flush(&it);
return ~0ULL;
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h 
b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h
index 5e55ecb..321bfca 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.h
@@ -304,7 +304,7 @@ int tu102_vmm_new(struct nvkm_mmu *, bool, u64, u64, void 
*, u32,
FILL(VMM, PT, PTEI, _ptes, MAP, _addr);\
PTEI += _ptes; \
PTEN -= _ptes; \
-   }; \
+   }  \
nvkm_done((PT)->memory);   \
 } while(0)

--
2.7.4

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


[PATCH 7/7] drm/radeon: use true,false for bool variable in ni.c

2019-12-24 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/radeon/ni.c:2020:2-15: WARNING: Assignment of 0/1 to bool 
variable
drivers/gpu/drm/radeon/ni.c:2088:2-15: WARNING: Assignment of 0/1 to bool 
variable

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/radeon/ni.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/ni.c b/drivers/gpu/drm/radeon/ni.c
index a99442b..02feb08 100644
--- a/drivers/gpu/drm/radeon/ni.c
+++ b/drivers/gpu/drm/radeon/ni.c
@@ -2017,7 +2017,7 @@ static void cayman_uvd_init(struct radeon_device *rdev)
 * there. So it is pointless to try to go through that code
 * hence why we disable uvd here.
 */
-   rdev->has_uvd = 0;
+   rdev->has_uvd = false;
return;
}
rdev->ring[R600_RING_TYPE_UVD_INDEX].ring_obj = NULL;
@@ -2085,7 +2085,7 @@ static void cayman_vce_init(struct radeon_device *rdev)
 * there. So it is pointless to try to go through that code
 * hence why we disable vce here.
 */
-   rdev->has_vce = 0;
+   rdev->has_vce = false;
return;
}
rdev->ring[TN_RING_TYPE_VCE1_INDEX].ring_obj = NULL;
--
2.7.4

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


[PATCH 3/8] drm/amd/display: use true, false for bool variable in dcn20_hwseq.c

2019-12-24 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c:186:6-14: WARNING: 
Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c:189:2-10: WARNING: 
Assignment of 0/1 to bool variable

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c 
b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
index aa00fbe..5b9cbeda 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c
@@ -183,10 +183,10 @@ void dcn20_enable_power_gating_plane(
struct dce_hwseq *hws,
bool enable)
 {
-   bool force_on = 1; /* disable power gating */
+   bool force_on = true; /* disable power gating */

if (enable)
-   force_on = 0;
+   force_on = false;

/* DCHUBP0/1/2/3/4/5 */
REG_UPDATE(DOMAIN0_PG_CONFIG, DOMAIN0_POWER_FORCEON, force_on);
--
2.7.4

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


[PATCH 2/7] drm/radeon: use true,false for bool variable in si.c

2019-12-24 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/radeon/si.c:6475:2-15: WARNING: Assignment of 0/1 to bool 
variable
drivers/gpu/drm/radeon/si.c:6542:2-15: WARNING: Assignment of 0/1 to bool 
variable

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/radeon/si.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c
index 8788a05..93dcab5 100644
--- a/drivers/gpu/drm/radeon/si.c
+++ b/drivers/gpu/drm/radeon/si.c
@@ -6472,7 +6472,7 @@ static void si_uvd_init(struct radeon_device *rdev)
 * there. So it is pointless to try to go through that code
 * hence why we disable uvd here.
 */
-   rdev->has_uvd = 0;
+   rdev->has_uvd = false;
return;
}
rdev->ring[R600_RING_TYPE_UVD_INDEX].ring_obj = NULL;
@@ -6539,7 +6539,7 @@ static void si_vce_init(struct radeon_device *rdev)
 * there. So it is pointless to try to go through that code
 * hence why we disable vce here.
 */
-   rdev->has_vce = 0;
+   rdev->has_vce = false;
return;
}
rdev->ring[TN_RING_TYPE_VCE1_INDEX].ring_obj = NULL;
--
2.7.4

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


[PATCH 8/8] drm/amd/display: use true, false for bool variable in display_rq_dlg_calc_21.c

2019-12-24 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:85:6-13: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:88:2-9: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:225:6-14: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:226:6-14: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:251:3-11: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:252:3-11: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:256:3-11: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:257:3-11: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:267:3-11: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:269:3-11: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:682:6-14: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c:1013:1-9: 
WARNING: Assignment of 0/1 to bool variable

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 .../display/dc/dml/dcn21/display_rq_dlg_calc_21.c  | 24 +++---
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c 
b/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c
index e60af38..a38baa7 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_rq_dlg_calc_21.c
@@ -82,10 +82,10 @@ static unsigned int get_bytes_per_element(enum 
source_format_class source_format

 static bool is_dual_plane(enum source_format_class source_format)
 {
-   bool ret_val = 0;
+   bool ret_val = false;

if ((source_format == dm_420_8) || (source_format == dm_420_10))
-   ret_val = 1;
+   ret_val = true;

return ret_val;
 }
@@ -222,8 +222,8 @@ static void handle_det_buf_split(
unsigned int swath_bytes_c = 0;
unsigned int full_swath_bytes_packed_l = 0;
unsigned int full_swath_bytes_packed_c = 0;
-   bool req128_l = 0;
-   bool req128_c = 0;
+   bool req128_l = false;
+   bool req128_c = false;
bool surf_linear = (pipe_src_param.sw_mode == dm_sw_linear);
bool surf_vert = (pipe_src_param.source_scan == dm_vert);
unsigned int log2_swath_height_l = 0;
@@ -248,13 +248,13 @@ static void handle_det_buf_split(
total_swath_bytes = 2 * full_swath_bytes_packed_l + 2 * 
full_swath_bytes_packed_c;

if (total_swath_bytes <= detile_buf_size_in_bytes) { //full 
256b request
-   req128_l = 0;
-   req128_c = 0;
+   req128_l = false;
+   req128_c = false;
swath_bytes_l = full_swath_bytes_packed_l;
swath_bytes_c = full_swath_bytes_packed_c;
} else { //128b request (for luma only for yuv420 8bpc)
-   req128_l = 1;
-   req128_c = 0;
+   req128_l = true;
+   req128_c = false;
swath_bytes_l = full_swath_bytes_packed_l / 2;
swath_bytes_c = full_swath_bytes_packed_c;
}
@@ -264,9 +264,9 @@ static void handle_det_buf_split(
total_swath_bytes = 2 * full_swath_bytes_packed_l;

if (total_swath_bytes <= detile_buf_size_in_bytes)
-   req128_l = 0;
+   req128_l = false;
else
-   req128_l = 1;
+   req128_l = true;

swath_bytes_l = total_swath_bytes;
swath_bytes_c = 0;
@@ -679,7 +679,7 @@ static void get_surf_rq_param(
const display_pipe_params_st pipe_param,
bool is_chroma)
 {
-   bool mode_422 = 0;
+   bool mode_422 = false;
unsigned int vp_width = 0;
unsigned int vp_height = 0;
unsigned int data_pitch = 0;
@@ -1010,7 +1010,7 @@ static void dml_rq_dlg_get_dlg_params(
// Source
// dcc_en  = src.dcc;
dual_plane = is_dual_plane((enum source_format_class) 
(src->source_format));
-   mode_422 = 0; // FIXME
+   mode_422 = false; // FIXME
access_dir = (src->source_scan == dm_vert); // vp access direction: 
horizontal or verti

[PATCH 0/8] drm/amd/display: use true,false for bool variable

2019-12-24 Thread zhengbin
zhengbin (8):
  drm/amd/display: use true,false for bool variable in dc_link_ddc.c
  drm/amd/display: use true,false for bool variable in
dcn10_hw_sequencer.c
  drm/amd/display: use true,false for bool variable in dcn20_hwseq.c
  drm/amd/display: use true,false for bool variable in
display_mode_vba_21.c
  drm/amd/display: use true,false for bool variable in dce_calcs.c
  drm/amd/display: use true,false for bool variable in
display_rq_dlg_calc_20.c
  drm/amd/display: use true,false for bool variable in
display_rq_dlg_calc_20v2.c
  drm/amd/display: use true,false for bool variable in
display_rq_dlg_calc_21.c

 drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c   | 24 +++---
 drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c  |  2 +-
 .../drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c  |  4 ++--
 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c |  4 ++--
 .../display/dc/dml/dcn20/display_rq_dlg_calc_20.c  | 24 +++---
 .../dc/dml/dcn20/display_rq_dlg_calc_20v2.c| 24 +++---
 .../amd/display/dc/dml/dcn21/display_mode_vba_21.c |  6 +++---
 .../display/dc/dml/dcn21/display_rq_dlg_calc_21.c  | 24 +++---
 8 files changed, 56 insertions(+), 56 deletions(-)

--
2.7.4

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


[PATCH 5/7] drm/radeon: use true,false for bool variable in rv770.c

2019-12-24 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/radeon/rv770.c:1706:2-15: WARNING: Assignment of 0/1 to bool 
variable

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/radeon/rv770.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/rv770.c b/drivers/gpu/drm/radeon/rv770.c
index 3fc461d..21f653a 100644
--- a/drivers/gpu/drm/radeon/rv770.c
+++ b/drivers/gpu/drm/radeon/rv770.c
@@ -1703,7 +1703,7 @@ static void rv770_uvd_init(struct radeon_device *rdev)
 * there. So it is pointless to try to go through that code
 * hence why we disable uvd here.
 */
-   rdev->has_uvd = 0;
+   rdev->has_uvd = false;
return;
}
rdev->ring[R600_RING_TYPE_UVD_INDEX].ring_obj = NULL;
--
2.7.4

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


[PATCH 5/5] drm/amdgpu: use true, false for bool variable in amdgpu_psp.c

2019-12-24 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:674:2-26: WARNING: Assignment of 0/1 to 
bool variable
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:794:1-25: WARNING: Assignment of 0/1 to 
bool variable
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:897:2-36: WARNING: Assignment of 0/1 to 
bool variable
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:1016:1-35: WARNING: Assignment of 0/1 
to bool variable
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:1087:2-34: WARNING: Assignment of 0/1 
to bool variable
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:1177:1-33: WARNING: Assignment of 0/1 
to bool variable

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
index 3e293a3..9153b9a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
@@ -671,7 +671,7 @@ static int psp_ras_load(struct psp_context *psp)
psp->fence_buf_mc_addr);

if (!ret) {
-   psp->ras.ras_initialized = 1;
+   psp->ras.ras_initialized = true;
psp->ras.session_id = cmd->resp.session_id;
}

@@ -791,7 +791,7 @@ static int psp_ras_terminate(struct psp_context *psp)
if (ret)
return ret;

-   psp->ras.ras_initialized = 0;
+   psp->ras.ras_initialized = false;

/* free ras shared memory */
amdgpu_bo_free_kernel(&psp->ras.ras_shared_bo,
@@ -894,7 +894,7 @@ static int psp_hdcp_load(struct psp_context *psp)
ret = psp_cmd_submit_buf(psp, NULL, cmd, psp->fence_buf_mc_addr);

if (!ret) {
-   psp->hdcp_context.hdcp_initialized = 1;
+   psp->hdcp_context.hdcp_initialized = true;
psp->hdcp_context.session_id = cmd->resp.session_id;
}

@@ -1013,7 +1013,7 @@ static int psp_hdcp_terminate(struct psp_context *psp)
if (ret)
return ret;

-   psp->hdcp_context.hdcp_initialized = 0;
+   psp->hdcp_context.hdcp_initialized = false;

/* free hdcp shared memory */
amdgpu_bo_free_kernel(&psp->hdcp_context.hdcp_shared_bo,
@@ -1084,7 +1084,7 @@ static int psp_dtm_load(struct psp_context *psp)
ret = psp_cmd_submit_buf(psp, NULL, cmd, psp->fence_buf_mc_addr);

if (!ret) {
-   psp->dtm_context.dtm_initialized = 1;
+   psp->dtm_context.dtm_initialized = true;
psp->dtm_context.session_id = cmd->resp.session_id;
}

@@ -1174,7 +1174,7 @@ static int psp_dtm_terminate(struct psp_context *psp)
if (ret)
return ret;

-   psp->dtm_context.dtm_initialized = 0;
+   psp->dtm_context.dtm_initialized = false;

/* free hdcp shared memory */
amdgpu_bo_free_kernel(&psp->dtm_context.dtm_shared_bo,
--
2.7.4

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


[PATCH 0/5] drm/amdgpu: use true,false for bool variable

2019-12-24 Thread zhengbin
zhengbin (5):
  drm/amdgpu: use true,false for bool variable in mxgpu_ai.c
  drm/amdgpu: use true,false for bool variable in mxgpu_nv.c
  drm/amdgpu: use true,false for bool variable in amdgpu_device.c
  drm/amdgpu: use true,false for bool variable in amdgpu_debugfs.c
  drm/amdgpu: use true,false for bool variable in amdgpu_psp.c

 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c |  6 +++---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c  |  4 ++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 12 ++--
 drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c   |  4 ++--
 drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c   |  4 ++--
 5 files changed, 15 insertions(+), 15 deletions(-)

--
2.7.4

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


[PATCH 4/5] drm/amdgpu: use true, false for bool variable in amdgpu_debugfs.c

2019-12-24 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:132:2-10: WARNING: Assignment of 
0/1 to bool variable
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:140:2-10: WARNING: Assignment of 
0/1 to bool variable
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c:142:13-21: WARNING: Assignment of 
0/1 to bool variable

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
index 8e6726e..63343bb 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c
@@ -129,7 +129,7 @@ static int  amdgpu_debugfs_process_reg_op(bool read, struct 
file *f,
sh_bank = 0x;
if (instance_bank == 0x3FF)
instance_bank = 0x;
-   use_bank = 1;
+   use_bank = true;
} else if (*pos & (1ULL << 61)) {

me = (*pos & GENMASK_ULL(33, 24)) >> 24;
@@ -137,9 +137,9 @@ static int  amdgpu_debugfs_process_reg_op(bool read, struct 
file *f,
queue = (*pos & GENMASK_ULL(53, 44)) >> 44;
vmid = (*pos & GENMASK_ULL(58, 54)) >> 54;

-   use_ring = 1;
+   use_ring = true;
} else {
-   use_bank = use_ring = 0;
+   use_bank = use_ring = false;
}

*pos &= (1UL << 22) - 1;
--
2.7.4

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


[PATCH 4/8] drm/amd/display: use true, false for bool variable in display_mode_vba_21.c

2019-12-24 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c:4124:3-28: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c:4128:5-30: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c:5207:3-37: 
WARNING: Assignment of 0/1 to bool variable

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c 
b/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c
index 945291d..b6d3466 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c
@@ -4121,11 +4121,11 @@ void dml21_ModeSupportAndSystemConfigurationFull(struct 
display_mode_lib *mode_l
}
for (i = 0; i <= mode_lib->vba.soc.num_states; i++) {
for (k = 0; k <= mode_lib->vba.NumberOfActivePlanes - 1; k++) {
-   locals->RequiresDSC[i][k] = 0;
+   locals->RequiresDSC[i][k] = false;
locals->RequiresFEC[i][k] = 0;
if (mode_lib->vba.BlendingAndTiming[k] == k) {
if (mode_lib->vba.Output[k] == dm_hdmi) {
-   locals->RequiresDSC[i][k] = 0;
+   locals->RequiresDSC[i][k] = false;
locals->RequiresFEC[i][k] = 0;
locals->OutputBppPerState[i][k] = 
TruncToValidBPP(
dml_min(600.0, 
mode_lib->vba.PHYCLKPerState[i]) / mode_lib->vba.PixelClockBackEnd[k] * 24,
@@ -5204,7 +5204,7 @@ void dml21_ModeSupportAndSystemConfigurationFull(struct 
display_mode_lib *mode_l
mode_lib->vba.ODMCombineEnabled[k] =

locals->ODMCombineEnablePerState[mode_lib->vba.VoltageLevel][k];
} else {
-   mode_lib->vba.ODMCombineEnabled[k] = 0;
+   mode_lib->vba.ODMCombineEnabled[k] = false;
}
mode_lib->vba.DSCEnabled[k] =

locals->RequiresDSC[mode_lib->vba.VoltageLevel][k];
--
2.7.4

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


[PATCH 3/5] drm/amdgpu: use true, false for bool variable in amdgpu_device.c

2019-12-24 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:3961:1-19: WARNING: Assignment of 
0/1 to bool variable
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:3981:1-19: WARNING: Assignment of 
0/1 to bool variable

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 080ec18..c1cf744 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -3958,7 +3958,7 @@ static bool amdgpu_device_lock_adev(struct amdgpu_device 
*adev, bool trylock)
mutex_lock(&adev->lock_reset);

atomic_inc(&adev->gpu_reset_counter);
-   adev->in_gpu_reset = 1;
+   adev->in_gpu_reset = true;
switch (amdgpu_asic_reset_method(adev)) {
case AMD_RESET_METHOD_MODE1:
adev->mp1_state = PP_MP1_STATE_SHUTDOWN;
@@ -3978,7 +3978,7 @@ static void amdgpu_device_unlock_adev(struct 
amdgpu_device *adev)
 {
amdgpu_vf_error_trans_all(adev);
adev->mp1_state = PP_MP1_STATE_NONE;
-   adev->in_gpu_reset = 0;
+   adev->in_gpu_reset = false;
mutex_unlock(&adev->lock_reset);
 }

--
2.7.4

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


[PATCH 1/5] drm/amdgpu: use true, false for bool variable in mxgpu_ai.c

2019-12-24 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c:253:2-20: WARNING: Assignment of 0/1 to 
bool variable
drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c:265:2-20: WARNING: Assignment of 0/1 to 
bool variable

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c 
b/drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c
index 43305af..5fd67e1 100644
--- a/drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c
+++ b/drivers/gpu/drm/amd/amdgpu/mxgpu_ai.c
@@ -250,7 +250,7 @@ static void xgpu_ai_mailbox_flr_work(struct work_struct 
*work)
 */
locked = mutex_trylock(&adev->lock_reset);
if (locked)
-   adev->in_gpu_reset = 1;
+   adev->in_gpu_reset = true;

do {
if (xgpu_ai_mailbox_peek_msg(adev) == IDH_FLR_NOTIFICATION_CMPL)
@@ -262,7 +262,7 @@ static void xgpu_ai_mailbox_flr_work(struct work_struct 
*work)

 flr_done:
if (locked) {
-   adev->in_gpu_reset = 0;
+   adev->in_gpu_reset = false;
mutex_unlock(&adev->lock_reset);
}

--
2.7.4

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


[PATCH 1/7] drm/radeon: use true,false for bool variable in r100.c

2019-12-24 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/radeon/r100.c:1826:3-31: WARNING: Assignment of 0/1 to bool 
variable
drivers/gpu/drm/radeon/r100.c:1828:3-31: WARNING: Assignment of 0/1 to bool 
variable
drivers/gpu/drm/radeon/r100.c:2390:2-22: WARNING: Assignment of 0/1 to bool 
variable
drivers/gpu/drm/radeon/r100.c:2395:2-22: WARNING: Assignment of 0/1 to bool 
variable

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/radeon/r100.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/radeon/r100.c b/drivers/gpu/drm/radeon/r100.c
index 29c966f..2c1166d 100644
--- a/drivers/gpu/drm/radeon/r100.c
+++ b/drivers/gpu/drm/radeon/r100.c
@@ -1823,9 +1823,9 @@ static int r100_packet0_check(struct radeon_cs_parser *p,
case RADEON_PP_TXFORMAT_2:
i = (reg - RADEON_PP_TXFORMAT_0) / 24;
if (idx_value & RADEON_TXFORMAT_NON_POWER2) {
-   track->textures[i].use_pitch = 1;
+   track->textures[i].use_pitch = true;
} else {
-   track->textures[i].use_pitch = 0;
+   track->textures[i].use_pitch = false;
track->textures[i].width = 1 << ((idx_value & 
RADEON_TXFORMAT_WIDTH_MASK) >> RADEON_TXFORMAT_WIDTH_SHIFT);
track->textures[i].height = 1 << ((idx_value & 
RADEON_TXFORMAT_HEIGHT_MASK) >> RADEON_TXFORMAT_HEIGHT_SHIFT);
}
@@ -2387,12 +2387,12 @@ void r100_cs_track_clear(struct radeon_device *rdev, 
struct r100_cs_track *track
else
track->num_texture = 6;
track->maxy = 2048;
-   track->separate_cube = 1;
+   track->separate_cube = true;
} else {
track->num_cb = 4;
track->num_texture = 16;
track->maxy = 4096;
-   track->separate_cube = 0;
+   track->separate_cube = false;
track->aaresolve = false;
track->aa.robj = NULL;
}
--
2.7.4

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


[PATCH] drm/amd/powerplay: use true, false for bool variable in vega20_hwmgr.c

2019-12-24 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c:875:1-31: WARNING: 
Assignment of 0/1 to bool variable

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c 
b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
index 5bcf0d6..3b3ec56 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_hwmgr.c
@@ -872,7 +872,7 @@ static int vega20_override_pcie_parameters(struct pp_hwmgr 
*hwmgr)
"[OverridePcieParameters] Attempt to override pcie params 
failed!",
return ret);

-   data->pcie_parameters_override = 1;
+   data->pcie_parameters_override = true;
data->pcie_gen_level1 = pcie_gen;
data->pcie_width_level1 = pcie_width;

--
2.7.4

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


[PATCH 6/7] drm/radeon: use true,false for bool variable in cik.c

2019-12-24 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/radeon/cik.c:8140:2-15: WARNING: Assignment of 0/1 to bool 
variable
drivers/gpu/drm/radeon/cik.c:8212:2-15: WARNING: Assignment of 0/1 to bool 
variable

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/radeon/cik.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c
index 4fa488c..5c42877 100644
--- a/drivers/gpu/drm/radeon/cik.c
+++ b/drivers/gpu/drm/radeon/cik.c
@@ -8137,7 +8137,7 @@ static void cik_uvd_init(struct radeon_device *rdev)
 * there. So it is pointless to try to go through that code
 * hence why we disable uvd here.
 */
-   rdev->has_uvd = 0;
+   rdev->has_uvd = false;
return;
}
rdev->ring[R600_RING_TYPE_UVD_INDEX].ring_obj = NULL;
@@ -8209,7 +8209,7 @@ static void cik_vce_init(struct radeon_device *rdev)
 * there. So it is pointless to try to go through that code
 * hence why we disable vce here.
 */
-   rdev->has_vce = 0;
+   rdev->has_vce = false;
return;
}
rdev->ring[TN_RING_TYPE_VCE1_INDEX].ring_obj = NULL;
--
2.7.4

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


[PATCH 3/7] drm/radeon: use true,false for bool variable in r600.c

2019-12-24 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/radeon/r600.c:3056:2-15: WARNING: Assignment of 0/1 to bool 
variable

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/radeon/r600.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
index d2e51a9..cf1ad4d 100644
--- a/drivers/gpu/drm/radeon/r600.c
+++ b/drivers/gpu/drm/radeon/r600.c
@@ -3053,7 +3053,7 @@ static void r600_uvd_init(struct radeon_device *rdev)
 * there. So it is pointless to try to go through that code
 * hence why we disable uvd here.
 */
-   rdev->has_uvd = 0;
+   rdev->has_uvd = false;
return;
}
rdev->ring[R600_RING_TYPE_UVD_INDEX].ring_obj = NULL;
--
2.7.4

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


[PATCH 0/7] drm/radeon: use true,false for bool variable

2019-12-24 Thread zhengbin
zhengbin (7):
  drm/radeon: use true,false for bool variable in r100.c
  drm/radeon: use true,false for bool variable in si.c
  drm/radeon: use true,false for bool variable in r600.c
  drm/radeon: use true,false for bool variable in evergreen.c
  drm/radeon: use true,false for bool variable in rv770.c
  drm/radeon: use true,false for bool variable in cik.c
  drm/radeon: use true,false for bool variable in ni.c

 drivers/gpu/drm/radeon/cik.c   | 4 ++--
 drivers/gpu/drm/radeon/evergreen.c | 2 +-
 drivers/gpu/drm/radeon/ni.c| 4 ++--
 drivers/gpu/drm/radeon/r100.c  | 8 
 drivers/gpu/drm/radeon/r600.c  | 2 +-
 drivers/gpu/drm/radeon/rv770.c | 2 +-
 drivers/gpu/drm/radeon/si.c| 4 ++--
 7 files changed, 13 insertions(+), 13 deletions(-)

--
2.7.4

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


[PATCH 6/8] drm/amd/display: use true, false for bool variable in display_rq_dlg_calc_20.c

2019-12-24 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:110:6-13: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:113:2-9: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:243:6-14: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:244:6-14: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:267:3-11: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:268:3-11: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:272:3-11: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:273:3-11: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:283:3-11: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:285:3-11: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:673:6-14: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c:961:1-9: 
WARNING: Assignment of 0/1 to bool variable

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 .../display/dc/dml/dcn20/display_rq_dlg_calc_20.c  | 24 +++---
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c 
b/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c
index 9df24ec..ca80784 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20.c
@@ -107,10 +107,10 @@ static unsigned int get_bytes_per_element(enum 
source_format_class source_format

 static bool is_dual_plane(enum source_format_class source_format)
 {
-   bool ret_val = 0;
+   bool ret_val = false;

if ((source_format == dm_420_8) || (source_format == dm_420_10))
-   ret_val = 1;
+   ret_val = true;

return ret_val;
 }
@@ -240,8 +240,8 @@ static void handle_det_buf_split(struct display_mode_lib 
*mode_lib,
unsigned int swath_bytes_c = 0;
unsigned int full_swath_bytes_packed_l = 0;
unsigned int full_swath_bytes_packed_c = 0;
-   bool req128_l = 0;
-   bool req128_c = 0;
+   bool req128_l = false;
+   bool req128_c = false;
bool surf_linear = (pipe_src_param.sw_mode == dm_sw_linear);
bool surf_vert = (pipe_src_param.source_scan == dm_vert);
unsigned int log2_swath_height_l = 0;
@@ -264,13 +264,13 @@ static void handle_det_buf_split(struct display_mode_lib 
*mode_lib,
total_swath_bytes = 2 * full_swath_bytes_packed_l + 2 * 
full_swath_bytes_packed_c;

if (total_swath_bytes <= detile_buf_size_in_bytes) { //full 
256b request
-   req128_l = 0;
-   req128_c = 0;
+   req128_l = false;
+   req128_c = false;
swath_bytes_l = full_swath_bytes_packed_l;
swath_bytes_c = full_swath_bytes_packed_c;
} else { //128b request (for luma only for yuv420 8bpc)
-   req128_l = 1;
-   req128_c = 0;
+   req128_l = true;
+   req128_c = false;
swath_bytes_l = full_swath_bytes_packed_l / 2;
swath_bytes_c = full_swath_bytes_packed_c;
}
@@ -280,9 +280,9 @@ static void handle_det_buf_split(struct display_mode_lib 
*mode_lib,
total_swath_bytes = 2 * full_swath_bytes_packed_l;

if (total_swath_bytes <= detile_buf_size_in_bytes)
-   req128_l = 0;
+   req128_l = false;
else
-   req128_l = 1;
+   req128_l = true;

swath_bytes_l = total_swath_bytes;
swath_bytes_c = 0;
@@ -670,7 +670,7 @@ static void get_surf_rq_param(struct display_mode_lib 
*mode_lib,
const display_pipe_source_params_st pipe_src_param,
bool is_chroma)
 {
-   bool mode_422 = 0;
+   bool mode_422 = false;
unsigned int vp_width = 0;
unsigned int vp_height = 0;
unsigned int data_pitch = 0;
@@ -958,7 +958,7 @@ static void dml20_rq_dlg_get_dlg_params(struct 
display_mode_lib *mode_lib,
// Source
 // dcc_en  = src.dcc;
dual_plane = is_dual_plane((enum 
source_format_class)(src->source_format));
-   mode_422 = 0

[PATCH 4/7] drm/radeon: use true, false for bool variable in evergreen.c

2019-12-24 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/radeon/evergreen.c:4948:2-15: WARNING: Assignment of 0/1 to 
bool variable

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/radeon/evergreen.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/evergreen.c 
b/drivers/gpu/drm/radeon/evergreen.c
index 683c790..14d90dc 100644
--- a/drivers/gpu/drm/radeon/evergreen.c
+++ b/drivers/gpu/drm/radeon/evergreen.c
@@ -4945,7 +4945,7 @@ static void evergreen_uvd_init(struct radeon_device *rdev)
 * there. So it is pointless to try to go through that code
 * hence why we disable uvd here.
 */
-   rdev->has_uvd = 0;
+   rdev->has_uvd = false;
return;
}
rdev->ring[R600_RING_TYPE_UVD_INDEX].ring_obj = NULL;
--
2.7.4

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


[PATCH 7/8] drm/amd/display: use true, false for bool variable in display_rq_dlg_calc_20v2.c

2019-12-24 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:110:6-13: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:113:2-9: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:243:6-14: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:244:6-14: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:267:3-11: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:268:3-11: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:272:3-11: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:273:3-11: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:283:3-11: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:285:3-11: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:673:6-14: 
WARNING: Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c:962:1-9: 
WARNING: Assignment of 0/1 to bool variable

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 .../dc/dml/dcn20/display_rq_dlg_calc_20v2.c| 24 +++---
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git 
a/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c 
b/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c
index 1e6aeb1..287b7a0 100644
--- a/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c
+++ b/drivers/gpu/drm/amd/display/dc/dml/dcn20/display_rq_dlg_calc_20v2.c
@@ -107,10 +107,10 @@ static unsigned int get_bytes_per_element(enum 
source_format_class source_format

 static bool is_dual_plane(enum source_format_class source_format)
 {
-   bool ret_val = 0;
+   bool ret_val = false;

if ((source_format == dm_420_8) || (source_format == dm_420_10))
-   ret_val = 1;
+   ret_val = true;

return ret_val;
 }
@@ -240,8 +240,8 @@ static void handle_det_buf_split(struct display_mode_lib 
*mode_lib,
unsigned int swath_bytes_c = 0;
unsigned int full_swath_bytes_packed_l = 0;
unsigned int full_swath_bytes_packed_c = 0;
-   bool req128_l = 0;
-   bool req128_c = 0;
+   bool req128_l = false;
+   bool req128_c = false;
bool surf_linear = (pipe_src_param.sw_mode == dm_sw_linear);
bool surf_vert = (pipe_src_param.source_scan == dm_vert);
unsigned int log2_swath_height_l = 0;
@@ -264,13 +264,13 @@ static void handle_det_buf_split(struct display_mode_lib 
*mode_lib,
total_swath_bytes = 2 * full_swath_bytes_packed_l + 2 * 
full_swath_bytes_packed_c;

if (total_swath_bytes <= detile_buf_size_in_bytes) { //full 
256b request
-   req128_l = 0;
-   req128_c = 0;
+   req128_l = false;
+   req128_c = false;
swath_bytes_l = full_swath_bytes_packed_l;
swath_bytes_c = full_swath_bytes_packed_c;
} else { //128b request (for luma only for yuv420 8bpc)
-   req128_l = 1;
-   req128_c = 0;
+   req128_l = true;
+   req128_c = false;
swath_bytes_l = full_swath_bytes_packed_l / 2;
swath_bytes_c = full_swath_bytes_packed_c;
}
@@ -280,9 +280,9 @@ static void handle_det_buf_split(struct display_mode_lib 
*mode_lib,
total_swath_bytes = 2 * full_swath_bytes_packed_l;

if (total_swath_bytes <= detile_buf_size_in_bytes)
-   req128_l = 0;
+   req128_l = false;
else
-   req128_l = 1;
+   req128_l = true;

swath_bytes_l = total_swath_bytes;
swath_bytes_c = 0;
@@ -670,7 +670,7 @@ static void get_surf_rq_param(struct display_mode_lib 
*mode_lib,
const display_pipe_source_params_st pipe_src_param,
bool is_chroma)
 {
-   bool mode_422 = 0;
+   bool mode_422 = false;
unsigned int vp_width = 0;
unsigned int vp_height = 0;
unsigned int data_pitch = 0;
@@ -959,7 +959,7 @@ static void dml20v2_rq_dlg_get_dlg_params(struct 
display_mode_lib *mode_lib,
// Source
 // dcc_en  = src.dcc;
dual_plane = is_dual_plane((enum 
source_format_class)(src->sour

[PATCH 1/8] drm/amd/display: use true, false for bool variable in dc_link_ddc.c

2019-12-24 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c:593:6-9: WARNING: Assignment 
of 0/1 to bool variable

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c 
b/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c
index c2c136b..a49c10d 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_ddc.c
@@ -590,7 +590,7 @@ bool dal_ddc_submit_aux_command(struct ddc_service *ddc,
struct aux_payload *payload)
 {
uint32_t retrieved = 0;
-   bool ret = 0;
+   bool ret = false;

if (!ddc)
return false;
--
2.7.4

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


[PATCH 5/8] drm/amd/display: use true, false for bool variable in dce_calcs.c

2019-12-24 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c:157:46-64: WARNING: Assignment 
of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c:159:2-20: WARNING: Assignment 
of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c:161:46-64: WARNING: Assignment 
of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c:163:2-20: WARNING: Assignment 
of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c:289:1-12: WARNING: Assignment 
of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c:290:1-12: WARNING: Assignment 
of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c:341:3-14: WARNING: Assignment 
of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c:343:4-15: WARNING: Assignment 
of 0/1 to bool variable

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c 
b/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c
index a1d4925..5d081c4 100644
--- a/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c
+++ b/drivers/gpu/drm/amd/display/dc/calcs/dce_calcs.c
@@ -154,14 +154,14 @@ static void calculate_bandwidth(



-   if (data->d0_underlay_mode == bw_def_none) { d0_underlay_enable = 0; }
-   else {
-   d0_underlay_enable = 1;
-   }
-   if (data->d1_underlay_mode == bw_def_none) { d1_underlay_enable = 0; }
-   else {
-   d1_underlay_enable = 1;
-   }
+   if (data->d0_underlay_mode == bw_def_none)
+   d0_underlay_enable = false;
+   else
+   d0_underlay_enable = true;
+   if (data->d1_underlay_mode == bw_def_none)
+   d1_underlay_enable = false;
+   else
+   d1_underlay_enable = true;
data->number_of_underlay_surfaces = d0_underlay_enable + 
d1_underlay_enable;
switch (data->underlay_surface_type) {
case bw_def_420:
@@ -286,8 +286,8 @@ static void calculate_bandwidth(
data->cursor_width_pixels[2] = bw_int_to_fixed(0);
data->cursor_width_pixels[3] = bw_int_to_fixed(0);
/* graphics surface parameters from spreadsheet*/
-   fbc_enabled = 0;
-   lpt_enabled = 0;
+   fbc_enabled = false;
+   lpt_enabled = false;
for (i = 4; i <= maximum_number_of_surfaces - 3; i++) {
if (i < data->number_of_displays + 4) {
if (i == 4 && data->d0_underlay_mode == 
bw_def_underlay_only) {
@@ -338,9 +338,9 @@ static void calculate_bandwidth(
data->access_one_channel_only[i] = 0;
}
if (data->fbc_en[i] == 1) {
-   fbc_enabled = 1;
+   fbc_enabled = true;
if (data->lpt_en[i] == 1) {
-   lpt_enabled = 1;
+   lpt_enabled = true;
}
}
data->cursor_width_pixels[i] = 
bw_int_to_fixed(vbios->cursor_width);
--
2.7.4

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


[PATCH 2/8] drm/amd/display: use true, false for bool variable in dcn10_hw_sequencer.c

2019-12-24 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c:482:6-14: WARNING: 
Assignment of 0/1 to bool variable
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c:485:2-10: WARNING: 
Assignment of 0/1 to bool variable

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c 
b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
index 9c55e48..2baff3c 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c
@@ -479,10 +479,10 @@ void dcn10_enable_power_gating_plane(
struct dce_hwseq *hws,
bool enable)
 {
-   bool force_on = 1; /* disable power gating */
+   bool force_on = true; /* disable power gating */

if (enable)
-   force_on = 0;
+   force_on = false;

/* DCHUBP0/1/2/3 */
REG_UPDATE(DOMAIN0_PG_CONFIG, DOMAIN0_POWER_FORCEON, force_on);
--
2.7.4

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


[PATCH 2/5] drm/amdgpu: use true, false for bool variable in mxgpu_nv.c

2019-12-24 Thread zhengbin
Fixes coccicheck warning:

drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c:255:2-20: WARNING: Assignment of 0/1 to 
bool variable
drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c:267:2-20: WARNING: Assignment of 0/1 to 
bool variable

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c 
b/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c
index 1c3a7d4..237fa5e 100644
--- a/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c
+++ b/drivers/gpu/drm/amd/amdgpu/mxgpu_nv.c
@@ -252,7 +252,7 @@ static void xgpu_nv_mailbox_flr_work(struct work_struct 
*work)
 */
locked = mutex_trylock(&adev->lock_reset);
if (locked)
-   adev->in_gpu_reset = 1;
+   adev->in_gpu_reset = true;

do {
if (xgpu_nv_mailbox_peek_msg(adev) == IDH_FLR_NOTIFICATION_CMPL)
@@ -264,7 +264,7 @@ static void xgpu_nv_mailbox_flr_work(struct work_struct 
*work)

 flr_done:
if (locked) {
-   adev->in_gpu_reset = 0;
+   adev->in_gpu_reset = false;
mutex_unlock(&adev->lock_reset);
}

--
2.7.4

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


[PATCH 2/5] drm/amd/display: Remove set but not used variable 'source_bpp'

2019-10-05 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c: In function calc_rc_params:
drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c:180:6: warning: variable 
source_bpp set but not used [-Wunused-but-set-variable]

It is not used since commit 97bda0322b8a ("drm/amd/display:
Add DSC support for Navi (v2)")

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c 
b/drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c
index ca51e83..76c4b12 100644
--- a/drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c
+++ b/drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c
@@ -177,7 +177,6 @@ void calc_rc_params(struct rc_params *rc, enum colour_mode 
cm, enum bits_per_com
 {
float bpp_group;
float initial_xmit_delay_factor;
-   int source_bpp;
int padding_pixels;
int i;

@@ -217,8 +216,6 @@ void calc_rc_params(struct rc_params *rc, enum colour_mode 
cm, enum bits_per_com
rc->initial_xmit_delay++;
}

-   source_bpp = MODE_SELECT(bpc * 3, bpc * 2, bpc * 1.5);
-
rc->flatness_min_qp = ((bpc == BPC_8) ?  (3) : ((bpc == BPC_10) ? 
(7)  : (11))) - ((minor_version == 1 && cm == CM_444) ? 1 : 0);
rc->flatness_max_qp = ((bpc == BPC_8) ? (12) : ((bpc == BPC_10) ? 
(16) : (20))) - ((minor_version == 1 && cm == CM_444) ? 1 : 0);
rc->flatness_det_thresh = 2 << (bpc - 8);
--
2.7.4

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

[PATCH 0/5] drm/amd/display: some fixes for gcc warning

2019-10-05 Thread zhengbin
zhengbin (5):
  drm/amd/display: Make function wait_for_alt_mode static
  drm/amd/display: Remove set but not used variable 'source_bpp'
  drm/amd/display: Remove set but not used variables
'h_ratio_chroma','v_ratio_chroma'
  drm/amd/display: Remove set but not used variable 'pixel_width'
  drm/amd/display: Remove set but not used variables 'pp_smu','old_pipe'

 drivers/gpu/drm/amd/display/dc/core/dc_link.c   |  2 +-
 drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 12 
 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp.c|  7 ---
 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dwb_scl.c|  4 
 drivers/gpu/drm/amd/display/dc/dsc/rc_calc.c|  3 ---
 5 files changed, 1 insertion(+), 27 deletions(-)

--
2.7.4

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

[PATCH 5/6] drm/msm/dpu: Remove set but not used variables 'cmd_enc', 'priv'

2019-10-05 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c: In function 
dpu_encoder_phys_cmd_ctl_start_irq:
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c:136:31: warning: variable 
cmd_enc set but not used [-Wunused-but-set-variable]
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c: In function 
dpu_encoder_phys_cmd_irq_control:
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c:328:31: warning: variable 
cmd_enc set but not used [-Wunused-but-set-variable]
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c: In function 
dpu_encoder_phys_cmd_tearcheck_config:
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c:367:26: warning: variable 
priv set but not used [-Wunused-but-set-variable]
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c: In function 
dpu_encoder_phys_cmd_wait_for_tx_complete:
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c:662:31: warning: variable 
cmd_enc set but not used [-Wunused-but-set-variable]

They are not used since commit 25fdd5933e4c ("drm/msm:
Add SDM845 DPU support")

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 11 ---
 1 file changed, 11 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c 
b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c
index 2923b63..6169c75 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c
@@ -124,13 +124,11 @@ static void dpu_encoder_phys_cmd_pp_rd_ptr_irq(void *arg, 
int irq_idx)
 static void dpu_encoder_phys_cmd_ctl_start_irq(void *arg, int irq_idx)
 {
struct dpu_encoder_phys *phys_enc = arg;
-   struct dpu_encoder_phys_cmd *cmd_enc;

if (!phys_enc || !phys_enc->hw_ctl)
return;

DPU_ATRACE_BEGIN("ctl_start_irq");
-   cmd_enc = to_dpu_encoder_phys_cmd(phys_enc);

atomic_add_unless(&phys_enc->pending_ctlstart_cnt, -1, 0);

@@ -316,13 +314,9 @@ static int dpu_encoder_phys_cmd_control_vblank_irq(
 static void dpu_encoder_phys_cmd_irq_control(struct dpu_encoder_phys *phys_enc,
bool enable)
 {
-   struct dpu_encoder_phys_cmd *cmd_enc;
-
if (!phys_enc)
return;

-   cmd_enc = to_dpu_encoder_phys_cmd(phys_enc);
-
trace_dpu_enc_phys_cmd_irq_ctrl(DRMID(phys_enc->parent),
phys_enc->hw_pp->idx - PINGPONG_0,
enable, atomic_read(&phys_enc->vblank_refcount));
@@ -355,7 +349,6 @@ static void dpu_encoder_phys_cmd_tearcheck_config(
struct drm_display_mode *mode;
bool tc_enable = true;
u32 vsync_hz;
-   struct msm_drm_private *priv;
struct dpu_kms *dpu_kms;

if (!phys_enc || !phys_enc->hw_pp) {
@@ -377,7 +370,6 @@ static void dpu_encoder_phys_cmd_tearcheck_config(
DPU_ERROR("invalid device\n");
return;
}
-   priv = dpu_kms->dev->dev_private;

/*
 * TE default: dsi byte clock calculated base on 70 fps;
@@ -650,13 +642,10 @@ static int dpu_encoder_phys_cmd_wait_for_tx_complete(
struct dpu_encoder_phys *phys_enc)
 {
int rc;
-   struct dpu_encoder_phys_cmd *cmd_enc;

if (!phys_enc)
return -EINVAL;

-   cmd_enc = to_dpu_encoder_phys_cmd(phys_enc);
-
rc = _dpu_encoder_phys_cmd_wait_for_idle(phys_enc);
if (rc) {
DRM_ERROR("failed wait_for_idle: id:%u ret:%d intf:%d\n",
--
2.7.4

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

[PATCH 1/5] drm/amd/display: Make function wait_for_alt_mode static

2019-10-05 Thread zhengbin
Fix sparse warnings:

drivers/gpu/drm/amd/display/dc/core/dc_link.c:687:6: warning: symbol 
'wait_for_alt_mode' was not declared. Should it be static?

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/amd/display/dc/core/dc_link.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c 
b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
index 33d4cc4..152c564 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
@@ -685,7 +685,7 @@ static bool is_same_edid(struct dc_edid *old_edid, struct 
dc_edid *new_edid)
return (memcmp(old_edid->raw_edid, new_edid->raw_edid, 
new_edid->length) == 0);
 }

-bool wait_for_alt_mode(struct dc_link *link)
+static bool wait_for_alt_mode(struct dc_link *link)
 {

/**
--
2.7.4

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

[PATCH 5/5] drm/amd/display: Remove set but not used variables 'pp_smu', 'old_pipe'

2019-10-05 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c: In function 
dce110_enable_audio_stream:
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c:949:23: warning: 
variable pp_smu set but not used [-Wunused-but-set-variable]
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c: In function 
dce110_disable_audio_stream:
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c:983:23: warning: 
variable pp_smu set but not used [-Wunused-but-set-variable]
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c: In function 
dce110_program_front_end_for_pipe:
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c:2429:19: warning: 
variable old_pipe set but not used [-Wunused-but-set-variable]

'pp_smu' is not used since commit 170a2398d2d8 ("drm/amd/display:
make clk_mgr call enable_pme_wa")

'old_pipe' is not used since commit 65d38262b3e8 ("drm/amd/display:
fbc state could not reach while enable fbc")

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 12 
 1 file changed, 12 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c 
b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
index 01a924b..f8c1b4f 100644
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
@@ -944,7 +944,6 @@ void dce110_enable_audio_stream(struct pipe_ctx *pipe_ctx)
 {
/* notify audio driver for audio modes of monitor */
struct dc *core_dc;
-   struct pp_smu_funcs *pp_smu = NULL;
struct clk_mgr *clk_mgr;
unsigned int i, num_audio = 1;

@@ -957,9 +956,6 @@ void dce110_enable_audio_stream(struct pipe_ctx *pipe_ctx)
if (pipe_ctx->stream_res.audio && pipe_ctx->stream_res.audio->enabled 
== true)
return;

-   if (core_dc->res_pool->pp_smu)
-   pp_smu = core_dc->res_pool->pp_smu;
-
if (pipe_ctx->stream_res.audio) {
for (i = 0; i < MAX_PIPES; i++) {
/*current_state not updated yet*/
@@ -984,7 +980,6 @@ void dce110_enable_audio_stream(struct pipe_ctx *pipe_ctx)
 void dce110_disable_audio_stream(struct pipe_ctx *pipe_ctx)
 {
struct dc *dc;
-   struct pp_smu_funcs *pp_smu = NULL;
struct clk_mgr *clk_mgr;

if (!pipe_ctx || !pipe_ctx->stream)
@@ -1001,9 +996,6 @@ void dce110_disable_audio_stream(struct pipe_ctx *pipe_ctx)
if (pipe_ctx->stream_res.audio) {
pipe_ctx->stream_res.audio->enabled = false;

-   if (dc->res_pool->pp_smu)
-   pp_smu = dc->res_pool->pp_smu;
-
if (dc_is_dp_signal(pipe_ctx->stream->signal))

pipe_ctx->stream_res.stream_enc->funcs->dp_audio_disable(
pipe_ctx->stream_res.stream_enc);
@@ -2464,7 +2456,6 @@ static void dce110_program_front_end_for_pipe(
struct dc *dc, struct pipe_ctx *pipe_ctx)
 {
struct mem_input *mi = pipe_ctx->plane_res.mi;
-   struct pipe_ctx *old_pipe = NULL;
struct dc_plane_state *plane_state = pipe_ctx->plane_state;
struct xfm_grph_csc_adjustment adjust;
struct out_csc_color_matrix tbl_entry;
@@ -2472,9 +2463,6 @@ static void dce110_program_front_end_for_pipe(
DC_LOGGER_INIT();
memset(&tbl_entry, 0, sizeof(tbl_entry));

-   if (dc->current_state)
-   old_pipe = 
&dc->current_state->res_ctx.pipe_ctx[pipe_ctx->pipe_idx];
-
memset(&adjust, 0, sizeof(adjust));
adjust.gamut_adjust_type = GRAPHICS_GAMUT_ADJUST_TYPE_BYPASS;

--
2.7.4

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

[PATCH 2/6] drm/msm/dpu: Remove set but not used variable 'priv' in dpu_encoder_phys_vid.c

2019-10-05 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c: In function 
dpu_encoder_phys_vid_disable:
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c:566:26: warning: variable 
priv set but not used [-Wunused-but-set-variable]

It is not used since commit 25fdd5933e4c ("drm/msm:
Add SDM845 DPU support")

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c 
b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c
index b9c84fb..c7a3f4b 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c
@@ -566,7 +566,6 @@ static void dpu_encoder_phys_vid_prepare_for_kickoff(

 static void dpu_encoder_phys_vid_disable(struct dpu_encoder_phys *phys_enc)
 {
-   struct msm_drm_private *priv;
unsigned long lock_flags;
int ret;

@@ -575,7 +574,6 @@ static void dpu_encoder_phys_vid_disable(struct 
dpu_encoder_phys *phys_enc)
DPU_ERROR("invalid encoder/device\n");
return;
}
-   priv = phys_enc->parent->dev->dev_private;

if (!phys_enc->hw_intf || !phys_enc->hw_ctl) {
DPU_ERROR("invalid hw_intf %d hw_ctl %d\n",
--
2.7.4

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

[PATCH 3/6] drm/msm/dpu: Remove set but not used variable 'priv' in dpu_core_irq.c

2019-10-05 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.c: In function 
dpu_core_irq_preinstall:
drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.c:354:26: warning: variable priv set 
but not used [-Wunused-but-set-variable]
drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.c: In function 
dpu_core_irq_uninstall:
drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.c:390:26: warning: variable priv set 
but not used [-Wunused-but-set-variable]

It is not used since commit 25fdd5933e4c ("drm/msm:
Add SDM845 DPU support")

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.c 
b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.c
index cdbea38..655e129 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.c
@@ -343,7 +343,6 @@ void dpu_debugfs_core_irq_init(struct dpu_kms *dpu_kms,

 void dpu_core_irq_preinstall(struct dpu_kms *dpu_kms)
 {
-   struct msm_drm_private *priv;
int i;

if (!dpu_kms->dev) {
@@ -353,7 +352,6 @@ void dpu_core_irq_preinstall(struct dpu_kms *dpu_kms)
DPU_ERROR("invalid device private\n");
return;
}
-   priv = dpu_kms->dev->dev_private;

pm_runtime_get_sync(&dpu_kms->pdev->dev);
dpu_clear_all_irqs(dpu_kms);
@@ -379,7 +377,6 @@ void dpu_core_irq_preinstall(struct dpu_kms *dpu_kms)

 void dpu_core_irq_uninstall(struct dpu_kms *dpu_kms)
 {
-   struct msm_drm_private *priv;
int i;

if (!dpu_kms->dev) {
@@ -389,7 +386,6 @@ void dpu_core_irq_uninstall(struct dpu_kms *dpu_kms)
DPU_ERROR("invalid device private\n");
return;
}
-   priv = dpu_kms->dev->dev_private;

pm_runtime_get_sync(&dpu_kms->pdev->dev);
for (i = 0; i < dpu_kms->irq_obj.total_irqs; i++)
--
2.7.4

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

[PATCH 1/6] drm/msm/dpu: Remove set but not used variable 'priv' in dpu_kms.c

2019-10-05 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c: In function _dpu_danger_signal_status:
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c:80:26: warning: variable priv set but 
not used [-Wunused-but-set-variable]
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c: In function dpu_kms_prepare_commit:
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c:271:26: warning: variable priv set but 
not used [-Wunused-but-set-variable]

It is not used since commit 25fdd5933e4c ("drm/msm:
Add SDM845 DPU support")

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c 
b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
index 58b0485..4711ac5 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
@@ -68,7 +68,6 @@ static int _dpu_danger_signal_status(struct seq_file *s,
bool danger_status)
 {
struct dpu_kms *kms = (struct dpu_kms *)s->private;
-   struct msm_drm_private *priv;
struct dpu_danger_safe_status status;
int i;

@@ -77,7 +76,6 @@ static int _dpu_danger_signal_status(struct seq_file *s,
return 0;
}

-   priv = kms->dev->dev_private;
memset(&status, 0, sizeof(struct dpu_danger_safe_status));

pm_runtime_get_sync(&kms->pdev->dev);
@@ -280,7 +278,6 @@ static void dpu_kms_prepare_commit(struct msm_kms *kms,
struct drm_atomic_state *state)
 {
struct dpu_kms *dpu_kms;
-   struct msm_drm_private *priv;
struct drm_device *dev;
struct drm_crtc *crtc;
struct drm_crtc_state *crtc_state;
@@ -294,7 +291,6 @@ static void dpu_kms_prepare_commit(struct msm_kms *kms,

if (!dev || !dev->dev_private)
return;
-   priv = dev->dev_private;

/* Call prepare_commit for all affected encoders */
for_each_new_crtc_in_state(state, crtc, crtc_state, i) {
--
2.7.4

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

[PATCH 3/5] drm/amd/display: Remove set but not used variables 'h_ratio_chroma', 'v_ratio_chroma'

2019-10-05 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dwb_scl.c: In function 
dwb_program_horz_scalar:
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dwb_scl.c:725:11: warning: variable 
h_ratio_chroma set but not used [-Wunused-but-set-variable]
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dwb_scl.c: In function 
dwb_program_vert_scalar:
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dwb_scl.c:806:11: warning: variable 
v_ratio_chroma set but not used [-Wunused-but-set-variable]

They are not used since commit 345429a67c48 ("drm/amd/display:
Add DCN2 DWB")

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dwb_scl.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dwb_scl.c 
b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dwb_scl.c
index cd8bc92..880954a 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dwb_scl.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dwb_scl.c
@@ -722,7 +722,6 @@ bool dwb_program_horz_scalar(struct dcn20_dwbc *dwbc20,
struct scaling_taps num_taps)
 {
uint32_t h_ratio_luma = 1;
-   uint32_t h_ratio_chroma = 1;
uint32_t h_taps_luma = num_taps.h_taps;
uint32_t h_taps_chroma = num_taps.h_taps_c;
int32_t h_init_phase_luma = 0;
@@ -747,7 +746,6 @@ bool dwb_program_horz_scalar(struct dcn20_dwbc *dwbc20,
h_ratio_luma = -1;
else
h_ratio_luma = dc_fixpt_u3d19(tmp_h_ratio_luma) << 5;
-   h_ratio_chroma = h_ratio_luma * 2;

/*Program ratio*/
REG_UPDATE(WBSCL_HORZ_FILTER_SCALE_RATIO, WBSCL_H_SCALE_RATIO, 
h_ratio_luma);
@@ -803,7 +801,6 @@ bool dwb_program_vert_scalar(struct dcn20_dwbc *dwbc20,
enum dwb_subsample_position subsample_position)
 {
uint32_t v_ratio_luma = 1;
-   uint32_t v_ratio_chroma = 1;
uint32_t v_taps_luma = num_taps.v_taps;
uint32_t v_taps_chroma = num_taps.v_taps_c;
int32_t v_init_phase_luma = 0;
@@ -827,7 +824,6 @@ bool dwb_program_vert_scalar(struct dcn20_dwbc *dwbc20,
v_ratio_luma = -1;
else
v_ratio_luma = dc_fixpt_u3d19(tmp_v_ratio_luma) << 5;
-   v_ratio_chroma = v_ratio_luma * 2;

/*Program ratio*/
REG_UPDATE(WBSCL_VERT_FILTER_SCALE_RATIO, WBSCL_V_SCALE_RATIO, 
v_ratio_luma);
--
2.7.4

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

[PATCH 4/5] drm/amd/display: Remove set but not used variable 'pixel_width'

2019-10-05 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp.c: In function 
dpp2_get_optimal_number_of_taps:
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp.c:359:11: warning: variable 
pixel_width set but not used [-Wunused-but-set-variable]

It is not used since commit f7de96ee8b5f ("drm/amd/display:
Add DCN2 DPP")

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp.c | 7 ---
 1 file changed, 7 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp.c 
b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp.c
index 2f5aade..ae85343 100644
--- a/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp.c
+++ b/drivers/gpu/drm/amd/display/dc/dcn20/dcn20_dpp.c
@@ -376,13 +376,6 @@ bool dpp2_get_optimal_number_of_taps(
struct scaler_data *scl_data,
const struct scaling_taps *in_taps)
 {
-   uint32_t pixel_width;
-
-   if (scl_data->viewport.width > scl_data->recout.width)
-   pixel_width = scl_data->recout.width;
-   else
-   pixel_width = scl_data->viewport.width;
-
/* Some ASICs does not support  FP16 scaling, so we reject modes 
require this*/
if (scl_data->viewport.width  != scl_data->h_active &&
scl_data->viewport.height != scl_data->v_active &&
--
2.7.4

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

[PATCH 4/6] drm/msm/dpu: Remove set but not used variables 'dpu_cstate', 'priv'

2019-10-05 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c: In function 
dpu_core_perf_crtc_release_bw:
drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c:248:25: warning: variable 
dpu_cstate set but not used [-Wunused-but-set-variable]
drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c: In function 
dpu_core_perf_crtc_update:
drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c:337:26: warning: variable priv 
set but not used [-Wunused-but-set-variable]

They are not used since commit 25fdd5933e4c ("drm/msm:
Add SDM845 DPU support")

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c 
b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c
index 09a49b5..65177c8 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c
@@ -215,7 +215,6 @@ static int _dpu_core_perf_crtc_update_bus(struct dpu_kms 
*kms,
 void dpu_core_perf_crtc_release_bw(struct drm_crtc *crtc)
 {
struct dpu_crtc *dpu_crtc;
-   struct dpu_crtc_state *dpu_cstate;
struct dpu_kms *kms;

if (!crtc) {
@@ -230,7 +229,6 @@ void dpu_core_perf_crtc_release_bw(struct drm_crtc *crtc)
}

dpu_crtc = to_dpu_crtc(crtc);
-   dpu_cstate = to_dpu_crtc_state(crtc->state);

if (atomic_dec_return(&kms->bandwidth_ref) > 0)
return;
@@ -287,7 +285,6 @@ int dpu_core_perf_crtc_update(struct drm_crtc *crtc,
u64 clk_rate = 0;
struct dpu_crtc *dpu_crtc;
struct dpu_crtc_state *dpu_cstate;
-   struct msm_drm_private *priv;
struct dpu_kms *kms;
int ret;

@@ -301,7 +298,6 @@ int dpu_core_perf_crtc_update(struct drm_crtc *crtc,
DPU_ERROR("invalid kms\n");
return -EINVAL;
}
-   priv = kms->dev->dev_private;

dpu_crtc = to_dpu_crtc(crtc);
dpu_cstate = to_dpu_crtc_state(crtc->state);
--
2.7.4

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

[PATCH] drm/amd/display: Make some functions static

2019-10-05 Thread zhengbin
Fix sparse warnings:

drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_hdcp.c:32:6: warning: 
symbol 'lp_write_i2c' was not declared. Should it be static?
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_hdcp.c:42:6: warning: 
symbol 'lp_read_i2c' was not declared. Should it be static?
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_hdcp.c:52:6: warning: 
symbol 'lp_write_dpcd' was not declared. Should it be static?
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_hdcp.c:59:6: warning: 
symbol 'lp_read_dpcd' was not declared. Should it be static?

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c 
b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
index 2443c23..77181dd 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_hdcp.c
@@ -29,7 +29,8 @@
 #include "dm_helpers.h"
 #include 

-bool lp_write_i2c(void *handle, uint32_t address, const uint8_t *data, 
uint32_t size)
+static bool
+lp_write_i2c(void *handle, uint32_t address, const uint8_t *data, uint32_t 
size)
 {

struct dc_link *link = handle;
@@ -39,7 +40,8 @@ bool lp_write_i2c(void *handle, uint32_t address, const 
uint8_t *data, uint32_t
return dm_helpers_submit_i2c(link->ctx, link, &cmd);
 }

-bool lp_read_i2c(void *handle, uint32_t address, uint8_t offset, uint8_t 
*data, uint32_t size)
+static bool
+lp_read_i2c(void *handle, uint32_t address, uint8_t offset, uint8_t *data, 
uint32_t size)
 {
struct dc_link *link = handle;

@@ -49,14 +51,16 @@ bool lp_read_i2c(void *handle, uint32_t address, uint8_t 
offset, uint8_t *data,
return dm_helpers_submit_i2c(link->ctx, link, &cmd);
 }

-bool lp_write_dpcd(void *handle, uint32_t address, const uint8_t *data, 
uint32_t size)
+static bool
+lp_write_dpcd(void *handle, uint32_t address, const uint8_t *data, uint32_t 
size)
 {
struct dc_link *link = handle;

return dm_helpers_dp_write_dpcd(link->ctx, link, address, data, size);
 }

-bool lp_read_dpcd(void *handle, uint32_t address, uint8_t *data, uint32_t size)
+static bool
+lp_read_dpcd(void *handle, uint32_t address, uint8_t *data, uint32_t size)
 {
struct dc_link *link = handle;

--
2.7.4

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

[PATCH 0/6] drm/msm/dpu: Remove some set but not used variables

2019-10-05 Thread zhengbin
zhengbin (6):
  drm/msm/dpu: Remove set but not used variable 'priv' in dpu_kms.c
  drm/msm/dpu: Remove set but not used variable 'priv' in
dpu_encoder_phys_vid.c
  drm/msm/dpu: Remove set but not used variable 'priv' in dpu_core_irq.c
  drm/msm/dpu: Remove set but not used variables 'dpu_cstate','priv'
  drm/msm/dpu: Remove set but not used variables 'cmd_enc','priv'
  drm/msm/dpu: Remove set but not used variables 'mode','dpu_kms','priv'

 drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.c |  4 
 drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c|  4 
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c  |  7 ---
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 11 ---
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_vid.c |  2 --
 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c  |  4 
 6 files changed, 32 deletions(-)

--
2.7.4

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

[PATCH 6/6] drm/msm/dpu: Remove set but not used variables 'mode', 'dpu_kms', 'priv'

2019-10-05 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c: In function 
dpu_encoder_virt_disable:
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:1199:27: warning: variable mode set 
but not used [-Wunused-but-set-variable]
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c: In function 
_dpu_encoder_init_debugfs:
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:1963:18: warning: variable dpu_kms 
set but not used [-Wunused-but-set-variable]
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c: In function 
dpu_encoder_frame_done_timeout:
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c:2183:26: warning: variable priv set 
but not used [-Wunused-but-set-variable]

They are not used since commit 25fdd5933e4c ("drm/msm:
Add SDM845 DPU support")

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 7 ---
 1 file changed, 7 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c 
b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
index d82ea99..e6fe208 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
@@ -1184,7 +1184,6 @@ static void dpu_encoder_virt_disable(struct drm_encoder 
*drm_enc)
struct dpu_encoder_virt *dpu_enc = NULL;
struct msm_drm_private *priv;
struct dpu_kms *dpu_kms;
-   struct drm_display_mode *mode;
int i = 0;

if (!drm_enc) {
@@ -1204,8 +1203,6 @@ static void dpu_encoder_virt_disable(struct drm_encoder 
*drm_enc)
mutex_lock(&dpu_enc->enc_lock);
dpu_enc->enabled = false;

-   mode = &drm_enc->crtc->state->adjusted_mode;
-
priv = drm_enc->dev->dev_private;
dpu_kms = to_dpu_kms(priv->kms);

@@ -1915,7 +1912,6 @@ static int _dpu_encoder_init_debugfs(struct drm_encoder 
*drm_enc)
 {
struct dpu_encoder_virt *dpu_enc = to_dpu_encoder_virt(drm_enc);
struct msm_drm_private *priv;
-   struct dpu_kms *dpu_kms;
int i;

static const struct file_operations debugfs_status_fops = {
@@ -1933,7 +1929,6 @@ static int _dpu_encoder_init_debugfs(struct drm_encoder 
*drm_enc)
}

priv = drm_enc->dev->dev_private;
-   dpu_kms = to_dpu_kms(priv->kms);

snprintf(name, DPU_NAME_SIZE, "encoder%u", drm_enc->base.id);

@@ -2133,14 +2128,12 @@ static void dpu_encoder_frame_done_timeout(struct 
timer_list *t)
struct dpu_encoder_virt *dpu_enc = from_timer(dpu_enc, t,
frame_done_timer);
struct drm_encoder *drm_enc = &dpu_enc->base;
-   struct msm_drm_private *priv;
u32 event;

if (!drm_enc->dev || !drm_enc->dev->dev_private) {
DPU_ERROR("invalid parameters\n");
return;
}
-   priv = drm_enc->dev->dev_private;

if (!dpu_enc->frame_busy_mask[0] || !dpu_enc->crtc_frame_event_cb) {
DRM_DEBUG_KMS("id:%u invalid timeout frame_busy_mask=%lu\n",
--
2.7.4

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

[PATCH 1/4] drm/omap: Remove set but not used variable 'plane'

2019-10-08 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/omapdrm/omap_fb.c: In function omap_framebuffer_update_scanout:
drivers/gpu/drm/omapdrm/omap_fb.c:130:16: warning: variable plane set but not 
used [-Wunused-but-set-variable]

It is not used since commit 2ecceeb53b19 ("drm/omap:
Move buffer pitch/offset to drm_framebuffer")

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/omapdrm/omap_fb.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/omapdrm/omap_fb.c 
b/drivers/gpu/drm/omapdrm/omap_fb.c
index 1b8b510..001f425 100644
--- a/drivers/gpu/drm/omapdrm/omap_fb.c
+++ b/drivers/gpu/drm/omapdrm/omap_fb.c
@@ -135,7 +135,6 @@ void omap_framebuffer_update_scanout(struct drm_framebuffer 
*fb,
 {
struct omap_framebuffer *omap_fb = to_omap_framebuffer(fb);
const struct drm_format_info *format = omap_fb->format;
-   struct plane *plane = &omap_fb->planes[0];
u32 x, y, orient = 0;

info->fourcc = fb->format->format;
@@ -209,8 +208,6 @@ void omap_framebuffer_update_scanout(struct drm_framebuffer 
*fb,
info->screen_width /= format->cpp[0];

if (fb->format->format == DRM_FORMAT_NV12) {
-   plane = &omap_fb->planes[1];
-
if (info->rotation_type == OMAP_DSS_ROT_TILER) {
WARN_ON(!(omap_gem_flags(fb->obj[1]) & OMAP_BO_TILED));
omap_gem_rotated_dma_addr(fb->obj[1], orient, x/2, y/2,
--
2.7.4

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

[PATCH 2/4] drm/omap: Remove set but not used variable 'tclk_trail'

2019-10-08 Thread zhengbin
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/gpu/drm/omapdrm/dss/dsi.c: In function dsi_proto_timings:
drivers/gpu/drm/omapdrm/dss/dsi.c:3562:46: warning: variable tclk_trail set but 
not used [-Wunused-but-set-variable]

It is not used since commit 9960aa7cb58c ("drm/omap:
move omapdss & displays under omapdrm")

Reported-by: Hulk Robot 
Signed-off-by: zhengbin 
---
 drivers/gpu/drm/omapdrm/dss/dsi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c 
b/drivers/gpu/drm/omapdrm/dss/dsi.c
index b30fcaa..da16ea0 100644
--- a/drivers/gpu/drm/omapdrm/dss/dsi.c
+++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
@@ -3548,7 +3548,7 @@ static int dsi_proto_config(struct dsi_data *dsi)

 static void dsi_proto_timings(struct dsi_data *dsi)
 {
-   unsigned int tlpx, tclk_zero, tclk_prepare, tclk_trail;
+   unsigned int tlpx, tclk_zero, tclk_prepare;
unsigned int tclk_pre, tclk_post;
unsigned int ths_prepare, ths_prepare_ths_zero, ths_zero;
unsigned int ths_trail, ths_exit;
@@ -3567,7 +3567,6 @@ static void dsi_proto_timings(struct dsi_data *dsi)

r = dsi_read_reg(dsi, DSI_DSIPHY_CFG1);
tlpx = FLD_GET(r, 20, 16) * 2;
-   tclk_trail = FLD_GET(r, 15, 8);
tclk_zero = FLD_GET(r, 7, 0);

r = dsi_read_reg(dsi, DSI_DSIPHY_CFG2);
--
2.7.4

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

  1   2   >