Skip to content

Commit 71e7274

Browse files
committed
Merge tag 'drm-intel-next-2020-01-14' of git://anongit.freedesktop.org/drm/drm-intel into drm-next
Final drm/i915 features for v5.6: - DP MST fixes (José) - Fix intel_bw_state memory leak (Pankaj Bharadiya) - Switch context id allocation to xarray (Tvrtko) - ICL/EHL/TGL workarounds (Matt Roper, Tvrtko) - Debugfs for LMEM details (Lukasz Fiedorowicz) - Prefer platform acronyms over codenames in symbols (Lucas) - Tiled and port sync mode fixes for fbdev and DP (Manasi) - DSI panel and backlight enable GPIO fixes (Hans de Goede) - Relax audio min CDCLK requirements on non-GLK (Kai Vehmanen) - Plane alignment and dimension check fixes (Imre) - Fix state checks for PSR (José) - Remove ICL+ clock gating programming (José) - Static checker fixes around bool usage (Ma Feng) - Bring back tests for self-contained headers in i915 (Masahiro Yamada) - Fix DP MST disable sequence (Ville) - Start converting i915 to the new drm device based logging macros (Wambui Karuga) - Add DSI VBT I2C sequence execution (Vivek Kasireddy) - Start using function pointers and ops structs in uc code (Michal) - Fix PMU names to not use colons or dashes (Tvrtko) - TGL media decompression support (DK, Imre) - Split i915_gem_gtt.[ch] to more manageable chunks (Matthew Auld) - Create dumb buffers in LMEM where available (Ram) - Extend mmap support for LMEM (Abdiel) - Selftest updates (Chris) - Hack bump up CDCLK on TGL to avoid underruns (Stan) - Use intel_encoder and intel_connector more instead of drm counterparts (Ville) - Build error fixes (Zhang Xiaoxu) - Fixes related to GPU and engine initialization/resume (Chris) - Support for prefaulting discontiguous objects (Abdiel) - Support discontiguous LMEM object maps (Chris) - Various GEM and GT improvements and fixes (Chris) - Merge pinctrl dependencies branch for the DSI GPIO updates (Jani) - Backmerge drm-next for new logging macros (Jani) Signed-off-by: Dave Airlie <[email protected]> From: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents dd22dfa + f2221a5 commit 71e7274

File tree

151 files changed

+9094
-7095
lines changed

Some content is hidden

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

151 files changed

+9094
-7095
lines changed

arch/arm/mach-u300/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ static unsigned long pin_highz_conf[] = {
201201
};
202202

203203
/* Pin control settings */
204-
static struct pinctrl_map __initdata u300_pinmux_map[] = {
204+
static const struct pinctrl_map u300_pinmux_map[] = {
205205
/* anonymous maps for chip power and EMIFs */
206206
PIN_MAP_MUX_GROUP_HOG_DEFAULT("pinctrl-u300", NULL, "power"),
207207
PIN_MAP_MUX_GROUP_HOG_DEFAULT("pinctrl-u300", NULL, "emif0"),

drivers/gpu/drm/drm_client_modeset.c

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,33 @@ drm_client_find_modeset(struct drm_client_dev *client, struct drm_crtc *crtc)
114114
return NULL;
115115
}
116116

117+
static struct drm_display_mode *
118+
drm_connector_get_tiled_mode(struct drm_connector *connector)
119+
{
120+
struct drm_display_mode *mode;
121+
122+
list_for_each_entry(mode, &connector->modes, head) {
123+
if (mode->hdisplay == connector->tile_h_size &&
124+
mode->vdisplay == connector->tile_v_size)
125+
return mode;
126+
}
127+
return NULL;
128+
}
129+
130+
static struct drm_display_mode *
131+
drm_connector_fallback_non_tiled_mode(struct drm_connector *connector)
132+
{
133+
struct drm_display_mode *mode;
134+
135+
list_for_each_entry(mode, &connector->modes, head) {
136+
if (mode->hdisplay == connector->tile_h_size &&
137+
mode->vdisplay == connector->tile_v_size)
138+
continue;
139+
return mode;
140+
}
141+
return NULL;
142+
}
143+
117144
static struct drm_display_mode *
118145
drm_connector_has_preferred_mode(struct drm_connector *connector, int width, int height)
119146
{
@@ -348,8 +375,15 @@ static bool drm_client_target_preferred(struct drm_connector **connectors,
348375
struct drm_connector *connector;
349376
u64 conn_configured = 0;
350377
int tile_pass = 0;
378+
int num_tiled_conns = 0;
351379
int i;
352380

381+
for (i = 0; i < connector_count; i++) {
382+
if (connectors[i]->has_tile &&
383+
connectors[i]->status == connector_status_connected)
384+
num_tiled_conns++;
385+
}
386+
353387
retry:
354388
for (i = 0; i < connector_count; i++) {
355389
connector = connectors[i];
@@ -399,6 +433,28 @@ static bool drm_client_target_preferred(struct drm_connector **connectors,
399433
list_for_each_entry(modes[i], &connector->modes, head)
400434
break;
401435
}
436+
/*
437+
* In case of tiled mode if all tiles not present fallback to
438+
* first available non tiled mode.
439+
* After all tiles are present, try to find the tiled mode
440+
* for all and if tiled mode not present due to fbcon size
441+
* limitations, use first non tiled mode only for
442+
* tile 0,0 and set to no mode for all other tiles.
443+
*/
444+
if (connector->has_tile) {
445+
if (num_tiled_conns <
446+
connector->num_h_tile * connector->num_v_tile ||
447+
(connector->tile_h_loc == 0 &&
448+
connector->tile_v_loc == 0 &&
449+
!drm_connector_get_tiled_mode(connector))) {
450+
DRM_DEBUG_KMS("Falling back to non tiled mode on Connector %d\n",
451+
connector->base.id);
452+
modes[i] = drm_connector_fallback_non_tiled_mode(connector);
453+
} else {
454+
modes[i] = drm_connector_get_tiled_mode(connector);
455+
}
456+
}
457+
402458
DRM_DEBUG_KMS("found mode %s\n", modes[i] ? modes[i]->name :
403459
"none");
404460
conn_configured |= BIT_ULL(i);
@@ -515,6 +571,7 @@ static bool drm_client_firmware_config(struct drm_client_dev *client,
515571
bool fallback = true, ret = true;
516572
int num_connectors_enabled = 0;
517573
int num_connectors_detected = 0;
574+
int num_tiled_conns = 0;
518575
struct drm_modeset_acquire_ctx ctx;
519576

520577
if (!drm_drv_uses_atomic_modeset(dev))
@@ -532,6 +589,11 @@ static bool drm_client_firmware_config(struct drm_client_dev *client,
532589
memcpy(save_enabled, enabled, count);
533590
mask = GENMASK(count - 1, 0);
534591
conn_configured = 0;
592+
for (i = 0; i < count; i++) {
593+
if (connectors[i]->has_tile &&
594+
connectors[i]->status == connector_status_connected)
595+
num_tiled_conns++;
596+
}
535597
retry:
536598
conn_seq = conn_configured;
537599
for (i = 0; i < count; i++) {
@@ -631,6 +693,16 @@ static bool drm_client_firmware_config(struct drm_client_dev *client,
631693
connector->name);
632694
modes[i] = &connector->state->crtc->mode;
633695
}
696+
/*
697+
* In case of tiled modes, if all tiles are not present
698+
* then fallback to a non tiled mode.
699+
*/
700+
if (connector->has_tile &&
701+
num_tiled_conns < connector->num_h_tile * connector->num_v_tile) {
702+
DRM_DEBUG_KMS("Falling back to non tiled mode on Connector %d\n",
703+
connector->base.id);
704+
modes[i] = drm_connector_fallback_non_tiled_mode(connector);
705+
}
634706
crtcs[i] = new_crtc;
635707

636708
DRM_DEBUG_KMS("connector %s on [CRTC:%d:%s]: %dx%d%s\n",

drivers/gpu/drm/drm_fb_helper.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1561,7 +1561,9 @@ static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
15611561
for (j = 0; j < mode_set->num_connectors; j++) {
15621562
struct drm_connector *connector = mode_set->connectors[j];
15631563

1564-
if (connector->has_tile) {
1564+
if (connector->has_tile &&
1565+
desired_mode->hdisplay == connector->tile_h_size &&
1566+
desired_mode->vdisplay == connector->tile_v_size) {
15651567
lasth = (connector->tile_h_loc == (connector->num_h_tile - 1));
15661568
lastv = (connector->tile_v_loc == (connector->num_v_tile - 1));
15671569
/* cloning to multiple tiles is just crazy-talk, so: */

drivers/gpu/drm/i915/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.hdrtest

drivers/gpu/drm/i915/Makefile

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ CFLAGS_display/intel_fbdev.o = $(call cc-disable-warning, override-init)
3131
subdir-ccflags-y += \
3232
$(call as-instr,movntdqa (%eax)$(comma)%xmm0,-DCONFIG_AS_MOVNTDQA)
3333

34-
# Extra header tests
35-
header-test-pattern-$(CONFIG_DRM_I915_WERROR) := *.h
36-
3734
subdir-ccflags-y += -I$(srctree)/$(src)
3835

3936
# Please keep these build lists sorted!
@@ -73,26 +70,30 @@ i915-$(CONFIG_DEBUG_FS) += i915_debugfs.o display/intel_pipe_crc.o
7370
i915-$(CONFIG_PERF_EVENTS) += i915_pmu.o
7471

7572
# "Graphics Technology" (aka we talk to the gpu)
76-
obj-y += gt/
7773
gt-y += \
7874
gt/debugfs_engines.o \
7975
gt/debugfs_gt.o \
8076
gt/debugfs_gt_pm.o \
77+
gt/gen6_ppgtt.o \
78+
gt/gen8_ppgtt.o \
8179
gt/intel_breadcrumbs.o \
8280
gt/intel_context.o \
8381
gt/intel_engine_cs.o \
8482
gt/intel_engine_heartbeat.o \
8583
gt/intel_engine_pm.o \
8684
gt/intel_engine_pool.o \
8785
gt/intel_engine_user.o \
86+
gt/intel_ggtt.o \
8887
gt/intel_gt.o \
8988
gt/intel_gt_irq.o \
9089
gt/intel_gt_pm.o \
9190
gt/intel_gt_pm_irq.o \
9291
gt/intel_gt_requests.o \
92+
gt/intel_gtt.o \
9393
gt/intel_llc.o \
9494
gt/intel_lrc.o \
9595
gt/intel_mocs.o \
96+
gt/intel_ppgtt.o \
9697
gt/intel_rc6.o \
9798
gt/intel_renderstate.o \
9899
gt/intel_reset.o \
@@ -111,7 +112,6 @@ gt-y += \
111112
i915-y += $(gt-y)
112113

113114
# GEM (Graphics Execution Management) code
114-
obj-y += gem/
115115
gem-y += \
116116
gem/i915_gem_busy.o \
117117
gem/i915_gem_clflush.o \
@@ -157,7 +157,6 @@ i915-y += \
157157
intel_wopcm.o
158158

159159
# general-purpose microcontroller (GuC) support
160-
obj-y += gt/uc/
161160
i915-y += gt/uc/intel_uc.o \
162161
gt/uc/intel_uc_fw.o \
163162
gt/uc/intel_guc.o \
@@ -170,7 +169,6 @@ i915-y += gt/uc/intel_uc.o \
170169
gt/uc/intel_huc_fw.o
171170

172171
# modesetting core code
173-
obj-y += display/
174172
i915-y += \
175173
display/intel_atomic.o \
176174
display/intel_atomic_plane.o \
@@ -235,7 +233,6 @@ i915-y += \
235233
display/vlv_dsi_pll.o
236234

237235
# perf code
238-
obj-y += oa/
239236
i915-y += \
240237
oa/i915_oa_hsw.o \
241238
oa/i915_oa_bdw.o \
@@ -260,6 +257,7 @@ i915-$(CONFIG_DRM_I915_SELFTEST) += \
260257
gem/selftests/igt_gem_utils.o \
261258
selftests/i915_random.o \
262259
selftests/i915_selftest.o \
260+
selftests/igt_atomic.o \
263261
selftests/igt_flush_test.o \
264262
selftests/igt_live_test.o \
265263
selftests/igt_mmap.o \
@@ -276,3 +274,27 @@ endif
276274

277275
obj-$(CONFIG_DRM_I915) += i915.o
278276
obj-$(CONFIG_DRM_I915_GVT_KVMGT) += gvt/kvmgt.o
277+
278+
# header test
279+
280+
# exclude some broken headers from the test coverage
281+
no-header-test := \
282+
display/intel_vbt_defs.h \
283+
gvt/execlist.h \
284+
gvt/fb_decoder.h \
285+
gvt/gtt.h \
286+
gvt/gvt.h \
287+
gvt/interrupt.h \
288+
gvt/mmio_context.h \
289+
gvt/mpt.h \
290+
gvt/scheduler.h
291+
292+
extra-$(CONFIG_DRM_I915_WERROR) += \
293+
$(patsubst %.h,%.hdrtest, $(filter-out $(no-header-test), \
294+
$(shell cd $(srctree)/$(src) && find * -name '*.h')))
295+
296+
quiet_cmd_hdrtest = HDRTEST $(patsubst %.hdrtest,%.h,$@)
297+
cmd_hdrtest = $(CC) $(c_flags) -S -o /dev/null -x c /dev/null -include $<; touch $@
298+
299+
$(obj)/%.hdrtest: $(src)/%.h FORCE
300+
$(call if_changed_dep,hdrtest)

drivers/gpu/drm/i915/display/Makefile

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

0 commit comments

Comments
 (0)