Skip to content

Commit

Permalink
drm/i915/dp: remove static variable for aux last status
Browse files Browse the repository at this point in the history
Add aux_busy_last_status to intel_dp. Don't bother with initializing to
all ones; the only difference is potentially missing logging for one
error case if the readout is all zeros.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191002144138.7917-1-jani.nikula@intel.com
  • Loading branch information
Jani Nikula committed Oct 4, 2019
1 parent 44d0a9c commit 81cdeca
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/i915/display/intel_display_types.h
Original file line number Diff line number Diff line change
@@ -1185,6 +1185,7 @@ struct intel_dp {
/* sink or branch descriptor */
struct drm_dp_desc desc;
struct drm_dp_aux aux;
u32 aux_busy_last_status;
u8 train_set[4];
int panel_power_up_delay;
int panel_power_down_delay;
5 changes: 2 additions & 3 deletions drivers/gpu/drm/i915/display/intel_dp.c
Original file line number Diff line number Diff line change
@@ -1347,13 +1347,12 @@ intel_dp_aux_xfer(struct intel_dp *intel_dp,
trace_i915_reg_rw(false, ch_ctl, status, sizeof(status), true);

if (try == 3) {
static u32 last_status = -1;
const u32 status = intel_uncore_read(uncore, ch_ctl);

if (status != last_status) {
if (status != intel_dp->aux_busy_last_status) {
WARN(1, "dp_aux_ch not started status 0x%08x\n",
status);
last_status = status;
intel_dp->aux_busy_last_status = status;
}

ret = -EBUSY;

0 comments on commit 81cdeca

Please sign in to comment.