Skip to content

Commit c085ffa

Browse files
srishanmgregkh
authored andcommitted
drm/amd/display: fix some coding style issues
commit ae67558 upstream. Fix the following checkpatch checks in amdgpu_dm.c CHECK: Prefer kernel type 'u8' over 'uint8_t' CHECK: Prefer kernel type 'u32' over 'uint32_t' CHECK: Prefer kernel type 'u64' over 'uint64_t' CHECK: Prefer kernel type 's32' over 'int32_t' Signed-off-by: Srinivasan Shanmugam <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Signed-off-by: Alex Deucher <[email protected]> [ PSR-SU support was introduced in kernel 6.2 with commits like 30ebe41 ("drm/amd/display: add FB_DAMAGE_CLIPS support") but PSR-SU isn't enabled in 6.1.y, so this block needs to be skipped when backporting. ] Signed-off-by: Mario Limonciello <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 374735c commit c085ffa

File tree

1 file changed

+45
-45
lines changed

1 file changed

+45
-45
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ static void amdgpu_dm_destroy_drm_device(struct amdgpu_display_manager *dm);
211211

212212
static int amdgpu_dm_connector_init(struct amdgpu_display_manager *dm,
213213
struct amdgpu_dm_connector *amdgpu_dm_connector,
214-
uint32_t link_index,
214+
u32 link_index,
215215
struct amdgpu_encoder *amdgpu_encoder);
216216
static int amdgpu_dm_encoder_init(struct drm_device *dev,
217217
struct amdgpu_encoder *aencoder,
@@ -263,7 +263,7 @@ static u32 dm_vblank_get_counter(struct amdgpu_device *adev, int crtc)
263263
static int dm_crtc_get_scanoutpos(struct amdgpu_device *adev, int crtc,
264264
u32 *vbl, u32 *position)
265265
{
266-
uint32_t v_blank_start, v_blank_end, h_position, v_position;
266+
u32 v_blank_start, v_blank_end, h_position, v_position;
267267

268268
if ((crtc < 0) || (crtc >= adev->mode_info.num_crtc))
269269
return -EINVAL;
@@ -391,7 +391,7 @@ static void dm_pflip_high_irq(void *interrupt_params)
391391
struct amdgpu_device *adev = irq_params->adev;
392392
unsigned long flags;
393393
struct drm_pending_vblank_event *e;
394-
uint32_t vpos, hpos, v_blank_start, v_blank_end;
394+
u32 vpos, hpos, v_blank_start, v_blank_end;
395395
bool vrr_active;
396396

397397
amdgpu_crtc = get_crtc_by_otg_inst(adev, irq_params->irq_src - IRQ_TYPE_PFLIP);
@@ -678,7 +678,7 @@ static void dmub_hpd_callback(struct amdgpu_device *adev,
678678
struct drm_connector *connector;
679679
struct drm_connector_list_iter iter;
680680
struct dc_link *link;
681-
uint8_t link_index = 0;
681+
u8 link_index = 0;
682682
struct drm_device *dev;
683683

684684
if (adev == NULL)
@@ -779,7 +779,7 @@ static void dm_dmub_outbox1_low_irq(void *interrupt_params)
779779
struct amdgpu_device *adev = irq_params->adev;
780780
struct amdgpu_display_manager *dm = &adev->dm;
781781
struct dmcub_trace_buf_entry entry = { 0 };
782-
uint32_t count = 0;
782+
u32 count = 0;
783783
struct dmub_hpd_work *dmub_hpd_wrk;
784784
struct dc_link *plink = NULL;
785785

@@ -1045,7 +1045,7 @@ static int dm_dmub_hw_init(struct amdgpu_device *adev)
10451045
struct dmub_srv_hw_params hw_params;
10461046
enum dmub_status status;
10471047
const unsigned char *fw_inst_const, *fw_bss_data;
1048-
uint32_t i, fw_inst_const_size, fw_bss_data_size;
1048+
u32 i, fw_inst_const_size, fw_bss_data_size;
10491049
bool has_hw_support;
10501050

10511051
if (!dmub_srv)
@@ -1206,10 +1206,10 @@ static void dm_dmub_hw_resume(struct amdgpu_device *adev)
12061206

12071207
static void mmhub_read_system_context(struct amdgpu_device *adev, struct dc_phy_addr_space_config *pa_config)
12081208
{
1209-
uint64_t pt_base;
1210-
uint32_t logical_addr_low;
1211-
uint32_t logical_addr_high;
1212-
uint32_t agp_base, agp_bot, agp_top;
1209+
u64 pt_base;
1210+
u32 logical_addr_low;
1211+
u32 logical_addr_high;
1212+
u32 agp_base, agp_bot, agp_top;
12131213
PHYSICAL_ADDRESS_LOC page_table_start, page_table_end, page_table_base;
12141214

12151215
memset(pa_config, 0, sizeof(*pa_config));
@@ -2536,7 +2536,7 @@ struct amdgpu_dm_connector *
25362536
amdgpu_dm_find_first_crtc_matching_connector(struct drm_atomic_state *state,
25372537
struct drm_crtc *crtc)
25382538
{
2539-
uint32_t i;
2539+
u32 i;
25402540
struct drm_connector_state *new_con_state;
25412541
struct drm_connector *connector;
25422542
struct drm_crtc *crtc_from_state;
@@ -3172,8 +3172,8 @@ static void handle_hpd_irq(void *param)
31723172

31733173
static void dm_handle_mst_sideband_msg(struct amdgpu_dm_connector *aconnector)
31743174
{
3175-
uint8_t esi[DP_PSR_ERROR_STATUS - DP_SINK_COUNT_ESI] = { 0 };
3176-
uint8_t dret;
3175+
u8 esi[DP_PSR_ERROR_STATUS - DP_SINK_COUNT_ESI] = { 0 };
3176+
u8 dret;
31773177
bool new_irq_handled = false;
31783178
int dpcd_addr;
31793179
int dpcd_bytes_to_read;
@@ -3201,7 +3201,7 @@ static void dm_handle_mst_sideband_msg(struct amdgpu_dm_connector *aconnector)
32013201

32023202
while (dret == dpcd_bytes_to_read &&
32033203
process_count < max_process_count) {
3204-
uint8_t retry;
3204+
u8 retry;
32053205
dret = 0;
32063206

32073207
process_count++;
@@ -3220,7 +3220,7 @@ static void dm_handle_mst_sideband_msg(struct amdgpu_dm_connector *aconnector)
32203220
dpcd_bytes_to_read - 1;
32213221

32223222
for (retry = 0; retry < 3; retry++) {
3223-
uint8_t wret;
3223+
u8 wret;
32243224

32253225
wret = drm_dp_dpcd_write(
32263226
&aconnector->dm_dp_aux.aux,
@@ -4236,12 +4236,12 @@ static void amdgpu_set_panel_orientation(struct drm_connector *connector);
42364236
static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
42374237
{
42384238
struct amdgpu_display_manager *dm = &adev->dm;
4239-
int32_t i;
4239+
s32 i;
42404240
struct amdgpu_dm_connector *aconnector = NULL;
42414241
struct amdgpu_encoder *aencoder = NULL;
42424242
struct amdgpu_mode_info *mode_info = &adev->mode_info;
4243-
uint32_t link_cnt;
4244-
int32_t primary_planes;
4243+
u32 link_cnt;
4244+
s32 primary_planes;
42454245
enum dc_connection_type new_connection_type = dc_connection_none;
42464246
const struct dc_plane_cap *plane;
42474247
bool psr_feature_enabled = false;
@@ -4768,7 +4768,7 @@ fill_plane_color_attributes(const struct drm_plane_state *plane_state,
47684768
static int
47694769
fill_dc_plane_info_and_addr(struct amdgpu_device *adev,
47704770
const struct drm_plane_state *plane_state,
4771-
const uint64_t tiling_flags,
4771+
const u64 tiling_flags,
47724772
struct dc_plane_info *plane_info,
47734773
struct dc_plane_address *address,
47744774
bool tmz_surface,
@@ -4977,7 +4977,7 @@ static void fill_dc_dirty_rects(struct drm_plane *plane,
49774977
uint32_t num_clips;
49784978
bool bb_changed;
49794979
bool fb_changed;
4980-
uint32_t i = 0;
4980+
u32 i = 0;
49814981

49824982
flip_addrs->dirty_rect_count = 0;
49834983

@@ -5111,7 +5111,7 @@ static enum dc_color_depth
51115111
convert_color_depth_from_display_info(const struct drm_connector *connector,
51125112
bool is_y420, int requested_bpc)
51135113
{
5114-
uint8_t bpc;
5114+
u8 bpc;
51155115

51165116
if (is_y420) {
51175117
bpc = 8;
@@ -5655,8 +5655,8 @@ static void apply_dsc_policy_for_edp(struct amdgpu_dm_connector *aconnector,
56555655
uint32_t max_dsc_target_bpp_limit_override)
56565656
{
56575657
const struct dc_link_settings *verified_link_cap = NULL;
5658-
uint32_t link_bw_in_kbps;
5659-
uint32_t edp_min_bpp_x16, edp_max_bpp_x16;
5658+
u32 link_bw_in_kbps;
5659+
u32 edp_min_bpp_x16, edp_max_bpp_x16;
56605660
struct dc *dc = sink->ctx->dc;
56615661
struct dc_dsc_bw_range bw_range = {0};
56625662
struct dc_dsc_config dsc_cfg = {0};
@@ -5713,11 +5713,11 @@ static void apply_dsc_policy_for_stream(struct amdgpu_dm_connector *aconnector,
57135713
struct dsc_dec_dpcd_caps *dsc_caps)
57145714
{
57155715
struct drm_connector *drm_connector = &aconnector->base;
5716-
uint32_t link_bandwidth_kbps;
5716+
u32 link_bandwidth_kbps;
57175717
struct dc *dc = sink->ctx->dc;
5718-
uint32_t max_supported_bw_in_kbps, timing_bw_in_kbps;
5719-
uint32_t dsc_max_supported_bw_in_kbps;
5720-
uint32_t max_dsc_target_bpp_limit_override =
5718+
u32 max_supported_bw_in_kbps, timing_bw_in_kbps;
5719+
u32 dsc_max_supported_bw_in_kbps;
5720+
u32 max_dsc_target_bpp_limit_override =
57215721
drm_connector->display_info.max_dsc_bpp;
57225722

57235723
link_bandwidth_kbps = dc_link_bandwidth_kbps(aconnector->dc_link,
@@ -6871,7 +6871,7 @@ static uint add_fs_modes(struct amdgpu_dm_connector *aconnector)
68716871
const struct drm_display_mode *m;
68726872
struct drm_display_mode *new_mode;
68736873
uint i;
6874-
uint32_t new_modes_count = 0;
6874+
u32 new_modes_count = 0;
68756875

68766876
/* Standard FPS values
68776877
*
@@ -6885,7 +6885,7 @@ static uint add_fs_modes(struct amdgpu_dm_connector *aconnector)
68856885
* 60 - Commonly used
68866886
* 48,72,96,120 - Multiples of 24
68876887
*/
6888-
static const uint32_t common_rates[] = {
6888+
static const u32 common_rates[] = {
68896889
23976, 24000, 25000, 29970, 30000,
68906890
48000, 50000, 60000, 72000, 96000, 120000
68916891
};
@@ -6901,8 +6901,8 @@ static uint add_fs_modes(struct amdgpu_dm_connector *aconnector)
69016901
return 0;
69026902

69036903
for (i = 0; i < ARRAY_SIZE(common_rates); i++) {
6904-
uint64_t target_vtotal, target_vtotal_diff;
6905-
uint64_t num, den;
6904+
u64 target_vtotal, target_vtotal_diff;
6905+
u64 num, den;
69066906

69076907
if (drm_mode_vrefresh(m) * 1000 < common_rates[i])
69086908
continue;
@@ -7150,7 +7150,7 @@ create_i2c(struct ddc_service *ddc_service,
71507150
*/
71517151
static int amdgpu_dm_connector_init(struct amdgpu_display_manager *dm,
71527152
struct amdgpu_dm_connector *aconnector,
7153-
uint32_t link_index,
7153+
u32 link_index,
71547154
struct amdgpu_encoder *aencoder)
71557155
{
71567156
int res = 0;
@@ -7641,8 +7641,8 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
76417641
struct drm_crtc *pcrtc,
76427642
bool wait_for_vblank)
76437643
{
7644-
uint32_t i;
7645-
uint64_t timestamp_ns;
7644+
u32 i;
7645+
u64 timestamp_ns;
76467646
struct drm_plane *plane;
76477647
struct drm_plane_state *old_plane_state, *new_plane_state;
76487648
struct amdgpu_crtc *acrtc_attach = to_amdgpu_crtc(pcrtc);
@@ -7653,7 +7653,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
76537653
to_dm_crtc_state(drm_atomic_get_old_crtc_state(state, pcrtc));
76547654
int planes_count = 0, vpos, hpos;
76557655
unsigned long flags;
7656-
uint32_t target_vblank, last_flip_vblank;
7656+
u32 target_vblank, last_flip_vblank;
76577657
bool vrr_active = amdgpu_dm_vrr_active(acrtc_state);
76587658
bool cursor_update = false;
76597659
bool pflip_present = false;
@@ -8102,7 +8102,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
81028102
struct amdgpu_display_manager *dm = &adev->dm;
81038103
struct dm_atomic_state *dm_state;
81048104
struct dc_state *dc_state = NULL, *dc_state_temp = NULL;
8105-
uint32_t i, j;
8105+
u32 i, j;
81068106
struct drm_crtc *crtc;
81078107
struct drm_crtc_state *old_crtc_state, *new_crtc_state;
81088108
unsigned long flags;
@@ -8732,7 +8732,7 @@ is_timing_unchanged_for_freesync(struct drm_crtc_state *old_crtc_state,
87328732
}
87338733

87348734
static void set_freesync_fixed_config(struct dm_crtc_state *dm_new_crtc_state) {
8735-
uint64_t num, den, res;
8735+
u64 num, den, res;
87368736
struct drm_crtc_state *new_crtc_state = &dm_new_crtc_state->base;
87378737

87388738
dm_new_crtc_state->freesync_config.state = VRR_STATE_ACTIVE_FIXED;
@@ -9908,7 +9908,7 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
99089908
static bool is_dp_capable_without_timing_msa(struct dc *dc,
99099909
struct amdgpu_dm_connector *amdgpu_dm_connector)
99109910
{
9911-
uint8_t dpcd_data;
9911+
u8 dpcd_data;
99129912
bool capable = false;
99139913

99149914
if (amdgpu_dm_connector->dc_link &&
@@ -9927,7 +9927,7 @@ static bool is_dp_capable_without_timing_msa(struct dc *dc,
99279927
static bool dm_edid_parser_send_cea(struct amdgpu_display_manager *dm,
99289928
unsigned int offset,
99299929
unsigned int total_length,
9930-
uint8_t *data,
9930+
u8 *data,
99319931
unsigned int length,
99329932
struct amdgpu_hdmi_vsdb_info *vsdb)
99339933
{
@@ -9982,7 +9982,7 @@ static bool dm_edid_parser_send_cea(struct amdgpu_display_manager *dm,
99829982
}
99839983

99849984
static bool parse_edid_cea_dmcu(struct amdgpu_display_manager *dm,
9985-
uint8_t *edid_ext, int len,
9985+
u8 *edid_ext, int len,
99869986
struct amdgpu_hdmi_vsdb_info *vsdb_info)
99879987
{
99889988
int i;
@@ -10023,7 +10023,7 @@ static bool parse_edid_cea_dmcu(struct amdgpu_display_manager *dm,
1002310023
}
1002410024

1002510025
static bool parse_edid_cea_dmub(struct amdgpu_display_manager *dm,
10026-
uint8_t *edid_ext, int len,
10026+
u8 *edid_ext, int len,
1002710027
struct amdgpu_hdmi_vsdb_info *vsdb_info)
1002810028
{
1002910029
int i;
@@ -10039,7 +10039,7 @@ static bool parse_edid_cea_dmub(struct amdgpu_display_manager *dm,
1003910039
}
1004010040

1004110041
static bool parse_edid_cea(struct amdgpu_dm_connector *aconnector,
10042-
uint8_t *edid_ext, int len,
10042+
u8 *edid_ext, int len,
1004310043
struct amdgpu_hdmi_vsdb_info *vsdb_info)
1004410044
{
1004510045
struct amdgpu_device *adev = drm_to_adev(aconnector->base.dev);
@@ -10053,7 +10053,7 @@ static bool parse_edid_cea(struct amdgpu_dm_connector *aconnector,
1005310053
static int parse_hdmi_amd_vsdb(struct amdgpu_dm_connector *aconnector,
1005410054
struct edid *edid, struct amdgpu_hdmi_vsdb_info *vsdb_info)
1005510055
{
10056-
uint8_t *edid_ext = NULL;
10056+
u8 *edid_ext = NULL;
1005710057
int i;
1005810058
bool valid_vsdb_found = false;
1005910059

@@ -10229,7 +10229,7 @@ void amdgpu_dm_trigger_timing_sync(struct drm_device *dev)
1022910229
}
1023010230

1023110231
void dm_write_reg_func(const struct dc_context *ctx, uint32_t address,
10232-
uint32_t value, const char *func_name)
10232+
u32 value, const char *func_name)
1023310233
{
1023410234
#ifdef DM_CHECK_ADDR_0
1023510235
if (address == 0) {
@@ -10244,7 +10244,7 @@ void dm_write_reg_func(const struct dc_context *ctx, uint32_t address,
1024410244
uint32_t dm_read_reg_func(const struct dc_context *ctx, uint32_t address,
1024510245
const char *func_name)
1024610246
{
10247-
uint32_t value;
10247+
u32 value;
1024810248
#ifdef DM_CHECK_ADDR_0
1024910249
if (address == 0) {
1025010250
DC_ERR("invalid register read; address = 0\n");

0 commit comments

Comments
 (0)