Skip to content

Commit 8893a6b

Browse files
committed
Merge tag 'drm-next-2024-01-15-1' of git://anongit.freedesktop.org/drm/drm
Pull drm fixes from Dave Airlie: "This is just a wrap up of fixes from the last few days. It has the proper fix to the i915/xe collision, we can clean up what you did later once rc1 lands. Otherwise it's a few other i915, a v3d, rockchip and a nouveau fix to make GSP load on some original Turing GPUs. i915: - Fixes for kernel-doc warnings enforced in linux-next - Another build warning fix for string formatting of intel_wakeref_t - Display fixes for DP DSC BPC and C20 PLL state verification v3d: - register readout fix rockchip: - two build warning fixes nouveau: - fix GSP loading on Turing with different nvdec configuration" * tag 'drm-next-2024-01-15-1' of git://anongit.freedesktop.org/drm/drm: nouveau/gsp: handle engines in runl without nonstall interrupts. drm/i915/perf: reconcile Excess struct member kernel-doc warnings drm/i915/guc: reconcile Excess struct member kernel-doc warnings drm/i915/gt: reconcile Excess struct member kernel-doc warnings drm/i915/gem: reconcile Excess struct member kernel-doc warnings drm/i915/dp: Fix the max DSC bpc supported by source drm/i915: don't make assumptions about intel_wakeref_t type drm/i915/dp: Fix the PSR debugfs entries wrt. MST connectors drm/i915/display: Fix C20 pll selection for state verification drm/v3d: Fix support for register debugging on the RPi 4 drm/rockchip: vop2: Drop unused if_dclk_rate variable drm/rockchip: vop2: Drop superfluous include
2 parents d8e6ba0 + 205e18c commit 8893a6b

File tree

13 files changed

+96
-78
lines changed

13 files changed

+96
-78
lines changed

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

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3067,24 +3067,29 @@ static void intel_c20pll_state_verify(const struct intel_crtc_state *state,
30673067
{
30683068
struct drm_i915_private *i915 = to_i915(crtc->base.dev);
30693069
const struct intel_c20pll_state *mpll_sw_state = &state->cx0pll_state.c20;
3070-
bool use_mplla;
3070+
bool sw_use_mpllb = mpll_sw_state->tx[0] & C20_PHY_USE_MPLLB;
3071+
bool hw_use_mpllb = mpll_hw_state->tx[0] & C20_PHY_USE_MPLLB;
30713072
int i;
30723073

3073-
use_mplla = intel_c20_use_mplla(mpll_hw_state->clock);
3074-
if (use_mplla) {
3075-
for (i = 0; i < ARRAY_SIZE(mpll_sw_state->mplla); i++) {
3076-
I915_STATE_WARN(i915, mpll_hw_state->mplla[i] != mpll_sw_state->mplla[i],
3077-
"[CRTC:%d:%s] mismatch in C20MPLLA: Register[%d] (expected 0x%04x, found 0x%04x)",
3078-
crtc->base.base.id, crtc->base.name, i,
3079-
mpll_sw_state->mplla[i], mpll_hw_state->mplla[i]);
3080-
}
3081-
} else {
3074+
I915_STATE_WARN(i915, sw_use_mpllb != hw_use_mpllb,
3075+
"[CRTC:%d:%s] mismatch in C20: Register MPLLB selection (expected %d, found %d)",
3076+
crtc->base.base.id, crtc->base.name,
3077+
sw_use_mpllb, hw_use_mpllb);
3078+
3079+
if (hw_use_mpllb) {
30823080
for (i = 0; i < ARRAY_SIZE(mpll_sw_state->mpllb); i++) {
30833081
I915_STATE_WARN(i915, mpll_hw_state->mpllb[i] != mpll_sw_state->mpllb[i],
30843082
"[CRTC:%d:%s] mismatch in C20MPLLB: Register[%d] (expected 0x%04x, found 0x%04x)",
30853083
crtc->base.base.id, crtc->base.name, i,
30863084
mpll_sw_state->mpllb[i], mpll_hw_state->mpllb[i]);
30873085
}
3086+
} else {
3087+
for (i = 0; i < ARRAY_SIZE(mpll_sw_state->mplla); i++) {
3088+
I915_STATE_WARN(i915, mpll_hw_state->mplla[i] != mpll_sw_state->mplla[i],
3089+
"[CRTC:%d:%s] mismatch in C20MPLLA: Register[%d] (expected 0x%04x, found 0x%04x)",
3090+
crtc->base.base.id, crtc->base.name, i,
3091+
mpll_sw_state->mplla[i], mpll_hw_state->mplla[i]);
3092+
}
30883093
}
30893094

30903095
for (i = 0; i < ARRAY_SIZE(mpll_sw_state->tx); i++) {

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,8 @@ print_async_put_domains_state(struct i915_power_domains *power_domains)
405405
struct drm_i915_private,
406406
display.power.domains);
407407

408-
drm_dbg(&i915->drm, "async_put_wakeref %lu\n",
409-
power_domains->async_put_wakeref);
408+
drm_dbg(&i915->drm, "async_put_wakeref: %s\n",
409+
str_yes_no(power_domains->async_put_wakeref));
410410

411411
print_power_domains(power_domains, "async_put_domains[0]",
412412
&power_domains->async_put_domains[0]);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2101,7 +2101,7 @@ static int intel_dp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,
21012101
}
21022102
}
21032103

2104-
dsc_max_bpc = intel_dp_dsc_min_src_input_bpc(i915);
2104+
dsc_max_bpc = intel_dp_dsc_max_src_input_bpc(i915);
21052105
if (!dsc_max_bpc)
21062106
return -EINVAL;
21072107

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3319,11 +3319,11 @@ void intel_psr_connector_debugfs_add(struct intel_connector *connector)
33193319
struct drm_i915_private *i915 = to_i915(connector->base.dev);
33203320
struct dentry *root = connector->base.debugfs_entry;
33213321

3322-
if (connector->base.connector_type != DRM_MODE_CONNECTOR_eDP) {
3323-
if (!(HAS_DP20(i915) &&
3324-
connector->base.connector_type == DRM_MODE_CONNECTOR_DisplayPort))
3325-
return;
3326-
}
3322+
/* TODO: Add support for MST connectors as well. */
3323+
if ((connector->base.connector_type != DRM_MODE_CONNECTOR_eDP &&
3324+
connector->base.connector_type != DRM_MODE_CONNECTOR_DisplayPort) ||
3325+
connector->mst_port)
3326+
return;
33273327

33283328
debugfs_create_file("i915_psr_sink_status", 0444, root,
33293329
connector, &i915_psr_sink_status_fops);

drivers/gpu/drm/i915/gem/i915_gem_context_types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,9 +412,9 @@ struct i915_gem_context {
412412

413413
/** @stale: tracks stale engines to be destroyed */
414414
struct {
415-
/** @lock: guards engines */
415+
/** @stale.lock: guards engines */
416416
spinlock_t lock;
417-
/** @engines: list of stale engines */
417+
/** @stale.engines: list of stale engines */
418418
struct list_head engines;
419419
} stale;
420420
};

drivers/gpu/drm/i915/gt/intel_gsc.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,11 @@ struct mei_aux_device;
2121
/**
2222
* struct intel_gsc - graphics security controller
2323
*
24-
* @gem_obj: scratch memory GSC operations
25-
* @intf : gsc interface
24+
* @intf: gsc interface
25+
* @intf.adev: MEI aux. device for this @intf
26+
* @intf.gem_obj: scratch memory GSC operations
27+
* @intf.irq: IRQ for this device (%-1 for no IRQ)
28+
* @intf.id: this interface's id number/index
2629
*/
2730
struct intel_gsc {
2831
struct intel_gsc_intf {

drivers/gpu/drm/i915/gt/uc/intel_guc.h

Lines changed: 42 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -105,61 +105,67 @@ struct intel_guc {
105105
*/
106106
struct {
107107
/**
108-
* @lock: protects everything in submission_state,
109-
* ce->guc_id.id, and ce->guc_id.ref when transitioning in and
110-
* out of zero
108+
* @submission_state.lock: protects everything in
109+
* submission_state, ce->guc_id.id, and ce->guc_id.ref
110+
* when transitioning in and out of zero
111111
*/
112112
spinlock_t lock;
113113
/**
114-
* @guc_ids: used to allocate new guc_ids, single-lrc
114+
* @submission_state.guc_ids: used to allocate new
115+
* guc_ids, single-lrc
115116
*/
116117
struct ida guc_ids;
117118
/**
118-
* @num_guc_ids: Number of guc_ids, selftest feature to be able
119-
* to reduce this number while testing.
119+
* @submission_state.num_guc_ids: Number of guc_ids, selftest
120+
* feature to be able to reduce this number while testing.
120121
*/
121122
int num_guc_ids;
122123
/**
123-
* @guc_ids_bitmap: used to allocate new guc_ids, multi-lrc
124+
* @submission_state.guc_ids_bitmap: used to allocate
125+
* new guc_ids, multi-lrc
124126
*/
125127
unsigned long *guc_ids_bitmap;
126128
/**
127-
* @guc_id_list: list of intel_context with valid guc_ids but no
128-
* refs
129+
* @submission_state.guc_id_list: list of intel_context
130+
* with valid guc_ids but no refs
129131
*/
130132
struct list_head guc_id_list;
131133
/**
132-
* @guc_ids_in_use: Number single-lrc guc_ids in use
134+
* @submission_state.guc_ids_in_use: Number single-lrc
135+
* guc_ids in use
133136
*/
134137
unsigned int guc_ids_in_use;
135138
/**
136-
* @destroyed_contexts: list of contexts waiting to be destroyed
137-
* (deregistered with the GuC)
139+
* @submission_state.destroyed_contexts: list of contexts
140+
* waiting to be destroyed (deregistered with the GuC)
138141
*/
139142
struct list_head destroyed_contexts;
140143
/**
141-
* @destroyed_worker: worker to deregister contexts, need as we
142-
* need to take a GT PM reference and can't from destroy
143-
* function as it might be in an atomic context (no sleeping)
144+
* @submission_state.destroyed_worker: worker to deregister
145+
* contexts, need as we need to take a GT PM reference and
146+
* can't from destroy function as it might be in an atomic
147+
* context (no sleeping)
144148
*/
145149
struct work_struct destroyed_worker;
146150
/**
147-
* @reset_fail_worker: worker to trigger a GT reset after an
148-
* engine reset fails
151+
* @submission_state.reset_fail_worker: worker to trigger
152+
* a GT reset after an engine reset fails
149153
*/
150154
struct work_struct reset_fail_worker;
151155
/**
152-
* @reset_fail_mask: mask of engines that failed to reset
156+
* @submission_state.reset_fail_mask: mask of engines that
157+
* failed to reset
153158
*/
154159
intel_engine_mask_t reset_fail_mask;
155160
/**
156-
* @sched_disable_delay_ms: schedule disable delay, in ms, for
157-
* contexts
161+
* @submission_state.sched_disable_delay_ms: schedule
162+
* disable delay, in ms, for contexts
158163
*/
159164
unsigned int sched_disable_delay_ms;
160165
/**
161-
* @sched_disable_gucid_threshold: threshold of min remaining available
162-
* guc_ids before we start bypassing the schedule disable delay
166+
* @submission_state.sched_disable_gucid_threshold:
167+
* threshold of min remaining available guc_ids before
168+
* we start bypassing the schedule disable delay
163169
*/
164170
unsigned int sched_disable_gucid_threshold;
165171
} submission_state;
@@ -243,37 +249,40 @@ struct intel_guc {
243249
*/
244250
struct {
245251
/**
246-
* @lock: Lock protecting the below fields and the engine stats.
252+
* @timestamp.lock: Lock protecting the below fields and
253+
* the engine stats.
247254
*/
248255
spinlock_t lock;
249256

250257
/**
251-
* @gt_stamp: 64 bit extended value of the GT timestamp.
258+
* @timestamp.gt_stamp: 64-bit extended value of the GT
259+
* timestamp.
252260
*/
253261
u64 gt_stamp;
254262

255263
/**
256-
* @ping_delay: Period for polling the GT timestamp for
257-
* overflow.
264+
* @timestamp.ping_delay: Period for polling the GT
265+
* timestamp for overflow.
258266
*/
259267
unsigned long ping_delay;
260268

261269
/**
262-
* @work: Periodic work to adjust GT timestamp, engine and
263-
* context usage for overflows.
270+
* @timestamp.work: Periodic work to adjust GT timestamp,
271+
* engine and context usage for overflows.
264272
*/
265273
struct delayed_work work;
266274

267275
/**
268-
* @shift: Right shift value for the gpm timestamp
276+
* @timestamp.shift: Right shift value for the gpm timestamp
269277
*/
270278
u32 shift;
271279

272280
/**
273-
* @last_stat_jiffies: jiffies at last actual stats collection time
274-
* We use this timestamp to ensure we don't oversample the
275-
* stats because runtime power management events can trigger
276-
* stats collection at much higher rates than required.
281+
* @timestamp.last_stat_jiffies: jiffies at last actual
282+
* stats collection time. We use this timestamp to ensure
283+
* we don't oversample the stats because runtime power
284+
* management events can trigger stats collection at much
285+
* higher rates than required.
277286
*/
278287
unsigned long last_stat_jiffies;
279288
} timestamp;

drivers/gpu/drm/i915/i915_perf_types.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,8 @@ struct i915_perf_stream {
291291
int size_exponent;
292292

293293
/**
294-
* @ptr_lock: Locks reads and writes to all head/tail state
294+
* @oa_buffer.ptr_lock: Locks reads and writes to all
295+
* head/tail state
295296
*
296297
* Consider: the head and tail pointer state needs to be read
297298
* consistently from a hrtimer callback (atomic context) and
@@ -313,7 +314,8 @@ struct i915_perf_stream {
313314
spinlock_t ptr_lock;
314315

315316
/**
316-
* @head: Although we can always read back the head pointer register,
317+
* @oa_buffer.head: Although we can always read back
318+
* the head pointer register,
317319
* we prefer to avoid trusting the HW state, just to avoid any
318320
* risk that some hardware condition could * somehow bump the
319321
* head pointer unpredictably and cause us to forward the wrong
@@ -322,7 +324,8 @@ struct i915_perf_stream {
322324
u32 head;
323325

324326
/**
325-
* @tail: The last verified tail that can be read by userspace.
327+
* @oa_buffer.tail: The last verified tail that can be
328+
* read by userspace.
326329
*/
327330
u32 tail;
328331
} oa_buffer;

drivers/gpu/drm/nouveau/nvkm/engine/fifo/ga100.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,10 @@ ga100_fifo_nonstall_ctor(struct nvkm_fifo *fifo)
550550
struct nvkm_engn *engn = list_first_entry(&runl->engns, typeof(*engn), head);
551551

552552
runl->nonstall.vector = engn->func->nonstall(engn);
553+
554+
/* if no nonstall vector just keep going */
555+
if (runl->nonstall.vector == -1)
556+
continue;
553557
if (runl->nonstall.vector < 0) {
554558
RUNL_ERROR(runl, "nonstall %d", runl->nonstall.vector);
555559
return runl->nonstall.vector;

drivers/gpu/drm/nouveau/nvkm/engine/fifo/r535.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ r535_engn_nonstall(struct nvkm_engn *engn)
351351
int ret;
352352

353353
ret = nvkm_gsp_intr_nonstall(subdev->device->gsp, subdev->type, subdev->inst);
354-
WARN_ON(ret < 0);
354+
WARN_ON(ret == -ENOENT);
355355
return ret;
356356
}
357357

0 commit comments

Comments
 (0)