Skip to content

Commit 4d877b1

Browse files
committed
Merge tag 'drm-intel-next-2023-04-06' of git://anongit.freedesktop.org/drm/drm-intel into drm-next
- Fix DPT+shmem combo and add i915.enable_dpt modparam (Ville) - i915.enable_sagv module parameter (Ville) - Correction to QGV related register addresses (Vinod) - IPS debugfs per-crtc and new file for false_color (Ville) - More clean-up and reorganization of Display code (Jani) - DP DSC related fixes and improvements (Stanislav, Ankit, Suraj, Swati) - Make utility pin asserts more accurate (Ville) - Meteor Lake enabling (Daniele) - High refresh rate PSR fixes (Jouni) - Cursor and Plane chicken register fixes (Ville) - Align the ADL-P TypeC sequences with hardware specification (Imre) - Documentation build fixes and improvements to catch bugs earlier (Lee, Jani) - PL1 power limit hwmon entry changed to use 0 as disabled state (Ashutosh) - DP aux sync fix and improvements (Ville) - DP MST fixes and w/a (Stanislav) - Limit PXP drm-errors or warning on firmware API failures (Alan) Signed-off-by: Daniel Vetter <[email protected]> From: Rodrigo Vivi <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents 8904a1e + b358793 commit 4d877b1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+3965
-2888
lines changed

Documentation/ABI/testing/sysfs-driver-intel-i915-hwmon

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ Description: RW. Card reactive sustained (PL1/Tau) power limit in microwatts.
1414

1515
The power controller will throttle the operating frequency
1616
if the power averaged over a window (typically seconds)
17-
exceeds this limit.
17+
exceeds this limit. A read value of 0 means that the PL1
18+
power limit is disabled, writing 0 disables the
19+
limit. Writing values > 0 will enable the power limit.
1820

1921
Only supported for particular Intel i915 graphics platforms.
2022

drivers/gpu/drm/i915/Kconfig

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,5 @@ menu "drm/i915 Profile Guided Optimisation"
164164
source "drivers/gpu/drm/i915/Kconfig.profile"
165165
endmenu
166166

167-
menu "drm/i915 Unstable Evolution"
168-
visible if EXPERT && STAGING && BROKEN
169-
depends on DRM_I915
170-
source "drivers/gpu/drm/i915/Kconfig.unstable"
171-
endmenu
172-
173167
config DRM_I915_GVT
174168
bool

drivers/gpu/drm/i915/Kconfig.unstable

Lines changed: 0 additions & 21 deletions
This file was deleted.

drivers/gpu/drm/i915/Makefile

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ i915-y += i915_driver.o \
4747
i915_switcheroo.o \
4848
i915_sysfs.o \
4949
i915_utils.o \
50+
intel_clock_gating.o \
5051
intel_device_info.o \
5152
intel_memory_region.o \
5253
intel_pcode.o \
53-
intel_pm.o \
5454
intel_region_ttm.o \
5555
intel_runtime_pm.o \
5656
intel_sbi.o \
@@ -369,6 +369,13 @@ include $(src)/gvt/Makefile
369369
obj-$(CONFIG_DRM_I915) += i915.o
370370
obj-$(CONFIG_DRM_I915_GVT_KVMGT) += kvmgt.o
371371

372+
# kernel-doc test
373+
#
374+
# Enable locally for CONFIG_DRM_I915_WERROR=y. See also scripts/Makefile.build
375+
ifdef CONFIG_DRM_I915_WERROR
376+
cmd_checkdoc = $(srctree)/scripts/kernel-doc -none $<
377+
endif
378+
372379
# header test
373380

374381
# exclude some broken headers from the test coverage
@@ -380,7 +387,8 @@ always-$(CONFIG_DRM_I915_WERROR) += \
380387
$(shell cd $(srctree)/$(src) && find * -name '*.h')))
381388

382389
quiet_cmd_hdrtest = HDRTEST $(patsubst %.hdrtest,%.h,$@)
383-
cmd_hdrtest = $(CC) $(filter-out $(CFLAGS_GCOV), $(c_flags)) -S -o /dev/null -x c /dev/null -include $<; touch $@
390+
cmd_hdrtest = $(CC) $(filter-out $(CFLAGS_GCOV), $(c_flags)) -S -o /dev/null -x c /dev/null -include $<; \
391+
$(srctree)/scripts/kernel-doc -none $<; touch $@
384392

385393
$(obj)/%.hdrtest: $(src)/%.h FORCE
386394
$(call if_changed_dep,hdrtest)

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

Lines changed: 63 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ static void hsw_ips_enable(const struct intel_crtc_state *crtc_state)
1414
{
1515
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
1616
struct drm_i915_private *i915 = to_i915(crtc->base.dev);
17+
u32 val;
1718

1819
if (!crtc_state->ips_enabled)
1920
return;
@@ -26,18 +27,23 @@ static void hsw_ips_enable(const struct intel_crtc_state *crtc_state)
2627
drm_WARN_ON(&i915->drm,
2728
!(crtc_state->active_planes & ~BIT(PLANE_CURSOR)));
2829

30+
val = IPS_ENABLE;
31+
32+
if (i915->display.ips.false_color)
33+
val |= IPS_FALSE_COLOR;
34+
2935
if (IS_BROADWELL(i915)) {
3036
drm_WARN_ON(&i915->drm,
3137
snb_pcode_write(&i915->uncore, DISPLAY_IPS_CONTROL,
32-
IPS_ENABLE | IPS_PCODE_CONTROL));
38+
val | IPS_PCODE_CONTROL));
3339
/*
3440
* Quoting Art Runyan: "its not safe to expect any particular
3541
* value in IPS_CTL bit 31 after enabling IPS through the
3642
* mailbox." Moreover, the mailbox may return a bogus state,
3743
* so we need to just enable it and continue on.
3844
*/
3945
} else {
40-
intel_de_write(i915, IPS_CTL, IPS_ENABLE);
46+
intel_de_write(i915, IPS_CTL, val);
4147
/*
4248
* The bit only becomes 1 in the next vblank, so this wait here
4349
* is essentially intel_wait_for_vblank. If we don't have this
@@ -268,14 +274,57 @@ void hsw_ips_get_config(struct intel_crtc_state *crtc_state)
268274
}
269275
}
270276

277+
static int hsw_ips_debugfs_false_color_get(void *data, u64 *val)
278+
{
279+
struct intel_crtc *crtc = data;
280+
struct drm_i915_private *i915 = to_i915(crtc->base.dev);
281+
282+
*val = i915->display.ips.false_color;
283+
284+
return 0;
285+
}
286+
287+
static int hsw_ips_debugfs_false_color_set(void *data, u64 val)
288+
{
289+
struct intel_crtc *crtc = data;
290+
struct drm_i915_private *i915 = to_i915(crtc->base.dev);
291+
struct intel_crtc_state *crtc_state;
292+
int ret;
293+
294+
ret = drm_modeset_lock(&crtc->base.mutex, NULL);
295+
if (ret)
296+
return ret;
297+
298+
i915->display.ips.false_color = val;
299+
300+
crtc_state = to_intel_crtc_state(crtc->base.state);
301+
302+
if (!crtc_state->hw.active)
303+
goto unlock;
304+
305+
if (crtc_state->uapi.commit &&
306+
!try_wait_for_completion(&crtc_state->uapi.commit->hw_done))
307+
goto unlock;
308+
309+
hsw_ips_enable(crtc_state);
310+
311+
unlock:
312+
drm_modeset_unlock(&crtc->base.mutex);
313+
314+
return ret;
315+
}
316+
317+
DEFINE_DEBUGFS_ATTRIBUTE(hsw_ips_debugfs_false_color_fops,
318+
hsw_ips_debugfs_false_color_get,
319+
hsw_ips_debugfs_false_color_set,
320+
"%llu\n");
321+
271322
static int hsw_ips_debugfs_status_show(struct seq_file *m, void *unused)
272323
{
273-
struct drm_i915_private *i915 = m->private;
324+
struct intel_crtc *crtc = m->private;
325+
struct drm_i915_private *i915 = to_i915(crtc->base.dev);
274326
intel_wakeref_t wakeref;
275327

276-
if (!HAS_IPS(i915))
277-
return -ENODEV;
278-
279328
wakeref = intel_runtime_pm_get(&i915->runtime_pm);
280329

281330
seq_printf(m, "Enabled by kernel parameter: %s\n",
@@ -297,10 +346,14 @@ static int hsw_ips_debugfs_status_show(struct seq_file *m, void *unused)
297346

298347
DEFINE_SHOW_ATTRIBUTE(hsw_ips_debugfs_status);
299348

300-
void hsw_ips_debugfs_register(struct drm_i915_private *i915)
349+
void hsw_ips_crtc_debugfs_add(struct intel_crtc *crtc)
301350
{
302-
struct drm_minor *minor = i915->drm.primary;
351+
if (!hsw_crtc_supports_ips(crtc))
352+
return;
353+
354+
debugfs_create_file("i915_ips_false_color", 0644, crtc->base.debugfs_entry,
355+
crtc, &hsw_ips_debugfs_false_color_fops);
303356

304-
debugfs_create_file("i915_ips_status", 0444, minor->debugfs_root,
305-
i915, &hsw_ips_debugfs_status_fops);
357+
debugfs_create_file("i915_ips_status", 0444, crtc->base.debugfs_entry,
358+
crtc, &hsw_ips_debugfs_status_fops);
306359
}

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
#include <linux/types.h>
1010

11-
struct drm_i915_private;
1211
struct intel_atomic_state;
1312
struct intel_crtc;
1413
struct intel_crtc_state;
@@ -23,6 +22,6 @@ bool hsw_crtc_state_ips_capable(const struct intel_crtc_state *crtc_state);
2322
int hsw_ips_compute_config(struct intel_atomic_state *state,
2423
struct intel_crtc *crtc);
2524
void hsw_ips_get_config(struct intel_crtc_state *crtc_state);
26-
void hsw_ips_debugfs_register(struct drm_i915_private *i915);
25+
void hsw_ips_crtc_debugfs_add(struct intel_crtc *crtc);
2726

2827
#endif /* __HSW_IPS_H__ */

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1552,8 +1552,6 @@ static int gen11_dsi_dsc_compute_config(struct intel_encoder *encoder,
15521552
if (crtc_state->dsc.slice_count > 1)
15531553
crtc_state->dsc.dsc_split = true;
15541554

1555-
vdsc_cfg->convert_rgb = true;
1556-
15571555
/* FIXME: initialize from VBT */
15581556
vdsc_cfg->rc_model_size = DSC_RC_MODEL_SIZE_CONST;
15591557

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
#include "intel_de.h"
4545
#include "intel_display_types.h"
4646
#include "intel_fdi.h"
47+
#include "intel_fdi_regs.h"
4748
#include "intel_fifo_underrun.h"
4849
#include "intel_gmbus.h"
4950
#include "intel_hotplug.h"

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ static const char * const output_format_str[] = {
123123
[INTEL_OUTPUT_FORMAT_YCBCR444] = "YCBCR4:4:4",
124124
};
125125

126-
static const char *output_formats(enum intel_output_format format)
126+
const char *intel_output_format_name(enum intel_output_format format)
127127
{
128128
if (format >= ARRAY_SIZE(output_format_str))
129129
return "invalid";
@@ -181,7 +181,7 @@ void intel_crtc_state_dump(const struct intel_crtc_state *pipe_config,
181181
"active: %s, output_types: %s (0x%x), output format: %s\n",
182182
str_yes_no(pipe_config->hw.active),
183183
buf, pipe_config->output_types,
184-
output_formats(pipe_config->output_format));
184+
intel_output_format_name(pipe_config->output_format));
185185

186186
drm_dbg_kms(&i915->drm,
187187
"cpu_transcoder: %s, pipe bpp: %i, dithering: %i\n",

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88

99
struct intel_crtc_state;
1010
struct intel_atomic_state;
11+
enum intel_output_format;
1112

1213
void intel_crtc_state_dump(const struct intel_crtc_state *crtc_state,
1314
struct intel_atomic_state *state,
1415
const char *context);
16+
const char *intel_output_format_name(enum intel_output_format format);
1517

1618
#endif /* __INTEL_CRTC_STATE_H__ */

0 commit comments

Comments
 (0)