Skip to content

Commit 65a3882

Browse files
committed
Merge tag 'drm-intel-fixes-2022-12-01' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
- Fix dram info readout (Radhakrishna Sripada) - Remove non-existent pipes from bigjoiner pipe mask (Ville Syrjälä) - Fix negative value passed as remaining time (Janusz Krzysztofik) - Never return 0 if not all requests retired (Janusz Krzysztofik) Signed-off-by: Dave Airlie <[email protected]> From: Tvrtko Ursulin <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/Y4hp+a3TJ13t2ZA1@tursulin-desk
2 parents b7b275e + 12b8b04 commit 65a3882

File tree

4 files changed

+16
-8
lines changed

4 files changed

+16
-8
lines changed

drivers/gpu/drm/i915/display/intel_display.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3723,12 +3723,16 @@ static bool ilk_get_pipe_config(struct intel_crtc *crtc,
37233723

37243724
static u8 bigjoiner_pipes(struct drm_i915_private *i915)
37253725
{
3726+
u8 pipes;
3727+
37263728
if (DISPLAY_VER(i915) >= 12)
3727-
return BIT(PIPE_A) | BIT(PIPE_B) | BIT(PIPE_C) | BIT(PIPE_D);
3729+
pipes = BIT(PIPE_A) | BIT(PIPE_B) | BIT(PIPE_C) | BIT(PIPE_D);
37283730
else if (DISPLAY_VER(i915) >= 11)
3729-
return BIT(PIPE_B) | BIT(PIPE_C);
3731+
pipes = BIT(PIPE_B) | BIT(PIPE_C);
37303732
else
3731-
return 0;
3733+
pipes = 0;
3734+
3735+
return pipes & RUNTIME_INFO(i915)->pipe_mask;
37323736
}
37333737

37343738
static bool transcoder_ddi_func_is_enabled(struct drm_i915_private *dev_priv,

drivers/gpu/drm/i915/gt/intel_gt.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -625,8 +625,13 @@ int intel_gt_wait_for_idle(struct intel_gt *gt, long timeout)
625625
return -EINTR;
626626
}
627627

628-
return timeout ? timeout : intel_uc_wait_for_idle(&gt->uc,
629-
remaining_timeout);
628+
if (timeout)
629+
return timeout;
630+
631+
if (remaining_timeout < 0)
632+
remaining_timeout = 0;
633+
634+
return intel_uc_wait_for_idle(&gt->uc, remaining_timeout);
630635
}
631636

632637
int intel_gt_init(struct intel_gt *gt)

drivers/gpu/drm/i915/gt/intel_gt_requests.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ out_active: spin_lock(&timelines->lock);
199199
if (remaining_timeout)
200200
*remaining_timeout = timeout;
201201

202-
return active_count ? timeout : 0;
202+
return active_count ? timeout ?: -ETIME : 0;
203203
}
204204

205205
static void retire_work_handler(struct work_struct *work)

drivers/gpu/drm/i915/intel_dram.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,8 +471,7 @@ static int xelpdp_get_dram_info(struct drm_i915_private *i915)
471471
u32 val = intel_uncore_read(&i915->uncore, MTL_MEM_SS_INFO_GLOBAL);
472472
struct dram_info *dram_info = &i915->dram_info;
473473

474-
val = REG_FIELD_GET(MTL_DDR_TYPE_MASK, val);
475-
switch (val) {
474+
switch (REG_FIELD_GET(MTL_DDR_TYPE_MASK, val)) {
476475
case 0:
477476
dram_info->type = INTEL_DRAM_DDR4;
478477
break;

0 commit comments

Comments
 (0)