Skip to content

Commit 89103a1

Browse files
committed
Merge tag 'drm-fixes-2024-04-05' of https://gitlab.freedesktop.org/drm/kernel
Pull drm fixes from Dave Airlie: "Weekly fixes, mostly xe and i915, amdgpu on a week off, otherwise a nouveau fix for a crash with new vulkan cts tests, and a couple of cleanups and misc fixes. display: - fix typos in kerneldoc prime: - unbreak dma-buf export for virt-gpu nouveau: - uvmm: fix remap address calculation - minor cleanups panfrost: - fix power-transition timeouts xe: - Stop using system_unbound_wq for preempt fences - Fix saving unordered rebinding fences by attaching them as kernel feces to the vm's resv - Fix TLB invalidation fences completing out of order - Move rebind TLB invalidation to the ring ops to reduce the latency i915: - A few DisplayPort related fixes - eDP PSR fixes - Remove some VM space restrictions on older platforms - Disable automatic load CCS load balancing" * tag 'drm-fixes-2024-04-05' of https://gitlab.freedesktop.org/drm/kernel: (22 commits) drm/xe: Use ordered wq for preempt fence waiting drm/xe: Move vma rebinding to the drm_exec locking loop drm/xe: Make TLB invalidation fences unordered drm/xe: Rework rebinding drm/xe: Use ring ops TLB invalidation for rebinds drm/i915/mst: Reject FEC+MST on ICL drm/i915/mst: Limit MST+DSC to TGL+ drm/i915/dp: Fix the computation for compressed_bpp for DISPLAY < 13 drm/i915/gt: Enable only one CCS for compute workload drm/i915/gt: Do not generate the command streamer for all the CCS drm/i915/gt: Disable HW load balancing for CCS drm/i915/gt: Limit the reserved VM space to only the platforms that need it drm/i915/psr: Fix intel_psr2_sel_fetch_et_alignment usage drm/i915/psr: Move writing early transport pipe src drm/i915/psr: Calculate PIPE_SRCSZ_ERLY_TPT value drm/i915/dp: Remove support for UHBR13.5 drm/i915/dp: Fix DSC state HW readout for SST connectors drm/display: fix typo drm/prime: Unbreak virtgpu dma-buf export nouveau/uvmm: fix addr/range calcs for remap operations ...
2 parents e8b0ccb + 4c85957 commit 89103a1

35 files changed

+340
-197
lines changed

drivers/gpu/drm/display/drm_dp_dual_mode_helper.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
* @adapter: I2C adapter for the DDC bus
5353
* @offset: register offset
5454
* @buffer: buffer for return data
55-
* @size: sizo of the buffer
55+
* @size: size of the buffer
5656
*
5757
* Reads @size bytes from the DP dual mode adaptor registers
5858
* starting at @offset.
@@ -116,7 +116,7 @@ EXPORT_SYMBOL(drm_dp_dual_mode_read);
116116
* @adapter: I2C adapter for the DDC bus
117117
* @offset: register offset
118118
* @buffer: buffer for write data
119-
* @size: sizo of the buffer
119+
* @size: size of the buffer
120120
*
121121
* Writes @size bytes to the DP dual mode adaptor registers
122122
* starting at @offset.

drivers/gpu/drm/drm_prime.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,12 @@ int drm_gem_map_attach(struct dma_buf *dma_buf,
582582
{
583583
struct drm_gem_object *obj = dma_buf->priv;
584584

585-
if (!obj->funcs->get_sg_table)
585+
/*
586+
* drm_gem_map_dma_buf() requires obj->get_sg_table(), but drivers
587+
* that implement their own ->map_dma_buf() do not.
588+
*/
589+
if (dma_buf->ops->map_dma_buf == drm_gem_map_dma_buf &&
590+
!obj->funcs->get_sg_table)
586591
return -ENOSYS;
587592

588593
return drm_gem_pin(obj);

drivers/gpu/drm/i915/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ gt-y += \
118118
gt/intel_ggtt_fencing.o \
119119
gt/intel_gt.o \
120120
gt/intel_gt_buffer_pool.o \
121+
gt/intel_gt_ccs_mode.o \
121122
gt/intel_gt_clock_utils.o \
122123
gt/intel_gt_debugfs.o \
123124
gt/intel_gt_engines_debugfs.o \

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2709,15 +2709,6 @@ static void intel_set_pipe_src_size(const struct intel_crtc_state *crtc_state)
27092709
*/
27102710
intel_de_write(dev_priv, PIPESRC(pipe),
27112711
PIPESRC_WIDTH(width - 1) | PIPESRC_HEIGHT(height - 1));
2712-
2713-
if (!crtc_state->enable_psr2_su_region_et)
2714-
return;
2715-
2716-
width = drm_rect_width(&crtc_state->psr2_su_area);
2717-
height = drm_rect_height(&crtc_state->psr2_su_area);
2718-
2719-
intel_de_write(dev_priv, PIPE_SRCSZ_ERLY_TPT(pipe),
2720-
PIPESRC_WIDTH(width - 1) | PIPESRC_HEIGHT(height - 1));
27212712
}
27222713

27232714
static bool intel_pipe_is_interlaced(const struct intel_crtc_state *crtc_state)

drivers/gpu/drm/i915/display/intel_display_device.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ struct drm_printer;
4747
#define HAS_DPT(i915) (DISPLAY_VER(i915) >= 13)
4848
#define HAS_DSB(i915) (DISPLAY_INFO(i915)->has_dsb)
4949
#define HAS_DSC(__i915) (DISPLAY_RUNTIME_INFO(__i915)->has_dsc)
50+
#define HAS_DSC_MST(__i915) (DISPLAY_VER(__i915) >= 12 && HAS_DSC(__i915))
5051
#define HAS_FBC(i915) (DISPLAY_RUNTIME_INFO(i915)->fbc_mask != 0)
5152
#define HAS_FPGA_DBG_UNCLAIMED(i915) (DISPLAY_INFO(i915)->has_fpga_dbg)
5253
#define HAS_FW_BLC(i915) (DISPLAY_VER(i915) >= 3)

drivers/gpu/drm/i915/display/intel_display_types.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1423,6 +1423,8 @@ struct intel_crtc_state {
14231423

14241424
u32 psr2_man_track_ctl;
14251425

1426+
u32 pipe_srcsz_early_tpt;
1427+
14261428
struct drm_rect psr2_su_area;
14271429

14281430
/* Variable Refresh Rate state */

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ intel_dp_set_source_rates(struct intel_dp *intel_dp)
499499
/* The values must be in increasing order */
500500
static const int mtl_rates[] = {
501501
162000, 216000, 243000, 270000, 324000, 432000, 540000, 675000,
502-
810000, 1000000, 1350000, 2000000,
502+
810000, 1000000, 2000000,
503503
};
504504
static const int icl_rates[] = {
505505
162000, 216000, 270000, 324000, 432000, 540000, 648000, 810000,
@@ -1422,7 +1422,8 @@ static bool intel_dp_source_supports_fec(struct intel_dp *intel_dp,
14221422
if (DISPLAY_VER(dev_priv) >= 12)
14231423
return true;
14241424

1425-
if (DISPLAY_VER(dev_priv) == 11 && encoder->port != PORT_A)
1425+
if (DISPLAY_VER(dev_priv) == 11 && encoder->port != PORT_A &&
1426+
!intel_crtc_has_type(pipe_config, INTEL_OUTPUT_DP_MST))
14261427
return true;
14271428

14281429
return false;
@@ -1917,8 +1918,9 @@ icl_dsc_compute_link_config(struct intel_dp *intel_dp,
19171918
dsc_max_bpp = min(dsc_max_bpp, pipe_bpp - 1);
19181919

19191920
for (i = 0; i < ARRAY_SIZE(valid_dsc_bpp); i++) {
1920-
if (valid_dsc_bpp[i] < dsc_min_bpp ||
1921-
valid_dsc_bpp[i] > dsc_max_bpp)
1921+
if (valid_dsc_bpp[i] < dsc_min_bpp)
1922+
continue;
1923+
if (valid_dsc_bpp[i] > dsc_max_bpp)
19221924
break;
19231925

19241926
ret = dsc_compute_link_config(intel_dp,
@@ -6557,6 +6559,7 @@ intel_dp_init_connector(struct intel_digital_port *dig_port,
65576559
intel_connector->get_hw_state = intel_ddi_connector_get_hw_state;
65586560
else
65596561
intel_connector->get_hw_state = intel_connector_get_hw_state;
6562+
intel_connector->sync_state = intel_dp_connector_sync_state;
65606563

65616564
if (!intel_edp_init_connector(intel_dp, intel_connector)) {
65626565
intel_dp_aux_fini(intel_dp);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1355,7 +1355,7 @@ intel_dp_mst_mode_valid_ctx(struct drm_connector *connector,
13551355
return 0;
13561356
}
13571357

1358-
if (DISPLAY_VER(dev_priv) >= 10 &&
1358+
if (HAS_DSC_MST(dev_priv) &&
13591359
drm_dp_sink_supports_dsc(intel_connector->dp.dsc_dpcd)) {
13601360
/*
13611361
* TBD pass the connector BPC,

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

Lines changed: 56 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1994,6 +1994,7 @@ static void psr_force_hw_tracking_exit(struct intel_dp *intel_dp)
19941994

19951995
void intel_psr2_program_trans_man_trk_ctl(const struct intel_crtc_state *crtc_state)
19961996
{
1997+
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
19971998
struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev);
19981999
enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;
19992000
struct intel_encoder *encoder;
@@ -2013,6 +2014,12 @@ void intel_psr2_program_trans_man_trk_ctl(const struct intel_crtc_state *crtc_st
20132014

20142015
intel_de_write(dev_priv, PSR2_MAN_TRK_CTL(cpu_transcoder),
20152016
crtc_state->psr2_man_track_ctl);
2017+
2018+
if (!crtc_state->enable_psr2_su_region_et)
2019+
return;
2020+
2021+
intel_de_write(dev_priv, PIPE_SRCSZ_ERLY_TPT(crtc->pipe),
2022+
crtc_state->pipe_srcsz_early_tpt);
20162023
}
20172024

20182025
static void psr2_man_trk_ctl_calc(struct intel_crtc_state *crtc_state,
@@ -2051,6 +2058,20 @@ static void psr2_man_trk_ctl_calc(struct intel_crtc_state *crtc_state,
20512058
crtc_state->psr2_man_track_ctl = val;
20522059
}
20532060

2061+
static u32 psr2_pipe_srcsz_early_tpt_calc(struct intel_crtc_state *crtc_state,
2062+
bool full_update)
2063+
{
2064+
int width, height;
2065+
2066+
if (!crtc_state->enable_psr2_su_region_et || full_update)
2067+
return 0;
2068+
2069+
width = drm_rect_width(&crtc_state->psr2_su_area);
2070+
height = drm_rect_height(&crtc_state->psr2_su_area);
2071+
2072+
return PIPESRC_WIDTH(width - 1) | PIPESRC_HEIGHT(height - 1);
2073+
}
2074+
20542075
static void clip_area_update(struct drm_rect *overlap_damage_area,
20552076
struct drm_rect *damage_area,
20562077
struct drm_rect *pipe_src)
@@ -2095,21 +2116,36 @@ static void intel_psr2_sel_fetch_pipe_alignment(struct intel_crtc_state *crtc_st
20952116
* cursor fully when cursor is in SU area.
20962117
*/
20972118
static void
2098-
intel_psr2_sel_fetch_et_alignment(struct intel_crtc_state *crtc_state,
2099-
struct intel_plane_state *cursor_state)
2119+
intel_psr2_sel_fetch_et_alignment(struct intel_atomic_state *state,
2120+
struct intel_crtc *crtc)
21002121
{
2101-
struct drm_rect inter;
2122+
struct intel_crtc_state *crtc_state = intel_atomic_get_new_crtc_state(state, crtc);
2123+
struct intel_plane_state *new_plane_state;
2124+
struct intel_plane *plane;
2125+
int i;
21022126

2103-
if (!crtc_state->enable_psr2_su_region_et ||
2104-
!cursor_state->uapi.visible)
2127+
if (!crtc_state->enable_psr2_su_region_et)
21052128
return;
21062129

2107-
inter = crtc_state->psr2_su_area;
2108-
if (!drm_rect_intersect(&inter, &cursor_state->uapi.dst))
2109-
return;
2130+
for_each_new_intel_plane_in_state(state, plane, new_plane_state, i) {
2131+
struct drm_rect inter;
21102132

2111-
clip_area_update(&crtc_state->psr2_su_area, &cursor_state->uapi.dst,
2112-
&crtc_state->pipe_src);
2133+
if (new_plane_state->uapi.crtc != crtc_state->uapi.crtc)
2134+
continue;
2135+
2136+
if (plane->id != PLANE_CURSOR)
2137+
continue;
2138+
2139+
if (!new_plane_state->uapi.visible)
2140+
continue;
2141+
2142+
inter = crtc_state->psr2_su_area;
2143+
if (!drm_rect_intersect(&inter, &new_plane_state->uapi.dst))
2144+
continue;
2145+
2146+
clip_area_update(&crtc_state->psr2_su_area, &new_plane_state->uapi.dst,
2147+
&crtc_state->pipe_src);
2148+
}
21132149
}
21142150

21152151
/*
@@ -2152,8 +2188,7 @@ int intel_psr2_sel_fetch_update(struct intel_atomic_state *state,
21522188
{
21532189
struct drm_i915_private *dev_priv = to_i915(state->base.dev);
21542190
struct intel_crtc_state *crtc_state = intel_atomic_get_new_crtc_state(state, crtc);
2155-
struct intel_plane_state *new_plane_state, *old_plane_state,
2156-
*cursor_plane_state = NULL;
2191+
struct intel_plane_state *new_plane_state, *old_plane_state;
21572192
struct intel_plane *plane;
21582193
bool full_update = false;
21592194
int i, ret;
@@ -2238,13 +2273,6 @@ int intel_psr2_sel_fetch_update(struct intel_atomic_state *state,
22382273
damaged_area.x2 += new_plane_state->uapi.dst.x1 - src.x1;
22392274

22402275
clip_area_update(&crtc_state->psr2_su_area, &damaged_area, &crtc_state->pipe_src);
2241-
2242-
/*
2243-
* Cursor plane new state is stored to adjust su area to cover
2244-
* cursor are fully.
2245-
*/
2246-
if (plane->id == PLANE_CURSOR)
2247-
cursor_plane_state = new_plane_state;
22482276
}
22492277

22502278
/*
@@ -2273,9 +2301,13 @@ int intel_psr2_sel_fetch_update(struct intel_atomic_state *state,
22732301
if (ret)
22742302
return ret;
22752303

2276-
/* Adjust su area to cover cursor fully as necessary */
2277-
if (cursor_plane_state)
2278-
intel_psr2_sel_fetch_et_alignment(crtc_state, cursor_plane_state);
2304+
/*
2305+
* Adjust su area to cover cursor fully as necessary (early
2306+
* transport). This needs to be done after
2307+
* drm_atomic_add_affected_planes to ensure visible cursor is added into
2308+
* affected planes even when cursor is not updated by itself.
2309+
*/
2310+
intel_psr2_sel_fetch_et_alignment(state, crtc);
22792311

22802312
intel_psr2_sel_fetch_pipe_alignment(crtc_state);
22812313

@@ -2338,6 +2370,8 @@ int intel_psr2_sel_fetch_update(struct intel_atomic_state *state,
23382370

23392371
skip_sel_fetch_set_loop:
23402372
psr2_man_trk_ctl_calc(crtc_state, full_update);
2373+
crtc_state->pipe_srcsz_early_tpt =
2374+
psr2_pipe_srcsz_early_tpt_calc(crtc_state, full_update);
23412375
return 0;
23422376
}
23432377

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -961,6 +961,9 @@ static int gen8_init_rsvd(struct i915_address_space *vm)
961961
struct i915_vma *vma;
962962
int ret;
963963

964+
if (!intel_gt_needs_wa_16018031267(vm->gt))
965+
return 0;
966+
964967
/* The memory will be used only by GPU. */
965968
obj = i915_gem_object_create_lmem(i915, PAGE_SIZE,
966969
I915_BO_ALLOC_VOLATILE |

0 commit comments

Comments
 (0)