Commit 830de422 authored by Jani Nikula's avatar Jani Nikula

drm/i915/dp: switch to kernel types

Mixed C99 and kernel types use is getting ugly. Prefer kernel types.

sed -i 's/\buint\(8\|16\|32\|64\)_t\b/u\1/g'

Minor checkpatch/whitespace fixes sprinkled on top of the changed lines.
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/3c030a12b4313eec512ce2b7a953cff439d8af67.1547629303.git.jani.nikula@intel.com
parent 990290d1
This diff is collapsed.
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include "intel_drv.h" #include "intel_drv.h"
static void static void
intel_dp_dump_link_status(const uint8_t link_status[DP_LINK_STATUS_SIZE]) intel_dp_dump_link_status(const u8 link_status[DP_LINK_STATUS_SIZE])
{ {
DRM_DEBUG_KMS("ln0_1:0x%x ln2_3:0x%x align:0x%x sink:0x%x adj_req0_1:0x%x adj_req2_3:0x%x", DRM_DEBUG_KMS("ln0_1:0x%x ln2_3:0x%x align:0x%x sink:0x%x adj_req0_1:0x%x adj_req2_3:0x%x",
...@@ -34,17 +34,17 @@ intel_dp_dump_link_status(const uint8_t link_status[DP_LINK_STATUS_SIZE]) ...@@ -34,17 +34,17 @@ intel_dp_dump_link_status(const uint8_t link_status[DP_LINK_STATUS_SIZE])
static void static void
intel_get_adjust_train(struct intel_dp *intel_dp, intel_get_adjust_train(struct intel_dp *intel_dp,
const uint8_t link_status[DP_LINK_STATUS_SIZE]) const u8 link_status[DP_LINK_STATUS_SIZE])
{ {
uint8_t v = 0; u8 v = 0;
uint8_t p = 0; u8 p = 0;
int lane; int lane;
uint8_t voltage_max; u8 voltage_max;
uint8_t preemph_max; u8 preemph_max;
for (lane = 0; lane < intel_dp->lane_count; lane++) { for (lane = 0; lane < intel_dp->lane_count; lane++) {
uint8_t this_v = drm_dp_get_adjust_request_voltage(link_status, lane); u8 this_v = drm_dp_get_adjust_request_voltage(link_status, lane);
uint8_t this_p = drm_dp_get_adjust_request_pre_emphasis(link_status, lane); u8 this_p = drm_dp_get_adjust_request_pre_emphasis(link_status, lane);
if (this_v > v) if (this_v > v)
v = this_v; v = this_v;
...@@ -66,9 +66,9 @@ intel_get_adjust_train(struct intel_dp *intel_dp, ...@@ -66,9 +66,9 @@ intel_get_adjust_train(struct intel_dp *intel_dp,
static bool static bool
intel_dp_set_link_train(struct intel_dp *intel_dp, intel_dp_set_link_train(struct intel_dp *intel_dp,
uint8_t dp_train_pat) u8 dp_train_pat)
{ {
uint8_t buf[sizeof(intel_dp->train_set) + 1]; u8 buf[sizeof(intel_dp->train_set) + 1];
int ret, len; int ret, len;
intel_dp_program_link_training_pattern(intel_dp, dp_train_pat); intel_dp_program_link_training_pattern(intel_dp, dp_train_pat);
...@@ -92,7 +92,7 @@ intel_dp_set_link_train(struct intel_dp *intel_dp, ...@@ -92,7 +92,7 @@ intel_dp_set_link_train(struct intel_dp *intel_dp,
static bool static bool
intel_dp_reset_link_train(struct intel_dp *intel_dp, intel_dp_reset_link_train(struct intel_dp *intel_dp,
uint8_t dp_train_pat) u8 dp_train_pat)
{ {
memset(intel_dp->train_set, 0, sizeof(intel_dp->train_set)); memset(intel_dp->train_set, 0, sizeof(intel_dp->train_set));
intel_dp_set_signal_levels(intel_dp); intel_dp_set_signal_levels(intel_dp);
...@@ -128,11 +128,11 @@ static bool intel_dp_link_max_vswing_reached(struct intel_dp *intel_dp) ...@@ -128,11 +128,11 @@ static bool intel_dp_link_max_vswing_reached(struct intel_dp *intel_dp)
static bool static bool
intel_dp_link_training_clock_recovery(struct intel_dp *intel_dp) intel_dp_link_training_clock_recovery(struct intel_dp *intel_dp)
{ {
uint8_t voltage; u8 voltage;
int voltage_tries, cr_tries, max_cr_tries; int voltage_tries, cr_tries, max_cr_tries;
bool max_vswing_reached = false; bool max_vswing_reached = false;
uint8_t link_config[2]; u8 link_config[2];
uint8_t link_bw, rate_select; u8 link_bw, rate_select;
if (intel_dp->prepare_link_retrain) if (intel_dp->prepare_link_retrain)
intel_dp->prepare_link_retrain(intel_dp); intel_dp->prepare_link_retrain(intel_dp);
...@@ -186,7 +186,7 @@ intel_dp_link_training_clock_recovery(struct intel_dp *intel_dp) ...@@ -186,7 +186,7 @@ intel_dp_link_training_clock_recovery(struct intel_dp *intel_dp)
voltage_tries = 1; voltage_tries = 1;
for (cr_tries = 0; cr_tries < max_cr_tries; ++cr_tries) { for (cr_tries = 0; cr_tries < max_cr_tries; ++cr_tries) {
uint8_t link_status[DP_LINK_STATUS_SIZE]; u8 link_status[DP_LINK_STATUS_SIZE];
drm_dp_link_train_clock_recovery_delay(intel_dp->dpcd); drm_dp_link_train_clock_recovery_delay(intel_dp->dpcd);
...@@ -282,7 +282,7 @@ intel_dp_link_training_channel_equalization(struct intel_dp *intel_dp) ...@@ -282,7 +282,7 @@ intel_dp_link_training_channel_equalization(struct intel_dp *intel_dp)
{ {
int tries; int tries;
u32 training_pattern; u32 training_pattern;
uint8_t link_status[DP_LINK_STATUS_SIZE]; u8 link_status[DP_LINK_STATUS_SIZE];
bool channel_eq = false; bool channel_eq = false;
training_pattern = intel_dp_training_pattern(intel_dp); training_pattern = intel_dp_training_pattern(intel_dp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment