Skip to content

Commit

Permalink
Merge tag 'drm-intel-next-fixes-2020-05-20' of git://anongit.freedesk…
Browse files Browse the repository at this point in the history
…top.org/drm/drm-intel into drm-next

Fix for TypeC power domain toggling on resets (Cc: stable).
Two compile time warning fixes.

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200520123227.GA21104@jlahtine-desk.ger.corp.intel.com
  • Loading branch information
Dave Airlie committed May 21, 2020
2 parents e20bb85 + d96536f commit c41219f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
5 changes: 3 additions & 2 deletions drivers/gpu/drm/i915/display/intel_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1359,8 +1359,7 @@ intel_dp_aux_xfer(struct intel_dp *intel_dp,
bool is_tc_port = intel_phy_is_tc(i915, phy);
i915_reg_t ch_ctl, ch_data[5];
u32 aux_clock_divider;
enum intel_display_power_domain aux_domain =
intel_aux_power_domain(intel_dig_port);
enum intel_display_power_domain aux_domain;
intel_wakeref_t aux_wakeref;
intel_wakeref_t pps_wakeref;
int i, ret, recv_bytes;
Expand All @@ -1375,6 +1374,8 @@ intel_dp_aux_xfer(struct intel_dp *intel_dp,
if (is_tc_port)
intel_tc_port_lock(intel_dig_port);

aux_domain = intel_aux_power_domain(intel_dig_port);

aux_wakeref = intel_display_power_get(i915, aux_domain);
pps_wakeref = pps_lock(intel_dp);

Expand Down
20 changes: 10 additions & 10 deletions drivers/gpu/drm/i915/display/intel_panel.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,16 +489,6 @@ static u32 scale(u32 source_val,
return target_val;
}

/* Scale user_level in range [0..user_max] to [hw_min..hw_max]. */
static u32 scale_user_to_hw(struct intel_connector *connector,
u32 user_level, u32 user_max)
{
struct intel_panel *panel = &connector->panel;

return scale(user_level, 0, user_max,
panel->backlight.min, panel->backlight.max);
}

/* Scale user_level in range [0..user_max] to [0..hw_max], clamping the result
* to [hw_min..hw_max]. */
static u32 clamp_user_to_hw(struct intel_connector *connector,
Expand Down Expand Up @@ -1255,6 +1245,16 @@ static u32 intel_panel_get_backlight(struct intel_connector *connector)
return val;
}

/* Scale user_level in range [0..user_max] to [hw_min..hw_max]. */
static u32 scale_user_to_hw(struct intel_connector *connector,
u32 user_level, u32 user_max)
{
struct intel_panel *panel = &connector->panel;

return scale(user_level, 0, user_max,
panel->backlight.min, panel->backlight.max);
}

/* set backlight brightness to level in range [0..max], scaling wrt hw min */
static void intel_panel_set_backlight(const struct drm_connector_state *conn_state,
u32 user_level, u32 user_max)
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/gvt/scheduler.c
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,7 @@ static void update_guest_pdps(struct intel_vgpu *vgpu,
gpa + i * 8, &pdp[7 - i], 4);
}

static bool
static __maybe_unused bool
check_shadow_context_ppgtt(struct execlist_ring_context *c, struct intel_vgpu_mm *m)
{
if (m->ppgtt_mm.root_entry_type == GTT_TYPE_PPGTT_ROOT_L4_ENTRY) {
Expand Down

0 comments on commit c41219f

Please sign in to comment.