[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: Only reset the pinned kernel contexts on resume
== Series Details == Series: drm/i915: Only reset the pinned kernel contexts on resume URL : https://patchwork.freedesktop.org/series/58589/ State : failure == Summary == CI Bug Log - changes from CI_DRM_5818_full -> Patchwork_12603_full Summary --- **FAILURE** Serious unknown changes coming with Patchwork_12603_full absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_12603_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. Possible new issues --- Here are the unknown changes that may have been introduced in Patchwork_12603_full: ### IGT changes ### Possible regressions * igt@gem_mmap_gtt@basic-read: - shard-iclb: PASS -> INCOMPLETE Warnings * igt@kms_dp_dsc@basic-dsc-enable-edp: - shard-iclb: SKIP [fdo#109349] -> FAIL Suppressed The following results come from untrusted machines, tests, or statuses. They do not affect the overall result. * {igt@gem_exec_big@single}: - shard-kbl: PASS -> FAIL - shard-apl: INCOMPLETE [fdo#103927] -> DMESG-FAIL Known issues Here are the changes found in Patchwork_12603_full that come from known issues: ### IGT changes ### Issues hit * igt@gem_caching@writes: - shard-iclb: NOTRUN -> TIMEOUT [fdo#109673] * igt@gem_exec_parallel@bsd2-fds: - shard-iclb: NOTRUN -> SKIP [fdo#109276] +12 * igt@gem_mmap_gtt@forked-big-copy-xy: - shard-iclb: PASS -> INCOMPLETE [fdo#109100] * igt@gem_mocs_settings@mocs-rc6-dirty-render: - shard-iclb: NOTRUN -> SKIP [fdo#110206] * igt@gem_pread@pagefault-pread: - shard-iclb: NOTRUN -> SKIP [fdo#109277] * igt@gem_tiled_fence_blits@normal: - shard-iclb: PASS -> TIMEOUT [fdo#109673] * igt@i915_pm_rpm@gem-execbuf-stress-pc8: - shard-iclb: NOTRUN -> SKIP [fdo#109506] * igt@i915_pm_rpm@i2c: - shard-iclb: PASS -> FAIL [fdo#104097] * igt@i915_pm_rpm@modeset-lpsp-stress-no-wait: - shard-kbl: NOTRUN -> SKIP [fdo#109271] +14 * igt@i915_pm_rpm@modeset-non-lpsp-stress: - shard-iclb: NOTRUN -> SKIP [fdo#109308] * igt@i915_pm_rpm@system-suspend-execbuf: - shard-iclb: PASS -> DMESG-WARN [fdo#109638] * igt@i915_pm_rps@min-max-config-loaded: - shard-iclb: NOTRUN -> FAIL [fdo#108059] * igt@i915_pm_sseu@full-enable: - shard-iclb: NOTRUN -> SKIP [fdo#109288] * igt@kms_busy@extended-modeset-hang-newfb-render-a: - shard-skl: NOTRUN -> DMESG-WARN [fdo#110222] +4 * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-f: - shard-kbl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +2 * igt@kms_busy@extended-modeset-hang-oldfb-render-f: - shard-iclb: NOTRUN -> SKIP [fdo#109278] +5 * igt@kms_busy@extended-pageflip-hang-newfb-render-c: - shard-snb: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +13 * igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-a: - shard-iclb: PASS -> DMESG-WARN [fdo#110222] * igt@kms_chamelium@vga-edid-read: - shard-iclb: NOTRUN -> SKIP [fdo#109284] +4 * igt@kms_cursor_legacy@2x-cursor-vs-flip-legacy: - shard-iclb: NOTRUN -> SKIP [fdo#109274] +4 * igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions: - shard-iclb: NOTRUN -> FAIL [fdo#103355] +1 * igt@kms_fbcon_fbt@psr: - shard-iclb: NOTRUN -> FAIL [fdo#103833] * igt@kms_fbcon_fbt@psr-suspend: - shard-skl: NOTRUN -> FAIL [fdo#103833] * igt@kms_flip@flip-vs-expired-vblank: - shard-skl: NOTRUN -> FAIL [fdo#105363] * igt@kms_flip@flip-vs-expired-vblank-interruptible: - shard-glk: PASS -> FAIL [fdo#102887] / [fdo#105363] * igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw: - shard-skl: PASS -> FAIL [fdo#103167] * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-indfb-draw-mmap-gtt: - shard-iclb: PASS -> FAIL [fdo#103167] +7 * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-cpu: - shard-skl: PASS -> FAIL [fdo#105682] * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-blt: - shard-iclb: NOTRUN -> FAIL [fdo#109247] +6 * igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-cur-indfb-draw-mmap-wc: - shard-iclb: NOTRUN -> SKIP [fdo#109280] +26 * igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-indfb-plflip-blt: - shard-snb: NOTRUN -> SKIP [fdo#109271] +106 * igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-blt: - shard-iclb: PASS -> FAIL [fdo#105682] / [fdo#109247] *
[Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [1/2] drm/i915: Do not enable FEC without DSC
== Series Details == Series: series starting with [1/2] drm/i915: Do not enable FEC without DSC URL : https://patchwork.freedesktop.org/series/58588/ State : success == Summary == CI Bug Log - changes from CI_DRM_5818_full -> Patchwork_12602_full Summary --- **WARNING** Minor unknown changes coming with Patchwork_12602_full need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_12602_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. Possible new issues --- Here are the unknown changes that may have been introduced in Patchwork_12602_full: ### IGT changes ### Warnings * igt@kms_setmode@basic: - shard-iclb: FAIL [fdo#99912] -> INCOMPLETE Suppressed The following results come from untrusted machines, tests, or statuses. They do not affect the overall result. * {igt@gem_exec_big@single}: - shard-kbl: PASS -> FAIL Known issues Here are the changes found in Patchwork_12602_full that come from known issues: ### IGT changes ### Issues hit * igt@gem_exec_parallel@bsd2-fds: - shard-iclb: NOTRUN -> SKIP [fdo#109276] +6 * igt@gem_mocs_settings@mocs-rc6-dirty-render: - shard-iclb: NOTRUN -> SKIP [fdo#110206] * igt@gem_ppgtt@blt-vs-render-ctxn: - shard-iclb: PASS -> INCOMPLETE [fdo#109801] * igt@gem_pread@pagefault-pread: - shard-iclb: NOTRUN -> SKIP [fdo#109277] * igt@gem_workarounds@suspend-resume-context: - shard-skl: PASS -> INCOMPLETE [fdo#104108] / [fdo#107773] +1 * igt@i915_pm_rpm@gem-execbuf-stress-pc8: - shard-iclb: NOTRUN -> SKIP [fdo#109506] * igt@i915_pm_rpm@modeset-lpsp-stress-no-wait: - shard-kbl: NOTRUN -> SKIP [fdo#109271] +22 * igt@i915_pm_rpm@modeset-non-lpsp-stress: - shard-iclb: NOTRUN -> SKIP [fdo#109308] * igt@i915_pm_rpm@system-suspend-execbuf: - shard-skl: PASS -> INCOMPLETE [fdo#104108] / [fdo#107807] * igt@i915_pm_rps@min-max-config-loaded: - shard-iclb: NOTRUN -> FAIL [fdo#108059] * igt@kms_busy@extended-modeset-hang-newfb-render-a: - shard-skl: NOTRUN -> DMESG-WARN [fdo#110222] +4 * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-f: - shard-kbl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +2 * igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-a: - shard-iclb: PASS -> DMESG-WARN [fdo#110222] * igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-d: - shard-iclb: NOTRUN -> SKIP [fdo#109278] +4 * igt@kms_chamelium@hdmi-cmp-planes-random: - shard-iclb: NOTRUN -> SKIP [fdo#109284] +2 * igt@kms_cursor_legacy@2x-cursor-vs-flip-legacy: - shard-iclb: NOTRUN -> SKIP [fdo#109274] +3 * igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions: - shard-iclb: NOTRUN -> FAIL [fdo#103355] +1 * igt@kms_cursor_legacy@cursor-vs-flip-legacy: - shard-iclb: PASS -> FAIL [fdo#103355] * igt@kms_fbcon_fbt@psr: - shard-iclb: NOTRUN -> FAIL [fdo#103833] * igt@kms_fbcon_fbt@psr-suspend: - shard-skl: NOTRUN -> FAIL [fdo#103833] * igt@kms_flip@flip-vs-expired-vblank: - shard-skl: NOTRUN -> FAIL [fdo#105363] * igt@kms_flip@flip-vs-expired-vblank-interruptible: - shard-glk: PASS -> FAIL [fdo#102887] / [fdo#105363] * igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw: - shard-skl: PASS -> FAIL [fdo#103167] - shard-iclb: PASS -> FAIL [fdo#103167] +1 * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-spr-indfb-draw-mmap-cpu: - shard-skl: PASS -> FAIL [fdo#105682] - shard-kbl: PASS -> FAIL [fdo#105682] +1 * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-mmap-cpu: - shard-snb: NOTRUN -> SKIP [fdo#109271] +71 * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-cur-indfb-draw-mmap-gtt: - shard-iclb: PASS -> FAIL [fdo#109247] +10 * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-blt: - shard-iclb: NOTRUN -> FAIL [fdo#109247] +3 * igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-cur-indfb-draw-mmap-wc: - shard-iclb: NOTRUN -> SKIP [fdo#109280] +19 * igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-mmap-cpu: - shard-iclb: PASS -> FAIL [fdo#105682] / [fdo#109247] * igt@kms_panel_fitting@legacy: - shard-skl: NOTRUN -> FAIL [fdo#105456] * igt@kms_pipe_b_c_ivb@from-pipe-c-to-b-with-3-lanes: - shard-iclb: NOTRUN -> SKIP [fdo#109289] +2 * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a: - shard-iclb: PASS -> FAIL [fdo#103375] *
[Intel-gfx] linux-next: build failure after merge of the drm-intel tree
Hi all, After merging the drm-intel tree, today's linux-next build (i386 defconfig) failed like this: In file included from drivers/gpu/drm/i915/intel_guc.h:28:0, from drivers/gpu/drm/i915/intel_uc.h:27, from drivers/gpu/drm/i915/intel_uc.c:25: drivers/gpu/drm/i915/intel_uncore.h: In function '__raw_uncore_read64': drivers/gpu/drm/i915/intel_uncore.h:257:9: error: implicit declaration of function 'readq'; did you mean 'readl'? [-Werror=implicit-function-declaration] return read##s__(uncore->regs + i915_mmio_reg_offset(reg)); \ ^ drivers/gpu/drm/i915/intel_uncore.h:269:1: note: in expansion of macro '__raw_read' __raw_read(64, q) ^~ drivers/gpu/drm/i915/intel_uncore.h: In function '__raw_uncore_write64': drivers/gpu/drm/i915/intel_uncore.h:264:2: error: implicit declaration of function 'writeq'; did you mean 'writel'? [-Werror=implicit-function-declaration] write##s__(val, uncore->regs + i915_mmio_reg_offset(reg)); \ ^ drivers/gpu/drm/i915/intel_uncore.h:274:1: note: in expansion of macro '__raw_write' __raw_write(64, q) ^~~ Caused by commit 6cc5ca768825 ("drm/i915: rename raw reg access functions") I have reverted that commit and the following ones in the tree up to 9511cb6481af ("drm/i915: Adding missing '; ' to ENGINE_INSTANCES") -- Cheers, Stephen Rothwell pgphbS4xFJIay.pgp Description: OpenPGP digital signature ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [v2,1/6] drm/i915: Add broadcast RGB property for DP MST
== Series Details == Series: series starting with [v2,1/6] drm/i915: Add broadcast RGB property for DP MST URL : https://patchwork.freedesktop.org/series/58585/ State : success == Summary == CI Bug Log - changes from CI_DRM_5818_full -> Patchwork_12601_full Summary --- **SUCCESS** No regressions found. Known issues Here are the changes found in Patchwork_12601_full that come from known issues: ### IGT changes ### Issues hit * igt@gem_exec_parallel@bsd2-fds: - shard-iclb: NOTRUN -> SKIP [fdo#109276] +10 * igt@gem_mmap_gtt@hang: - shard-iclb: PASS -> FAIL [fdo#109677] * igt@gem_mocs_settings@mocs-rc6-dirty-render: - shard-iclb: NOTRUN -> SKIP [fdo#110206] * igt@gem_ppgtt@blt-vs-render-ctxn: - shard-iclb: PASS -> INCOMPLETE [fdo#109801] * igt@gem_pread@pagefault-pread: - shard-iclb: NOTRUN -> SKIP [fdo#109277] * igt@i915_pm_rpm@fences-dpms: - shard-skl: PASS -> INCOMPLETE [fdo#107807] * igt@i915_pm_rpm@gem-execbuf-stress-extra-wait: - shard-skl: PASS -> INCOMPLETE [fdo#107803] / [fdo#107807] * igt@i915_pm_rpm@gem-execbuf-stress-pc8: - shard-iclb: NOTRUN -> SKIP [fdo#109506] * igt@i915_pm_rpm@modeset-lpsp-stress-no-wait: - shard-kbl: NOTRUN -> SKIP [fdo#109271] +14 * igt@i915_pm_rpm@modeset-non-lpsp-stress: - shard-iclb: NOTRUN -> SKIP [fdo#109308] * igt@i915_pm_rps@min-max-config-loaded: - shard-iclb: NOTRUN -> FAIL [fdo#108059] * igt@kms_busy@extended-modeset-hang-newfb-render-a: - shard-skl: NOTRUN -> DMESG-WARN [fdo#110222] +4 * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-f: - shard-kbl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +2 * igt@kms_busy@extended-pageflip-hang-newfb-render-c: - shard-snb: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +13 * igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-a: - shard-iclb: PASS -> DMESG-WARN [fdo#110222] * igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-d: - shard-iclb: NOTRUN -> SKIP [fdo#109278] +6 * igt@kms_chamelium@vga-edid-read: - shard-iclb: NOTRUN -> SKIP [fdo#109284] +4 * igt@kms_cursor_legacy@2x-cursor-vs-flip-legacy: - shard-iclb: NOTRUN -> SKIP [fdo#109274] +4 * igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions-varying-size: - shard-iclb: NOTRUN -> FAIL [fdo#103355] * igt@kms_cursor_legacy@cursora-vs-flipa-atomic-transitions: - shard-snb: PASS -> SKIP [fdo#109271] * igt@kms_fbcon_fbt@fbc: - shard-iclb: NOTRUN -> DMESG-WARN [fdo#109593] * igt@kms_fbcon_fbt@psr: - shard-iclb: NOTRUN -> FAIL [fdo#103833] * igt@kms_fbcon_fbt@psr-suspend: - shard-skl: NOTRUN -> FAIL [fdo#103833] * igt@kms_frontbuffer_tracking@fbc-1p-offscren-pri-indfb-draw-render: - shard-iclb: NOTRUN -> FAIL [fdo#103167] * igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw: - shard-skl: PASS -> FAIL [fdo#105682] +1 * igt@kms_frontbuffer_tracking@fbc-1p-rte: - shard-iclb: PASS -> FAIL [fdo#103167] / [fdo#105682] * igt@kms_frontbuffer_tracking@fbc-rgb565-draw-pwrite: - shard-iclb: PASS -> FAIL [fdo#103167] +6 * igt@kms_frontbuffer_tracking@fbcpsr-1p-offscren-pri-indfb-draw-pwrite: - shard-iclb: PASS -> FAIL [fdo#109247] +12 * igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-cur-indfb-draw-mmap-wc: - shard-iclb: NOTRUN -> SKIP [fdo#109280] +26 * igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-indfb-plflip-blt: - shard-snb: NOTRUN -> SKIP [fdo#109271] +106 * igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-pwrite: - shard-iclb: PASS -> FAIL [fdo#105682] / [fdo#109247] * igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-shrfb-draw-mmap-wc: - shard-iclb: NOTRUN -> FAIL [fdo#109247] +1 * igt@kms_panel_fitting@legacy: - shard-skl: NOTRUN -> FAIL [fdo#105456] * igt@kms_pipe_b_c_ivb@from-pipe-c-to-b-with-3-lanes: - shard-iclb: NOTRUN -> SKIP [fdo#109289] +2 * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-f: - shard-skl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +18 * igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max: - shard-skl: NOTRUN -> FAIL [fdo#108145] +2 * igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min: - shard-skl: PASS -> FAIL [fdo#108145] * igt@kms_plane_alpha_blend@pipe-c-alpha-7efc: - shard-kbl: NOTRUN -> FAIL [fdo#108145] / [fdo#108590] * igt@kms_plane_scaling@pipe-c-scaler-with-clipping-clamping: - shard-iclb: NOTRUN -> INCOMPLETE [fdo#110041] * igt@kms_plane_scaling@pipe-c-scaler-with-pixel-format: - shard-glk: PASS -> SKIP
Re: [Intel-gfx] [PATCH v5 2/5] drm/i915: Watchdog timeout: IRQ handler for gen8+
On Mon, 2019-03-25 at 10:00 +, Tvrtko Ursulin wrote: > On 22/03/2019 23:41, Carlos Santa wrote: > > From: Michel Thierry > > > > *** General *** > > > > Watchdog timeout (or "media engine reset") is a feature that allows > > userland applications to enable hang detection on individual batch > > buffers. > > The detection mechanism itself is mostly bound to the hardware and > > the only > > thing that the driver needs to do to support this form of hang > > detection > > is to implement the interrupt handling support as well as watchdog > > command > > emission before and after the emitted batch buffer start > > instruction in the > > ring buffer. > > > > The principle of the hang detection mechanism is as follows: > > > > 1. Once the decision has been made to enable watchdog timeout for a > > particular batch buffer and the driver is in the process of > > emitting the > > batch buffer start instruction into the ring buffer it also emits a > > watchdog timer start instruction before and a watchdog timer > > cancellation > > instruction after the batch buffer start instruction in the ring > > buffer. > > > > 2. Once the GPU execution reaches the watchdog timer start > > instruction > > the hardware watchdog counter is started by the hardware. The > > counter > > keeps counting until either reaching a previously configured > > threshold > > value or the timer cancellation instruction is executed. > > > > 2a. If the counter reaches the threshold value the hardware fires a > > watchdog interrupt that is picked up by the watchdog interrupt > > handler. > > This means that a hang has been detected and the driver needs to > > deal with > > it the same way it would deal with a engine hang detected by the > > periodic > > hang checker. The only difference between the two is that we > > already blamed > > the active request (to ensure an engine reset). > > > > 2b. If the batch buffer completes and the execution reaches the > > watchdog > > cancellation instruction before the watchdog counter reaches its > > threshold value the watchdog is cancelled and nothing more comes of > > it. > > No hang is detected. > > > > Note about future interaction with preemption: Preemption could > > happen > > in a command sequence prior to watchdog counter getting disabled, > > resulting in watchdog being triggered following preemption (e.g. > > when > > watchdog had been enabled in the low priority batch). The driver > > will > > need to explicitly disable the watchdog counter as part of the > > preemption sequence. > > > > *** This patch introduces: *** > > > > 1. IRQ handler code for watchdog timeout allowing direct hang > > recovery > > based on hardware-driven hang detection, which then integrates > > directly > > with the hang recovery path. This is independent of having per- > > engine reset > > or just full gpu reset. > > > > 2. Watchdog specific register information. > > > > Currently the render engine and all available media engines support > > watchdog timeout (VECS is only supported in GEN9). The > > specifications elude > > to the BCS engine being supported but that is currently not > > supported by > > this commit. > > > > Note that the value to stop the counter is different between render > > and > > non-render engines in GEN8; GEN9 onwards it's the same. > > > > v2: Move irq handler to tasklet, arm watchdog for a 2nd time to > > check > > against false-positives. > > > > v3: Don't use high priority tasklet, use engine_last_submit while > > checking for false-positives. From GEN9 onwards, the stop counter > > bit is > > the same for all engines. > > > > v4: Remove unnecessary brackets, use current_seqno to mark the > > request > > as guilty in the hangcheck/capture code. > > > > v5: Rebased after RESET_ENGINEs flag. > > > > v6: Don't capture error state in case of watchdog timeout. The > > capture > > process is time consuming and this will align to what happens when > > we > > use GuC to handle the watchdog timeout. (Chris) > > > > v7: Rebase. > > > > v8: Rebase, use HZ to reschedule. > > > > v9: Rebase, get forcewake domains in function (no longer in > > execlists > > struct). > > > > v10: Rebase. > > > > v11: Rebase, > > remove extra braces (Tvrtko), > > implement watchdog_to_clock_counts helper (Tvrtko), > > Move tasklet_kill(watchdog_tasklet) inside intel_engines > > (Tvrtko), > > Use a global heartbeat seqno instead of engine seqno (Chris) > > Make all engines checks all class based checks (Tvrtko) > > > > v12: Rebase, > > Reset immediately upon entering the IRQ (Chris) > > Make reset_engine_to_str a helper (Tvrtko) > > Rename watchdog_irq_handler as watchdog_tasklet (Tvrtko) > > Let the compiler itself do the inline (Tvrtko) > > > > v13: Rebase > > v14: Rebase, skip checking for the guilty seqno in the tasklet > > (Tvrtko) > > IIRC I only asked about it so I guess you tried it and it works well? > > Can you also post the IGTs so
[Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [01/21] drm/fb-helper: Add fill_info() functions
== Series Details == Series: series starting with [01/21] drm/fb-helper: Add fill_info() functions URL : https://patchwork.freedesktop.org/series/58578/ State : success == Summary == CI Bug Log - changes from CI_DRM_5818_full -> Patchwork_12600_full Summary --- **SUCCESS** No regressions found. Known issues Here are the changes found in Patchwork_12600_full that come from known issues: ### IGT changes ### Issues hit * igt@gem_create@create-clear: - shard-snb: PASS -> INCOMPLETE [fdo#105411] * igt@gem_exec_parallel@bsd2-fds: - shard-iclb: NOTRUN -> SKIP [fdo#109276] +10 * igt@gem_mmap_gtt@hang: - shard-iclb: PASS -> FAIL [fdo#109677] * igt@gem_mocs_settings@mocs-rc6-dirty-render: - shard-iclb: NOTRUN -> SKIP [fdo#110206] * igt@gem_ppgtt@blt-vs-render-ctxn: - shard-iclb: PASS -> INCOMPLETE [fdo#109801] * igt@gem_pread@pagefault-pread: - shard-iclb: NOTRUN -> SKIP [fdo#109277] * igt@i915_pm_rpm@cursor-dpms: - shard-skl: NOTRUN -> INCOMPLETE [fdo#107807] * igt@i915_pm_rpm@gem-execbuf-stress-pc8: - shard-iclb: NOTRUN -> SKIP [fdo#109506] * igt@i915_pm_rpm@modeset-lpsp-stress-no-wait: - shard-kbl: NOTRUN -> SKIP [fdo#109271] +22 * igt@i915_pm_rpm@modeset-non-lpsp-stress: - shard-iclb: NOTRUN -> SKIP [fdo#109308] * igt@i915_pm_rps@min-max-config-loaded: - shard-iclb: NOTRUN -> FAIL [fdo#108059] * igt@kms_busy@extended-modeset-hang-newfb-render-a: - shard-skl: NOTRUN -> DMESG-WARN [fdo#110222] +2 * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-f: - shard-kbl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +2 * igt@kms_busy@extended-pageflip-hang-newfb-render-c: - shard-snb: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +13 * igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-a: - shard-iclb: PASS -> DMESG-WARN [fdo#110222] * igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-d: - shard-iclb: NOTRUN -> SKIP [fdo#109278] +6 * igt@kms_chamelium@vga-edid-read: - shard-iclb: NOTRUN -> SKIP [fdo#109284] +4 * igt@kms_cursor_legacy@2x-cursor-vs-flip-legacy: - shard-iclb: NOTRUN -> SKIP [fdo#109274] +4 * igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions: - shard-iclb: NOTRUN -> FAIL [fdo#103355] +1 * igt@kms_fbcon_fbt@psr: - shard-iclb: NOTRUN -> FAIL [fdo#103833] * igt@kms_fbcon_fbt@psr-suspend: - shard-skl: NOTRUN -> FAIL [fdo#103833] * igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw: - shard-skl: PASS -> FAIL [fdo#103167] +1 * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-indfb-draw-render: - shard-iclb: PASS -> FAIL [fdo#103167] +6 * igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-cur-indfb-draw-mmap-wc: - shard-iclb: NOTRUN -> SKIP [fdo#109280] +26 * igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-indfb-plflip-blt: - shard-snb: NOTRUN -> SKIP [fdo#109271] +106 * igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-draw-pwrite: - shard-iclb: PASS -> FAIL [fdo#109247] +15 * igt@kms_panel_fitting@legacy: - shard-skl: NOTRUN -> FAIL [fdo#105456] * igt@kms_pipe_b_c_ivb@from-pipe-c-to-b-with-3-lanes: - shard-iclb: NOTRUN -> SKIP [fdo#109289] +2 * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-f: - shard-skl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +11 * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-c-planes: - shard-kbl: PASS -> DMESG-WARN [fdo#103313] * igt@kms_plane_alpha_blend@pipe-a-constant-alpha-max: - shard-skl: NOTRUN -> FAIL [fdo#108145] +2 - shard-kbl: NOTRUN -> FAIL [fdo#108145] * igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min: - shard-skl: PASS -> FAIL [fdo#108145] * igt@kms_plane_alpha_blend@pipe-c-alpha-7efc: - shard-kbl: NOTRUN -> FAIL [fdo#108145] / [fdo#108590] * igt@kms_plane_scaling@pipe-c-scaler-with-clipping-clamping: - shard-iclb: NOTRUN -> INCOMPLETE [fdo#110041] * igt@kms_plane_scaling@pipe-c-scaler-with-pixel-format: - shard-glk: PASS -> SKIP [fdo#109271] / [fdo#109278] * igt@kms_psr@cursor_mmap_gtt: - shard-iclb: PASS -> FAIL [fdo#107383] / [fdo#110215] +3 * igt@kms_psr@psr2_basic: - shard-iclb: PASS -> SKIP [fdo#109441] +1 * igt@kms_setmode@basic: - shard-apl: PASS -> FAIL [fdo#99912] - shard-snb: NOTRUN -> FAIL [fdo#99912] * igt@kms_vblank@pipe-b-ts-continuation-modeset-hang: - shard-apl: PASS -> FAIL [fdo#104894] +1 * igt@perf_pmu@busy-accuracy-50-vcs1: - shard-skl: NOTRUN -> SKIP [fdo#109271] +154 *
[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: fix i386 build of 64b raw_uncore functions
== Series Details == Series: drm/i915: fix i386 build of 64b raw_uncore functions URL : https://patchwork.freedesktop.org/series/58611/ State : success == Summary == CI Bug Log - changes from CI_DRM_5819 -> Patchwork_12610 Summary --- **SUCCESS** No regressions found. External URL: https://patchwork.freedesktop.org/api/1.0/series/58611/revisions/1/mbox/ Known issues Here are the changes found in Patchwork_12610 that come from known issues: ### IGT changes ### Issues hit * igt@gem_ctx_create@basic-files: - fi-gdg-551: NOTRUN -> SKIP [fdo#109271] +106 * igt@i915_module_load@reload: - fi-blb-e6850: PASS -> INCOMPLETE [fdo#107718] * igt@i915_selftest@live_execlists: - fi-apl-guc: PASS -> INCOMPLETE [fdo#103927] / [fdo#109720] * igt@kms_busy@basic-flip-a: - fi-gdg-551: NOTRUN -> FAIL [fdo#103182] * igt@kms_busy@basic-flip-c: - fi-gdg-551: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] * igt@runner@aborted: - fi-apl-guc: NOTRUN -> FAIL [fdo#108622] / [fdo#109720] Possible fixes * igt@i915_pm_rpm@module-reload: - fi-skl-6770hq: FAIL [fdo#108511] -> PASS * igt@i915_selftest@live_uncore: - fi-skl-gvtdvm: DMESG-FAIL [fdo#110210] -> PASS * igt@kms_frontbuffer_tracking@basic: - fi-byt-clapper: FAIL [fdo#103167] -> PASS * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b-frame-sequence: - fi-byt-clapper: FAIL [fdo#103191] / [fdo#107362] -> PASS +3 [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167 [fdo#103182]: https://bugs.freedesktop.org/show_bug.cgi?id=103182 [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191 [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927 [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362 [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718 [fdo#108511]: https://bugs.freedesktop.org/show_bug.cgi?id=108511 [fdo#108622]: https://bugs.freedesktop.org/show_bug.cgi?id=108622 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278 [fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720 [fdo#110210]: https://bugs.freedesktop.org/show_bug.cgi?id=110210 Participating hosts (41 -> 35) -- Additional (1): fi-gdg-551 Missing(7): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-hsw-peppy fi-byt-squawks fi-bsw-cyan fi-bdw-samus Build changes - * Linux: CI_DRM_5819 -> Patchwork_12610 CI_DRM_5819: 73462b05bd50a0eb93b3bc447229006bc93eb7e2 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4905: a350b9f9f606296b1599c3617c8530a8985709e2 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_12610: 28cfc7d01f7890bbb66705a338f71d0fb47d44b6 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 28cfc7d01f78 drm/i915: fix i386 build of 64b raw_uncore functions == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12610/ ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915: fix i386 build of 64b raw_uncore functions
Quoting Daniele Ceraolo Spurio (2019-03-26 23:38:17) > When building with ARCH=i386, readq and writeq are not defined, > resulting in: > > intel_uncore.h: In function ‘__raw_uncore_read64’: > intel_uncore.h:257:9: error: implicit declaration of function ‘readq’; > did you mean ‘readl’? [-Werror=implicit-function-declaration] > return read##s__(uncore->regs + i915_mmio_reg_offset(reg)); \ > ^ > > and: > > intel_uncore.h: In function ‘__raw_uncore_write64’: > intel_uncore.h:264:2: error: implicit declaration of function ‘writeq’; > did you mean ‘writel’? [-Werror=implicit-function-declaration] > write##s__(val, uncore->regs + i915_mmio_reg_offset(reg)); \ > ^ > > Add the io-64-nonatomic-lo-hi include to have readq and writeq available > for all builds. This header internally includes linux/io.h, so the > native readq and writeq definitions will be used when available. > > Fixes: 6cc5ca768825 ("drm/i915: rename raw reg access functions") > Signed-off-by: Daniele Ceraolo Spurio > Cc: Chris Wilson > Cc: Paulo Zanoni > --- > drivers/gpu/drm/i915/intel_uncore.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/i915/intel_uncore.h > b/drivers/gpu/drm/i915/intel_uncore.h > index 06762501e9ee..50d226f68753 100644 > --- a/drivers/gpu/drm/i915/intel_uncore.h > +++ b/drivers/gpu/drm/i915/intel_uncore.h > @@ -28,6 +28,7 @@ > #include > #include > #include > +#include Yeah, can't see a better way as it does what we need for the fallback. Reviewed-by: Chris Wilson -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/icl: Fix VEBOX mismatch BUG_ON()
== Series Details == Series: drm/i915/icl: Fix VEBOX mismatch BUG_ON() URL : https://patchwork.freedesktop.org/series/58609/ State : success == Summary == CI Bug Log - changes from CI_DRM_5819 -> Patchwork_12609 Summary --- **SUCCESS** No regressions found. External URL: https://patchwork.freedesktop.org/api/1.0/series/58609/revisions/1/mbox/ Known issues Here are the changes found in Patchwork_12609 that come from known issues: ### IGT changes ### Issues hit * igt@amdgpu/amd_cs_nop@sync-fork-compute0: - fi-icl-u3: NOTRUN -> SKIP [fdo#109315] +17 * igt@gem_ctx_create@basic-files: - fi-gdg-551: NOTRUN -> SKIP [fdo#109271] +106 * igt@gem_exec_basic@gtt-bsd1: - fi-icl-u3: NOTRUN -> SKIP [fdo#109276] +7 * igt@gem_exec_basic@readonly-bsd2: - fi-pnv-d510:NOTRUN -> SKIP [fdo#109271] +76 * igt@gem_exec_parse@basic-rejected: - fi-icl-u3: NOTRUN -> SKIP [fdo#109289] +1 * igt@gem_exec_suspend@basic-s3: - fi-blb-e6850: PASS -> INCOMPLETE [fdo#107718] * igt@i915_selftest@live_contexts: - fi-icl-u3: NOTRUN -> DMESG-FAIL [fdo#108569] - fi-bdw-gvtdvm: PASS -> DMESG-FAIL [fdo#110235 ] - fi-skl-gvtdvm: PASS -> DMESG-FAIL [fdo#110235 ] * igt@i915_selftest@live_execlists: - fi-apl-guc: PASS -> INCOMPLETE [fdo#103927] / [fdo#109720] * igt@kms_busy@basic-flip-a: - fi-gdg-551: NOTRUN -> FAIL [fdo#103182] +1 * igt@kms_busy@basic-flip-c: - fi-gdg-551: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] - fi-pnv-d510:NOTRUN -> SKIP [fdo#109271] / [fdo#109278] * igt@kms_chamelium@hdmi-edid-read: - fi-icl-u3: NOTRUN -> SKIP [fdo#109284] +8 * igt@kms_force_connector_basic@prune-stale-modes: - fi-icl-u3: NOTRUN -> SKIP [fdo#109285] +3 * igt@kms_frontbuffer_tracking@basic: - fi-icl-u3: NOTRUN -> FAIL [fdo#103167] * igt@kms_pipe_crc_basic@read-crc-pipe-a: - fi-byt-clapper: PASS -> FAIL [fdo#107362] * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b: - fi-byt-clapper: PASS -> FAIL [fdo#103191] / [fdo#107362] * igt@runner@aborted: - fi-apl-guc: NOTRUN -> FAIL [fdo#108622] / [fdo#109720] Possible fixes * igt@i915_pm_rpm@module-reload: - fi-skl-6770hq: FAIL [fdo#108511] -> PASS * igt@i915_selftest@live_uncore: - fi-skl-gvtdvm: DMESG-FAIL [fdo#110210] -> PASS * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b-frame-sequence: - fi-byt-clapper: FAIL [fdo#103191] / [fdo#107362] -> PASS +3 [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167 [fdo#103182]: https://bugs.freedesktop.org/show_bug.cgi?id=103182 [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191 [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927 [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362 [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718 [fdo#108511]: https://bugs.freedesktop.org/show_bug.cgi?id=108511 [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569 [fdo#108622]: https://bugs.freedesktop.org/show_bug.cgi?id=108622 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#109276]: https://bugs.freedesktop.org/show_bug.cgi?id=109276 [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278 [fdo#109284]: https://bugs.freedesktop.org/show_bug.cgi?id=109284 [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285 [fdo#109289]: https://bugs.freedesktop.org/show_bug.cgi?id=109289 [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315 [fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720 [fdo#110210]: https://bugs.freedesktop.org/show_bug.cgi?id=110210 [fdo#110235 ]: https://bugs.freedesktop.org/show_bug.cgi?id=110235 Participating hosts (41 -> 38) -- Additional (3): fi-gdg-551 fi-icl-u3 fi-pnv-d510 Missing(6): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-bdw-samus Build changes - * Linux: CI_DRM_5819 -> Patchwork_12609 CI_DRM_5819: 73462b05bd50a0eb93b3bc447229006bc93eb7e2 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4905: a350b9f9f606296b1599c3617c8530a8985709e2 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_12609: 0fdb4a500973070b34c7ade6c1cdf4ed2c5c807d @ git://anongit.freedesktop.org/gfx-ci/linux == Kernel 32bit build == Warning: Kernel 32bit buildtest failed: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12609/build_32bit.log CALLscripts/checksyscalls.sh CALLscripts/atomic/check-atomics.sh CHK include/generated/compile.h CC [M] drivers/gpu/drm/i915/intel_uc.o In file included from drivers/gpu/drm/i915/intel_guc.h:28:0, from
[Intel-gfx] [PATCH] drm/i915: fix i386 build of 64b raw_uncore functions
When building with ARCH=i386, readq and writeq are not defined, resulting in: intel_uncore.h: In function ‘__raw_uncore_read64’: intel_uncore.h:257:9: error: implicit declaration of function ‘readq’; did you mean ‘readl’? [-Werror=implicit-function-declaration] return read##s__(uncore->regs + i915_mmio_reg_offset(reg)); \ ^ and: intel_uncore.h: In function ‘__raw_uncore_write64’: intel_uncore.h:264:2: error: implicit declaration of function ‘writeq’; did you mean ‘writel’? [-Werror=implicit-function-declaration] write##s__(val, uncore->regs + i915_mmio_reg_offset(reg)); \ ^ Add the io-64-nonatomic-lo-hi include to have readq and writeq available for all builds. This header internally includes linux/io.h, so the native readq and writeq definitions will be used when available. Fixes: 6cc5ca768825 ("drm/i915: rename raw reg access functions") Signed-off-by: Daniele Ceraolo Spurio Cc: Chris Wilson Cc: Paulo Zanoni --- drivers/gpu/drm/i915/intel_uncore.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/intel_uncore.h b/drivers/gpu/drm/i915/intel_uncore.h index 06762501e9ee..50d226f68753 100644 --- a/drivers/gpu/drm/i915/intel_uncore.h +++ b/drivers/gpu/drm/i915/intel_uncore.h @@ -28,6 +28,7 @@ #include #include #include +#include #include "i915_reg.h" -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915/icl: Fix VEBOX mismatch BUG_ON()
Quoting José Roberto de Souza (2019-03-26 23:02:23) > GT VEBOX DISABLE is only 4 bits wide but it was using a 8 bits wide > mask, the remaning reserved bits is set to 0 causing 4 more > nonexistent VEBOX engines being detected as enabled, triggering the > BUG_ON() because of mismatch between vebox_mask and newly added > VEBOX_MASK(). > > [ 64.081621] [drm:intel_device_info_init_mmio [i915]] vdbox enable: 0005, > instances: 0005 > [ 64.081763] [drm:intel_device_info_init_mmio [i915]] vebox enable: 00f1, > instances: 0001 > [ 64.081825] intel_device_info_init_mmio:925 GEM_BUG_ON(vebox_mask != ({ > unsigned int first__ = (VECS0); unsigned int count__ = (2); > ((&(dev_priv)->__info)->engine_mask & (((~0UL) - (1UL << (first__)) + 1) & > (~0UL >> (64 - 1 - (first__ + count__ - 1) >> first__; })) > [ 64.082047] [ cut here ] > [ 64.082054] kernel BUG at drivers/gpu/drm/i915/intel_device_info.c:925! > > BSpec: 20680 > Fixes: 9511cb6481af ("drm/i915: Adding missing '; ' to ENGINE_INSTANCES") > Fixes: 26376a7e74d2 ("drm/i915/icl: Check for fused-off VDBOX and VEBOX > instances") Shooting the messenger, the fixes would be the incorrect VEBOX_DISABLE_MASK would it not? -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.IGT: failure for Device id consolidation
== Series Details == Series: Device id consolidation URL : https://patchwork.freedesktop.org/series/58561/ State : failure == Summary == CI Bug Log - changes from CI_DRM_5817_full -> Patchwork_12599_full Summary --- **FAILURE** Serious unknown changes coming with Patchwork_12599_full absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_12599_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. Possible new issues --- Here are the unknown changes that may have been introduced in Patchwork_12599_full: ### IGT changes ### Possible regressions * igt@gem_mmap_gtt@forked-medium-copy: - shard-iclb: NOTRUN -> INCOMPLETE Known issues Here are the changes found in Patchwork_12599_full that come from known issues: ### IGT changes ### Issues hit * igt@gem_busy@extended-bsd1: - shard-iclb: NOTRUN -> SKIP [fdo#109276] +3 * igt@gem_pread@stolen-display: - shard-iclb: NOTRUN -> SKIP [fdo#109277] * igt@gem_pwrite@big-cpu-fbr: - shard-skl: NOTRUN -> SKIP [fdo#109271] +180 * igt@gem_tiled_fence_blits@normal: - shard-iclb: PASS -> TIMEOUT [fdo#109673] * igt@gem_tiled_swapping@non-threaded: - shard-iclb: PASS -> FAIL [fdo#108686] * igt@i915_pm_lpsp@edp-panel-fitter: - shard-iclb: NOTRUN -> SKIP [fdo#109301] * igt@i915_pm_rps@min-max-config-loaded: - shard-iclb: NOTRUN -> FAIL [fdo#108059] * igt@i915_selftest@live_workarounds: - shard-iclb: PASS -> DMESG-FAIL [fdo#108954] * igt@kms_atomic_transition@2x-modeset-transitions-nonblocking: - shard-iclb: NOTRUN -> SKIP [fdo#109280] +8 * igt@kms_busy@extended-modeset-hang-newfb-render-b: - shard-kbl: PASS -> DMESG-WARN [fdo#110222] * igt@kms_busy@extended-modeset-hang-oldfb-render-d: - shard-skl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +15 * igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-c: - shard-skl: NOTRUN -> DMESG-WARN [fdo#110222] +1 - shard-kbl: NOTRUN -> DMESG-WARN [fdo#110222] * igt@kms_chamelium@dp-hpd-storm-disable: - shard-iclb: NOTRUN -> SKIP [fdo#109284] +1 * igt@kms_cursor_crc@cursor-512x512-offscreen: - shard-iclb: NOTRUN -> SKIP [fdo#109279] * igt@kms_cursor_crc@cursor-64x21-random: - shard-apl: PASS -> FAIL [fdo#103232] * igt@kms_cursor_legacy@cursor-vs-flip-atomic: - shard-iclb: PASS -> FAIL [fdo#103355] * igt@kms_fbcon_fbt@psr-suspend: - shard-skl: NOTRUN -> FAIL [fdo#103833] * igt@kms_flip@2x-dpms-vs-vblank-race-interruptible: - shard-kbl: NOTRUN -> SKIP [fdo#109271] +46 * igt@kms_flip@2x-flip-vs-rmfb-interruptible: - shard-iclb: NOTRUN -> SKIP [fdo#109274] +2 * igt@kms_flip@flip-vs-expired-vblank: - shard-skl: NOTRUN -> FAIL [fdo#105363] * igt@kms_force_connector_basic@force-connector-state: - shard-iclb: NOTRUN -> SKIP [fdo#109285] * igt@kms_frontbuffer_tracking@fbc-stridechange: - shard-iclb: PASS -> FAIL [fdo#103167] +3 * igt@kms_frontbuffer_tracking@psr-1p-primscrn-cur-indfb-onoff: - shard-iclb: PASS -> FAIL [fdo#109247] +6 * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-f: - shard-iclb: NOTRUN -> SKIP [fdo#109278] +1 * igt@kms_plane_alpha_blend@pipe-b-alpha-7efc: - shard-skl: NOTRUN -> FAIL [fdo#107815] / [fdo#108145] +1 * igt@kms_plane_alpha_blend@pipe-b-alpha-opaque-fb: - shard-skl: NOTRUN -> FAIL [fdo#108145] +2 * igt@kms_plane_scaling@pipe-c-scaler-with-pixel-format: - shard-glk: PASS -> SKIP [fdo#109271] / [fdo#109278] * igt@kms_psr2_su@frontbuffer: - shard-iclb: PASS -> SKIP [fdo#109642] * igt@kms_psr@psr2_cursor_blt: - shard-iclb: PASS -> SKIP [fdo#109441] +1 * igt@kms_rotation_crc@multiplane-rotation: - shard-kbl: PASS -> DMESG-FAIL [fdo#105763] * igt@kms_setmode@basic: - shard-kbl: PASS -> FAIL [fdo#99912] * igt@kms_universal_plane@disable-primary-vs-flip-pipe-c: - shard-kbl: PASS -> DMESG-WARN [fdo#103558] / [fdo#105602] +6 * igt@kms_universal_plane@disable-primary-vs-flip-pipe-d: - shard-kbl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +3 * igt@kms_vblank@pipe-b-ts-continuation-modeset: - shard-apl: PASS -> FAIL [fdo#104894] * igt@perf_pmu@rc6-runtime-pm: - shard-apl: NOTRUN -> FAIL [fdo#105010] * igt@prime_mmap@test_correct: - shard-iclb: PASS -> INCOMPLETE [fdo#110246] * igt@prime_nv_api@i915_nv_import_vs_close: - shard-apl: NOTRUN -> SKIP
[Intel-gfx] [PATCH] drm/i915/icl: Fix VEBOX mismatch BUG_ON()
GT VEBOX DISABLE is only 4 bits wide but it was using a 8 bits wide mask, the remaning reserved bits is set to 0 causing 4 more nonexistent VEBOX engines being detected as enabled, triggering the BUG_ON() because of mismatch between vebox_mask and newly added VEBOX_MASK(). [ 64.081621] [drm:intel_device_info_init_mmio [i915]] vdbox enable: 0005, instances: 0005 [ 64.081763] [drm:intel_device_info_init_mmio [i915]] vebox enable: 00f1, instances: 0001 [ 64.081825] intel_device_info_init_mmio:925 GEM_BUG_ON(vebox_mask != ({ unsigned int first__ = (VECS0); unsigned int count__ = (2); ((&(dev_priv)->__info)->engine_mask & (((~0UL) - (1UL << (first__)) + 1) & (~0UL >> (64 - 1 - (first__ + count__ - 1) >> first__; })) [ 64.082047] [ cut here ] [ 64.082054] kernel BUG at drivers/gpu/drm/i915/intel_device_info.c:925! BSpec: 20680 Fixes: 9511cb6481af ("drm/i915: Adding missing '; ' to ENGINE_INSTANCES") Fixes: 26376a7e74d2 ("drm/i915/icl: Check for fused-off VDBOX and VEBOX instances") Cc: Chris Wilson Cc: Tvrtko Ursulin Cc: Oscar Mateo Signed-off-by: José Roberto de Souza --- drivers/gpu/drm/i915/i915_reg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 362f483f8ab2..c866379a521b 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -2953,7 +2953,7 @@ enum i915_power_well_id { #define GEN11_GT_VEBOX_VDBOX_DISABLE _MMIO(0x9140) #define GEN11_GT_VDBOX_DISABLE_MASK 0xff #define GEN11_GT_VEBOX_DISABLE_SHIFT 16 -#define GEN11_GT_VEBOX_DISABLE_MASK (0xff << GEN11_GT_VEBOX_DISABLE_SHIFT) +#define GEN11_GT_VEBOX_DISABLE_MASK (0x0f << GEN11_GT_VEBOX_DISABLE_SHIFT) #define GEN11_EU_DISABLE _MMIO(0x9134) #define GEN11_EU_DIS_MASK 0xFF -- 2.21.0 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 3/4] drm: Kill drm_display_info.name
Hi Ville. On Tue, Mar 26, 2019 at 07:34:00PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > drm_display_info.name is only ever set by a few panel drveirs but drivers Nice clean-up! Sam ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 2/9] drm/i915: add HAS_FORCEWAKE flag to uncore
Quoting Michal Wajdeczko (2019-03-26 12:47:00) > On Mon, 25 Mar 2019 22:49:33 +0100, Daniele Ceraolo Spurio > wrote: > > > We have several cases where we don't have forcewake (older gens, GVT and > > planned display-only uncore), so, instead of checking every time against > > the various condition, save the info in a flag and use that. > > > > Note that this patch also change the behavior for gen5 with vpgu > > enabled, but this is not an issue since we don't support vgpu on gen5. > > > > v2: split out from previous path, fix check for missing case (Paulo) > > > > Signed-off-by: Daniele Ceraolo Spurio > > Cc: Paulo Zanoni > > Cc: Chris Wilson > > --- > > drivers/gpu/drm/i915/intel_uncore.c | 31 +++-- > > drivers/gpu/drm/i915/intel_uncore.h | 3 +++ > > 2 files changed, 24 insertions(+), 10 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/intel_uncore.c > > b/drivers/gpu/drm/i915/intel_uncore.c > > index 3f74889c4212..0259a61a745f 100644 > > --- a/drivers/gpu/drm/i915/intel_uncore.c > > +++ b/drivers/gpu/drm/i915/intel_uncore.c > > @@ -1391,7 +1391,7 @@ static void intel_uncore_fw_domains_init(struct > > intel_uncore *uncore) > > { > > struct drm_i915_private *i915 = uncore_to_i915(uncore); > > - if (INTEL_GEN(i915) <= 5 || intel_vgpu_active(i915)) > > + if (!(uncore->flags & UNCORE_HAS_FORCEWAKE)) > > return; > > if (INTEL_GEN(i915) >= 11) { > > @@ -1590,6 +1590,9 @@ int intel_uncore_init(struct intel_uncore *uncore) > > i915_check_vgpu(i915); > > + if (INTEL_GEN(i915) > 5 && !intel_vgpu_active(i915)) > > + uncore->flags |= UNCORE_HAS_FORCEWAKE; > > + > > intel_uncore_edram_detect(i915); > > intel_uncore_fw_domains_init(uncore); > > __intel_uncore_early_sanitize(uncore, 0); > > @@ -1598,12 +1601,14 @@ int intel_uncore_init(struct intel_uncore > > *uncore) > > uncore->pmic_bus_access_nb.notifier_call = > > i915_pmic_bus_access_notifier; > > - if (IS_GEN_RANGE(i915, 2, 4) || intel_vgpu_active(i915)) { > > - ASSIGN_WRITE_MMIO_VFUNCS(uncore, gen2); > > - ASSIGN_READ_MMIO_VFUNCS(uncore, gen2); > > - } else if (IS_GEN(i915, 5)) { > > - ASSIGN_WRITE_MMIO_VFUNCS(uncore, gen5); > > - ASSIGN_READ_MMIO_VFUNCS(uncore, gen5); > > + if (!(uncore->flags & UNCORE_HAS_FORCEWAKE)) { > > + if (IS_GEN(i915, 5)) { > > + ASSIGN_WRITE_MMIO_VFUNCS(uncore, gen5); > > + ASSIGN_READ_MMIO_VFUNCS(uncore, gen5); > > + } else { > > + ASSIGN_WRITE_MMIO_VFUNCS(uncore, gen2); > > + ASSIGN_READ_MMIO_VFUNCS(uncore, gen2); > > + } > > } else if (IS_GEN_RANGE(i915, 6, 7)) { > > ASSIGN_WRITE_MMIO_VFUNCS(uncore, gen6); > > @@ -1912,7 +1917,10 @@ intel_uncore_forcewake_for_read(struct > > drm_i915_private *dev_priv, > > } else if (INTEL_GEN(dev_priv) >= 6) { > > fw_domains = __gen6_reg_read_fw_domains(uncore, offset); > > } else { > > - WARN_ON(!IS_GEN_RANGE(dev_priv, 2, 5)); > > + /* on devices with FW we expect to hit one of the above cases > > */ > > + if (unlikely(uncore->flags & UNCORE_HAS_FORCEWAKE)) > > + MISSING_CASE(INTEL_GEN(dev_priv)); > > + > > fw_domains = 0; > > } > > @@ -1938,7 +1946,10 @@ intel_uncore_forcewake_for_write(struct > > drm_i915_private *dev_priv, > > } else if (IS_GEN_RANGE(dev_priv, 6, 7)) { > > fw_domains = FORCEWAKE_RENDER; > > } else { > > - WARN_ON(!IS_GEN_RANGE(dev_priv, 2, 5)); > > + /* on devices with FW we expect to hit one of the above cases > > */ > > + if (unlikely(uncore->flags & UNCORE_HAS_FORCEWAKE)) > > + MISSING_CASE(INTEL_GEN(dev_priv)); > > + > > fw_domains = 0; > > } > > @@ -1969,7 +1980,7 @@ intel_uncore_forcewake_for_reg(struct > > drm_i915_private *dev_priv, > > WARN_ON(!op); > > - if (intel_vgpu_active(dev_priv)) > > + if (!(dev_priv->uncore.flags & UNCORE_HAS_FORCEWAKE)) > > nit: as this condition is used in few places, maybe we can add nice helper: > > static inline bool intel_uncore_has_forcewake(struct intel_uncore *uncore) > { > return uncore->flags & UNCORE_HAS_FORCEWAKE; > } Did a quick pass to apply the nit and quieten checkpatch and pushed. Thanks, -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [CI,1/9] drm/i915: rename raw reg access functions
== Series Details == Series: series starting with [CI,1/9] drm/i915: rename raw reg access functions URL : https://patchwork.freedesktop.org/series/58604/ State : success == Summary == CI Bug Log - changes from CI_DRM_5818 -> Patchwork_12608 Summary --- **SUCCESS** No regressions found. External URL: https://patchwork.freedesktop.org/api/1.0/series/58604/revisions/1/mbox/ Known issues Here are the changes found in Patchwork_12608 that come from known issues: ### IGT changes ### Issues hit * igt@i915_selftest@live_contexts: - fi-bdw-gvtdvm: PASS -> DMESG-FAIL [fdo#110235 ] * igt@i915_selftest@live_execlists: - fi-apl-guc: PASS -> INCOMPLETE [fdo#103927] / [fdo#109720] * igt@i915_selftest@live_uncore: - fi-skl-gvtdvm: PASS -> DMESG-FAIL [fdo#110210] - fi-ivb-3770:PASS -> DMESG-FAIL [fdo#110210] * igt@kms_pipe_crc_basic@read-crc-pipe-a: - fi-byt-clapper: PASS -> FAIL [fdo#107362] * igt@runner@aborted: - fi-apl-guc: NOTRUN -> FAIL [fdo#108622] / [fdo#109720] Possible fixes * igt@i915_pm_rpm@basic-pci-d3-state: - fi-hsw-4770:SKIP [fdo#109271] -> PASS +2 * igt@kms_pipe_crc_basic@read-crc-pipe-a-frame-sequence: - fi-byt-clapper: FAIL [fdo#103191] / [fdo#107362] -> PASS Warnings * igt@i915_selftest@live_contexts: - fi-icl-u3: INCOMPLETE [fdo#108569] -> DMESG-FAIL [fdo#108569] [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191 [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927 [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362 [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569 [fdo#108622]: https://bugs.freedesktop.org/show_bug.cgi?id=108622 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720 [fdo#110210]: https://bugs.freedesktop.org/show_bug.cgi?id=110210 [fdo#110235 ]: https://bugs.freedesktop.org/show_bug.cgi?id=110235 Participating hosts (45 -> 36) -- Missing(9): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-j1900 fi-byt-squawks fi-bsw-cyan fi-gdg-551 fi-elk-e7500 fi-snb-2600 Build changes - * Linux: CI_DRM_5818 -> Patchwork_12608 CI_DRM_5818: de0e80842f3d103996e99cfe27f999690c2ee06e @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4905: a350b9f9f606296b1599c3617c8530a8985709e2 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_12608: bc3211904f72a56cfc1c8773037392dae11df94f @ git://anongit.freedesktop.org/gfx-ci/linux == Kernel 32bit build == Warning: Kernel 32bit buildtest failed: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12608/build_32bit.log CALLscripts/checksyscalls.sh CALLscripts/atomic/check-atomics.sh CHK include/generated/compile.h CC [M] drivers/gpu/drm/i915/intel_uc.o In file included from drivers/gpu/drm/i915/intel_guc.h:28:0, from drivers/gpu/drm/i915/intel_uc.h:27, from drivers/gpu/drm/i915/intel_uc.c:25: drivers/gpu/drm/i915/intel_uncore.h: In function ‘__raw_uncore_read64’: drivers/gpu/drm/i915/intel_uncore.h:257:9: error: implicit declaration of function ‘readq’; did you mean ‘readl’? [-Werror=implicit-function-declaration] return read##s__(uncore->regs + i915_mmio_reg_offset(reg)); \ ^ drivers/gpu/drm/i915/intel_uncore.h:269:1: note: in expansion of macro ‘__raw_read’ __raw_read(64, q) ^~ drivers/gpu/drm/i915/intel_uncore.h: In function ‘__raw_uncore_write64’: drivers/gpu/drm/i915/intel_uncore.h:264:2: error: implicit declaration of function ‘writeq’; did you mean ‘writel’? [-Werror=implicit-function-declaration] write##s__(val, uncore->regs + i915_mmio_reg_offset(reg)); \ ^ drivers/gpu/drm/i915/intel_uncore.h:274:1: note: in expansion of macro ‘__raw_write’ __raw_write(64, q) ^~~ cc1: all warnings being treated as errors scripts/Makefile.build:278: recipe for target 'drivers/gpu/drm/i915/intel_uc.o' failed make[5]: *** [drivers/gpu/drm/i915/intel_uc.o] Error 1 scripts/Makefile.build:489: recipe for target 'drivers/gpu/drm/i915' failed make[4]: *** [drivers/gpu/drm/i915] Error 2 scripts/Makefile.build:489: recipe for target 'drivers/gpu/drm' failed make[3]: *** [drivers/gpu/drm] Error 2 scripts/Makefile.build:489: recipe for target 'drivers/gpu' failed make[2]: *** [drivers/gpu] Error 2 /home/cidrm/kernel/Makefile:1046: recipe for target 'drivers' failed make[1]: *** [drivers] Error 2 Makefile:170: recipe for target 'sub-make' failed make: *** [sub-make] Error 2 == Linux commits == bc3211904f72 drm/i915: take a reference to uncore in the engine and use it 003222962ccd drm/i915: switch intel_wait_for_register to uncore 09af615477d2 drm/i915: intel_wait_for_register_fw to uncore 02c209860d4d
[Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [CI,1/9] drm/i915: rename raw reg access functions
== Series Details == Series: series starting with [CI,1/9] drm/i915: rename raw reg access functions URL : https://patchwork.freedesktop.org/series/58604/ State : warning == Summary == $ dim sparse origin/drm-tip Sparse version: v0.5.2 Commit: drm/i915: rename raw reg access functions -drivers/gpu/drm/i915/selftests/../i915_drv.h:3597:16: warning: expression using sizeof(void) +drivers/gpu/drm/i915/selftests/../i915_drv.h:3571:16: warning: expression using sizeof(void) Commit: drm/i915: add HAS_FORCEWAKE flag to uncore Okay! Commit: drm/i915: add uncore flags for unclaimed mmio Okay! Commit: drm/i915: take a ref to the rpm in the uncore structure Okay! Commit: drm/i915: switch uncore mmio funcs to use intel_uncore -drivers/gpu/drm/i915/selftests/../i915_drv.h:3571:16: warning: expression using sizeof(void) +drivers/gpu/drm/i915/selftests/../i915_drv.h:3566:16: warning: expression using sizeof(void) Commit: drm/i915: switch intel_uncore_forcewake_for_reg to intel_uncore Okay! Commit: drm/i915: intel_wait_for_register_fw to uncore Okay! Commit: drm/i915: switch intel_wait_for_register to uncore Okay! Commit: drm/i915: take a reference to uncore in the engine and use it Okay! ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [CI,1/9] drm/i915: rename raw reg access functions
== Series Details == Series: series starting with [CI,1/9] drm/i915: rename raw reg access functions URL : https://patchwork.freedesktop.org/series/58604/ State : warning == Summary == $ dim checkpatch origin/drm-tip 518022b1d8c7 drm/i915: rename raw reg access functions -:302: CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations #302: FILE: drivers/gpu/drm/i915/intel_uncore.h:232: +} +__raw_read(8, b) total: 0 errors, 0 warnings, 1 checks, 264 lines checked 9cb0c26b3438 drm/i915: add HAS_FORCEWAKE flag to uncore 578537728540 drm/i915: add uncore flags for unclaimed mmio db6d1bf4fef7 drm/i915: take a ref to the rpm in the uncore structure 3165d80fee26 drm/i915: switch uncore mmio funcs to use intel_uncore -:46: WARNING:LONG_LINE: line over 100 characters #46: FILE: drivers/gpu/drm/i915/i915_drv.h:3488: +#define I915_WRITE16_NOTRACE(reg__, val__) __I915_REG_OP(write16_notrace, dev_priv, (reg__), (val__)) -:231: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses #231: FILE: drivers/gpu/drm/i915/intel_uncore.h:278: +#define __uncore_read(name__, x__, s__, trace__) \ +static inline u##x__ intel_uncore_##name__(struct intel_uncore *uncore, \ + i915_reg_t reg) \ +{ \ + return uncore->funcs.mmio_read##s__(uncore, reg, (trace__)); \ +} -:277: WARNING:LINE_SPACING: Missing a blank line after declarations #277: FILE: drivers/gpu/drm/i915/intel_uncore.h:324: + u32 upper, lower, old_upper, loop = 0; + upper = intel_uncore_read(uncore, upper_reg); total: 1 errors, 2 warnings, 0 checks, 295 lines checked 02c209860d4d drm/i915: switch intel_uncore_forcewake_for_reg to intel_uncore 09af615477d2 drm/i915: intel_wait_for_register_fw to uncore 003222962ccd drm/i915: switch intel_wait_for_register to uncore bc3211904f72 drm/i915: take a reference to uncore in the engine and use it -:421: WARNING:LONG_LINE: line over 100 characters #421: FILE: drivers/gpu/drm/i915/intel_engine_cs.c:1345: + ENGINE_READ(engine, RING_CTL) & (RING_WAIT | RING_WAIT_SEMAPHORE) ? " [waiting]" : ""); -:1042: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'engine__' - possible side-effects? #1042: FILE: drivers/gpu/drm/i915/intel_ringbuffer.h:48: +#define __ENGINE_READ_OP(op__, engine__, reg__) \ + __ENGINE_REG_OP(op__, (engine__), reg__((engine__)->mmio_base)) -:1054: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'engine__' - possible side-effects? #1054: FILE: drivers/gpu/drm/i915/intel_ringbuffer.h:56: +#define ENGINE_READ64(engine__, lower_reg__, upper_reg__) \ + __ENGINE_REG_OP(read64_2x32, (engine__), \ + lower_reg__((engine__)->mmio_base), \ + upper_reg__((engine__)->mmio_base)) -:1061: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'engine__' - possible side-effects? #1061: FILE: drivers/gpu/drm/i915/intel_ringbuffer.h:61: +#define ENGINE_READ_IDX(engine__, reg__, idx__) \ + __ENGINE_REG_OP(read, (engine__), reg__((engine__)->mmio_base, (idx__))) -:1066: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'engine__' - possible side-effects? #1066: FILE: drivers/gpu/drm/i915/intel_ringbuffer.h:64: +#define __ENGINE_WRITE_OP(op__, engine__, reg__, val__) \ + __ENGINE_REG_OP(op__, (engine__), reg__((engine__)->mmio_base), (val__)) total: 0 errors, 1 warnings, 4 checks, 967 lines checked ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Adding missing '; ' to ENGINE_INSTANCES
== Series Details == Series: drm/i915: Adding missing '; ' to ENGINE_INSTANCES URL : https://patchwork.freedesktop.org/series/58599/ State : success == Summary == CI Bug Log - changes from CI_DRM_5818 -> Patchwork_12606 Summary --- **SUCCESS** No regressions found. External URL: https://patchwork.freedesktop.org/api/1.0/series/58599/revisions/1/mbox/ Known issues Here are the changes found in Patchwork_12606 that come from known issues: ### IGT changes ### Issues hit * igt@i915_pm_rpm@module-reload: - fi-skl-6770hq: PASS -> FAIL [fdo#108511] * igt@i915_selftest@live_contexts: - fi-bdw-gvtdvm: PASS -> DMESG-FAIL [fdo#110235 ] * igt@i915_selftest@live_execlists: - fi-apl-guc: PASS -> INCOMPLETE [fdo#103927] / [fdo#109720] * igt@kms_busy@basic-flip-b: - fi-gdg-551: PASS -> FAIL [fdo#103182] * igt@kms_frontbuffer_tracking@basic: - fi-byt-clapper: PASS -> FAIL [fdo#103167] * igt@runner@aborted: - fi-apl-guc: NOTRUN -> FAIL [fdo#108622] / [fdo#109720] Possible fixes * igt@i915_pm_rpm@basic-pci-d3-state: - fi-hsw-4770:SKIP [fdo#109271] -> PASS +2 * igt@kms_busy@basic-flip-a: - fi-gdg-551: FAIL [fdo#103182] -> PASS [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167 [fdo#103182]: https://bugs.freedesktop.org/show_bug.cgi?id=103182 [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927 [fdo#108511]: https://bugs.freedesktop.org/show_bug.cgi?id=108511 [fdo#108622]: https://bugs.freedesktop.org/show_bug.cgi?id=108622 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720 [fdo#110235 ]: https://bugs.freedesktop.org/show_bug.cgi?id=110235 Participating hosts (45 -> 36) -- Missing(9): fi-kbl-soraka fi-ilk-m540 fi-bsw-n3050 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-u3 fi-pnv-d510 fi-snb-2600 Build changes - * Linux: CI_DRM_5818 -> Patchwork_12606 CI_DRM_5818: de0e80842f3d103996e99cfe27f999690c2ee06e @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4905: a350b9f9f606296b1599c3617c8530a8985709e2 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_12606: c8194aaa11bd492d922be238bbe3c45013376024 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == c8194aaa11bd drm/i915: Adding missing '; ' to ENGINE_INSTANCES == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12606/ ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/fb-helper: Move modesetting code to drm_client
== Series Details == Series: drm/fb-helper: Move modesetting code to drm_client URL : https://patchwork.freedesktop.org/series/58597/ State : failure == Summary == Applying: drm/fb-helper: Remove unused gamma_size variable Applying: drm/fb-helper: dpms_legacy(): Only set on connectors in use Applying: drm/atomic: Move __drm_atomic_helper_disable_plane/set_config() Using index info to reconstruct a base tree... M drivers/gpu/drm/drm_atomic_helper.c Falling back to patching base and 3-way merge... Auto-merging drivers/gpu/drm/drm_atomic_helper.c CONFLICT (content): Merge conflict in drivers/gpu/drm/drm_atomic_helper.c error: Failed to merge in the changes. hint: Use 'git am --show-current-patch' to see the failed patch Patch failed at 0003 drm/atomic: Move __drm_atomic_helper_disable_plane/set_config() When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Adding missing '; ' to ENGINE_INSTANCES
== Series Details == Series: drm/i915: Adding missing '; ' to ENGINE_INSTANCES URL : https://patchwork.freedesktop.org/series/58599/ State : warning == Summary == $ dim checkpatch origin/drm-tip c8194aaa11bd drm/i915: Adding missing '; ' to ENGINE_INSTANCES -:10: WARNING:BAD_SIGN_OFF: Use a single space after Reported-by: #10: Reported-by: Tvrtko Ursulin -:46: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #46: FILE: drivers/gpu/drm/i915/intel_device_info.c:911: + DRM_DEBUG_DRIVER("vdbox enable: %04x, instances: %04lx\n", + vdbox_mask, VDBOX_MASK(dev_priv)); -:58: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #58: FILE: drivers/gpu/drm/i915/intel_device_info.c:924: + DRM_DEBUG_DRIVER("vebox enable: %04x, instances: %04lx\n", + vebox_mask, VEBOX_MASK(dev_priv)); total: 0 errors, 1 warnings, 2 checks, 33 lines checked ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 03/16] drm/atomic: Move __drm_atomic_helper_disable_plane/set_config()
On Tue, Mar 26, 2019 at 06:55:33PM +0100, Noralf Trønnes wrote: > Prepare for moving drm_fb_helper modesetting code to drm_client. > drm_client will be linked to drm.ko, so move > __drm_atomic_helper_disable_plane() and __drm_atomic_helper_set_config() > out of drm_kms_helper.ko. > > While at it, fix two checkpatch complaints: > - WARNING: Block comments use a trailing */ on a separate line > - CHECK: Alignment should match open parenthesis > > Signed-off-by: Noralf Trønnes Triggers a bit my midlayer ocd, but I can't come up with a better idea either. Reviewed-by: Daniel Vetter > --- > drivers/gpu/drm/drm_atomic.c| 168 > drivers/gpu/drm/drm_atomic_helper.c | 164 --- > drivers/gpu/drm/drm_crtc_internal.h | 5 + > include/drm/drm_atomic_helper.h | 4 - > 4 files changed, 173 insertions(+), 168 deletions(-) > > diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c > index 5eb40130fafb..c3a9ffbf2310 100644 > --- a/drivers/gpu/drm/drm_atomic.c > +++ b/drivers/gpu/drm/drm_atomic.c > @@ -1130,6 +1130,174 @@ int drm_atomic_nonblocking_commit(struct > drm_atomic_state *state) > } > EXPORT_SYMBOL(drm_atomic_nonblocking_commit); > > +/* just used from drm-client and atomic-helper: */ > +int __drm_atomic_helper_disable_plane(struct drm_plane *plane, > + struct drm_plane_state *plane_state) > +{ > + int ret; > + > + ret = drm_atomic_set_crtc_for_plane(plane_state, NULL); > + if (ret != 0) > + return ret; > + > + drm_atomic_set_fb_for_plane(plane_state, NULL); > + plane_state->crtc_x = 0; > + plane_state->crtc_y = 0; > + plane_state->crtc_w = 0; > + plane_state->crtc_h = 0; > + plane_state->src_x = 0; > + plane_state->src_y = 0; > + plane_state->src_w = 0; > + plane_state->src_h = 0; > + > + return 0; > +} > +EXPORT_SYMBOL(__drm_atomic_helper_disable_plane); > + > +static int update_output_state(struct drm_atomic_state *state, > +struct drm_mode_set *set) > +{ > + struct drm_device *dev = set->crtc->dev; > + struct drm_crtc *crtc; > + struct drm_crtc_state *new_crtc_state; > + struct drm_connector *connector; > + struct drm_connector_state *new_conn_state; > + int ret, i; > + > + ret = drm_modeset_lock(>mode_config.connection_mutex, > +state->acquire_ctx); > + if (ret) > + return ret; > + > + /* First disable all connectors on the target crtc. */ > + ret = drm_atomic_add_affected_connectors(state, set->crtc); > + if (ret) > + return ret; > + > + for_each_new_connector_in_state(state, connector, new_conn_state, i) { > + if (new_conn_state->crtc == set->crtc) { > + ret = drm_atomic_set_crtc_for_connector(new_conn_state, > + NULL); > + if (ret) > + return ret; > + > + /* Make sure legacy setCrtc always re-trains */ > + new_conn_state->link_status = DRM_LINK_STATUS_GOOD; > + } > + } > + > + /* Then set all connectors from set->connectors on the target crtc */ > + for (i = 0; i < set->num_connectors; i++) { > + new_conn_state = drm_atomic_get_connector_state(state, > + > set->connectors[i]); > + if (IS_ERR(new_conn_state)) > + return PTR_ERR(new_conn_state); > + > + ret = drm_atomic_set_crtc_for_connector(new_conn_state, > + set->crtc); > + if (ret) > + return ret; > + } > + > + for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) { > + /* > + * Don't update ->enable for the CRTC in the set_config request, > + * since a mismatch would indicate a bug in the upper layers. > + * The actual modeset code later on will catch any > + * inconsistencies here. > + */ > + if (crtc == set->crtc) > + continue; > + > + if (!new_crtc_state->connector_mask) { > + ret = drm_atomic_set_mode_prop_for_crtc(new_crtc_state, > + NULL); > + if (ret < 0) > + return ret; > + > + new_crtc_state->active = false; > + } > + } > + > + return 0; > +} > + > +/* just used from drm-client and atomic-helper: */ > +int __drm_atomic_helper_set_config(struct drm_mode_set *set, > +struct drm_atomic_state *state) > +{ > + struct drm_crtc_state *crtc_state; > + struct drm_plane_state *primary_state; > +
Re: [Intel-gfx] [PATCH 3/8] drm/i915/psr: Make all PSR register relative to mmio base
On Fri, 2019-03-22 at 10:27 -0700, Dhinakaran Pandiyan wrote: > On Fri, 2019-03-22 at 11:15 +0200, Jani Nikula wrote: > > On Thu, 21 Mar 2019, José Roberto de Souza > > wrote: > > > Right now it have a mix of PSR registers that are relative to PSR > > > mmio base and other register with a hardcoded address, lets keep > > > it > > > consistented and have it all relative to mmio base. > > > > This is not strictly limited to this patch, but an overall trend. > > The > > thing that really bugs me with this is losing more of the actual > > absolute mmio addresses from the file. When you're seeking to add a > > new > > register, you can't trivially grep for it in the file anymore. Not > > all > > of our register names match the spec (and the spec occasionally > > also > > changes register names) so being able to find the offset is > > important. I understand but for new gens BSpec is using relative address see BSpec 50583 and 50577 for example. > > Fully agreed. > > I think we can do something along the lines of > > #define _HSW_PSR_OFFSET BDW_EDP_PSR_BASE - HSW_PSR_PSR_BASE > #define _BDW_PSR_CTL 0x6f800 > > _MMIO_HSW_ADJUST(pipe, reg) IS_HASWELL(dev_priv) ? > MMIO_TRANS2((pipe), reg - > _HSW_PSR_OFFSET) :MMIO_TRANS2((pi > pe), reg) To MMIO_TRANS2() work we need to give the reg based on the first transcoder, what you think about this? #define _HSW_EDP_PSR_BASE 0x64000 /* _PSR_CTL_A to follow BSpec naming or we could keep _PSR_CTL_A */ #define _SRD_CTL_A 0x60800 #define _SRD_CTL_EDP0x6F800 #define EDP_PSR_CTL (_MMIO_TRANS2(dev_priv- >psr.transcoder, _SRD_CTL_A) - dev_priv->psr.mmio_base_adjust) intel_psr_enable_locked() if (IS_HASWELL(dev_priv)) dev_priv->psr.mmio_base_adjust = _SRD_CTL_EDP - _HSW_EDP_PSR_BASE; The only concern here it that _SRD_CTL_A(and the other registers conterparts) could give the understand that PSR could be enabled in regular transcoders what it not the case in current gens. > > #define EDP_PSR_CTL(pipe) _MMIO_HSW_ADJUST((pipe), _BDW_PSR_CTL) > > > I'd like at least BDW+ addresses to be in the code. > > -DK > > > When we added the macros that use ->pipe_offsets and > > ->trans_offsets, we > > took care to have at least one of the offsets in the file. I'm > > wondering > > if we could do something like that here as well. > > > > BR, > > Jani. > > > > > > > Cc: Dhinakaran Pandiyan > > > Cc: Rodrigo Vivi > > > Signed-off-by: José Roberto de Souza > > > --- > > > drivers/gpu/drm/i915/i915_reg.h | 11 --- > > > 1 file changed, 4 insertions(+), 7 deletions(-) > > > > > > diff --git a/drivers/gpu/drm/i915/i915_reg.h > > > b/drivers/gpu/drm/i915/i915_reg.h > > > index 28728399e607..e1ed2ba1c315 100644 > > > --- a/drivers/gpu/drm/i915/i915_reg.h > > > +++ b/drivers/gpu/drm/i915/i915_reg.h > > > @@ -4326,7 +4326,7 @@ enum { > > > #define EDP_PSR_DEBUG_MASK_DISP_REG_WRITE(1 << 16) /* > > > Reserved in > > > ICL+ */ > > > #define EDP_PSR_DEBUG_EXIT_ON_PIXEL_UNDERRUN (1 << 15) /* SKL+ > > > */ > > > > > > -#define EDP_PSR2_CTL _MMIO(0x6f900) > > > +#define EDP_PSR2_CTL _MMIO(dev_priv- > > > >psr.mmio_base + > > > 0x100) > > > #define EDP_PSR2_ENABLE(1 << 31) > > > #define EDP_SU_TRACK_ENABLE(1 << 30) > > > #define EDP_Y_COORDINATE_VALID (1 << 26) /* GLK and CNL+ */ > > > @@ -4344,7 +4344,7 @@ enum { > > > #define EDP_PSR2_IDLE_FRAME_MASK 0xf > > > #define EDP_PSR2_IDLE_FRAME_SHIFT 0 > > > > > > -#define PSR_EVENT_MMIO(0x6F848) > > > +#define PSR_EVENT_MMIO(dev_priv- > > > >psr.mmio_base + > > > 0x48) > > > #define PSR_EVENT_PSR2_WD_TIMER_EXPIRE (1 << 17) > > > #define PSR_EVENT_PSR2_DISABLED (1 << 16) > > > #define PSR_EVENT_SU_DIRTY_FIFO_UNDERRUN(1 << 15) > > > @@ -4362,14 +4362,11 @@ enum { > > > #define PSR_EVENT_LPSP_MODE_EXIT(1 << 1) > > > #define PSR_EVENT_PSR_DISABLE (1 << 0) > > > > > > -#define EDP_PSR2_STATUS _MMIO(0x6f940) > > > +#define EDP_PSR2_STATUS _MMIO(dev_priv- > > > >psr.mmio_base + > > > 0x140) > > > #define EDP_PSR2_STATUS_STATE_MASK (0xf << 28) > > > #define EDP_PSR2_STATUS_STATE_SHIFT28 > > > > > > -#define _PSR2_SU_STATUS_00x6F914 > > > -#define _PSR2_SU_STATUS_10x6F918 > > > -#define _PSR2_SU_STATUS_20x6F91C > > > -#define _PSR2_SU_STATUS(index) _MMIO(_PICK_EVEN((index > > > ), > > > _PSR2_SU_STATUS_0, _PSR2_SU_STATUS_1)) > > > +#define _PSR2_SU_STATUS(index) _MMIO(dev_priv- > > > >psr.mmio_base + > > > 0x114 + (index) * 4) > > > #define PSR2_SU_STATUS(frame)(_PSR2_SU_STATUS((frame > > > ) / 3)) > > > #define
[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/4] drm: Nuke unused drm_display_info.pixel_clock
== Series Details == Series: series starting with [1/4] drm: Nuke unused drm_display_info.pixel_clock URL : https://patchwork.freedesktop.org/series/58595/ State : success == Summary == CI Bug Log - changes from CI_DRM_5818 -> Patchwork_12605 Summary --- **SUCCESS** No regressions found. External URL: https://patchwork.freedesktop.org/api/1.0/series/58595/revisions/1/mbox/ Known issues Here are the changes found in Patchwork_12605 that come from known issues: ### IGT changes ### Issues hit * igt@i915_selftest@live_execlists: - fi-apl-guc: PASS -> INCOMPLETE [fdo#103927] / [fdo#109720] * igt@kms_frontbuffer_tracking@basic: - fi-byt-clapper: PASS -> FAIL [fdo#103167] * igt@kms_pipe_crc_basic@hang-read-crc-pipe-a: - fi-byt-clapper: PASS -> FAIL [fdo#103191] / [fdo#107362] * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b: - fi-byt-clapper: PASS -> FAIL [fdo#107362] * igt@runner@aborted: - fi-apl-guc: NOTRUN -> FAIL [fdo#108622] / [fdo#109720] Possible fixes * igt@i915_pm_rpm@basic-pci-d3-state: - fi-hsw-4770:SKIP [fdo#109271] -> PASS +2 * igt@kms_frontbuffer_tracking@basic: - fi-icl-u3: FAIL [fdo#103167] -> PASS * igt@kms_pipe_crc_basic@read-crc-pipe-a-frame-sequence: - fi-byt-clapper: FAIL [fdo#103191] / [fdo#107362] -> PASS Warnings * igt@i915_selftest@live_contexts: - fi-icl-u3: INCOMPLETE [fdo#108569] -> DMESG-FAIL [fdo#108569] [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167 [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191 [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927 [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362 [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569 [fdo#108622]: https://bugs.freedesktop.org/show_bug.cgi?id=108622 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720 Participating hosts (45 -> 37) -- Missing(8): fi-kbl-soraka fi-ilk-m540 fi-bdw-5557u fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-skl-iommu fi-snb-2600 Build changes - * Linux: CI_DRM_5818 -> Patchwork_12605 CI_DRM_5818: de0e80842f3d103996e99cfe27f999690c2ee06e @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4905: a350b9f9f606296b1599c3617c8530a8985709e2 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_12605: ef0c53b421c59a0320fae596b93a470384d8bbc9 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == ef0c53b421c5 drm/uapi: Remove unused DRM_DISPLAY_INFO_LEN 840d0813adcb drm: Kill drm_display_info.name a161e5f2c9fb drm: Fix tabs vs. spaces 4c3e655e64a9 drm: Nuke unused drm_display_info.pixel_clock == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12605/ ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 16/16] drm/vc4: Call drm_dev_register() after all setup is done
On Tue, Mar 26, 2019 at 06:55:46PM +0100, Noralf Trønnes wrote: > drm_dev_register() initializes internal clients like bootsplash as the > last thing it does, so all setup needs to be done at this point. > > Fix by calling vc4_kms_load() before registering. > Also check the error code returned from that function. > > Cc: Eric Anholt > Signed-off-by: Noralf Trønnes Looks like this has been slightly backwards ever since vc4 landed. I guess would have needed the split between kms setup and fbdev setup (which is now done with the generic fbdev). Reviewed-by: Daniel Vetter > --- > drivers/gpu/drm/vc4/vc4_drv.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c > index 4daf44fd4548..ba87b2dfa767 100644 > --- a/drivers/gpu/drm/vc4/vc4_drv.c > +++ b/drivers/gpu/drm/vc4/vc4_drv.c > @@ -280,11 +280,13 @@ static int vc4_drm_bind(struct device *dev) > > drm_fb_helper_remove_conflicting_framebuffers(NULL, "vc4drmfb", false); > > - ret = drm_dev_register(drm, 0); > + ret = vc4_kms_load(drm); > if (ret < 0) > goto unbind_all; > > - vc4_kms_load(drm); > + ret = drm_dev_register(drm, 0); > + if (ret < 0) > + goto unbind_all; > > drm_fbdev_generic_setup(drm, 16); > > -- > 2.20.1 > > ___ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Update size upon return from GEM_CREATE (rev2)
== Series Details == Series: drm/i915: Update size upon return from GEM_CREATE (rev2) URL : https://patchwork.freedesktop.org/series/58592/ State : success == Summary == CI Bug Log - changes from CI_DRM_5818 -> Patchwork_12604 Summary --- **SUCCESS** No regressions found. External URL: https://patchwork.freedesktop.org/api/1.0/series/58592/revisions/2/mbox/ Known issues Here are the changes found in Patchwork_12604 that come from known issues: ### IGT changes ### Issues hit * igt@gem_exec_suspend@basic-s4-devices: - fi-blb-e6850: PASS -> INCOMPLETE [fdo#107718] * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b: - fi-byt-clapper: PASS -> FAIL [fdo#103191] / [fdo#107362] Possible fixes * igt@i915_pm_rpm@basic-pci-d3-state: - fi-hsw-4770:SKIP [fdo#109271] -> PASS +2 Warnings * igt@i915_selftest@live_contexts: - fi-icl-u3: INCOMPLETE [fdo#108569] -> DMESG-FAIL [fdo#108569] [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191 [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362 [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718 [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 Participating hosts (45 -> 37) -- Missing(8): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-gdg-551 fi-skl-6600u fi-snb-2600 Build changes - * Linux: CI_DRM_5818 -> Patchwork_12604 CI_DRM_5818: de0e80842f3d103996e99cfe27f999690c2ee06e @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4905: a350b9f9f606296b1599c3617c8530a8985709e2 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_12604: 6fac14bf9f601f86efb6e520e8de5df4efe81e7f @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 6fac14bf9f60 drm/i915: Update size upon return from GEM_CREATE == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12604/ ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [CI 5/9] drm/i915: switch uncore mmio funcs to use intel_uncore
From: Daniele Ceraolo Spurio The full read/write ops can now work on the intel_uncore struct. Introduce intel_uncore_read/write functions working on intel_uncore and switch the I915_READ/WRITE macro to internally call those. v2: no change v3: add intel_uncore_read/write functions (Chris), update commit msg Signed-off-by: Daniele Ceraolo Spurio Cc: Paulo Zanoni Cc: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190325214940.23632-6-daniele.ceraolospu...@intel.com --- drivers/gpu/drm/i915/i915_drv.h | 49 - drivers/gpu/drm/i915/intel_uncore.c | 18 ++-- drivers/gpu/drm/i915/intel_uncore.h | 106 +-- drivers/gpu/drm/i915/selftests/mock_uncore.c | 4 +- 4 files changed, 130 insertions(+), 47 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 681bcbd5c06b..b8df3eb28d35 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -3476,18 +3476,21 @@ static inline u64 intel_rc6_residency_us(struct drm_i915_private *dev_priv, return DIV_ROUND_UP_ULL(intel_rc6_residency_ns(dev_priv, reg), 1000); } -#define I915_READ8(reg) dev_priv->uncore.funcs.mmio_readb(dev_priv, (reg), true) -#define I915_WRITE8(reg, val) dev_priv->uncore.funcs.mmio_writeb(dev_priv, (reg), (val), true) +#define __I915_REG_OP(op__, dev_priv__, ...) \ + intel_uncore_##op__(&(dev_priv__)->uncore, __VA_ARGS__) -#define I915_READ16(reg) dev_priv->uncore.funcs.mmio_readw(dev_priv, (reg), true) -#define I915_WRITE16(reg, val) dev_priv->uncore.funcs.mmio_writew(dev_priv, (reg), (val), true) -#define I915_READ16_NOTRACE(reg) dev_priv->uncore.funcs.mmio_readw(dev_priv, (reg), false) -#define I915_WRITE16_NOTRACE(reg, val) dev_priv->uncore.funcs.mmio_writew(dev_priv, (reg), (val), false) +#define I915_READ8(reg__)__I915_REG_OP(read8, dev_priv, (reg__)) +#define I915_WRITE8(reg__, val__) __I915_REG_OP(write8, dev_priv, (reg__), (val__)) -#define I915_READ(reg) dev_priv->uncore.funcs.mmio_readl(dev_priv, (reg), true) -#define I915_WRITE(reg, val) dev_priv->uncore.funcs.mmio_writel(dev_priv, (reg), (val), true) -#define I915_READ_NOTRACE(reg) dev_priv->uncore.funcs.mmio_readl(dev_priv, (reg), false) -#define I915_WRITE_NOTRACE(reg, val) dev_priv->uncore.funcs.mmio_writel(dev_priv, (reg), (val), false) +#define I915_READ16(reg__)__I915_REG_OP(read16, dev_priv, (reg__)) +#define I915_WRITE16(reg__, val__) __I915_REG_OP(write16, dev_priv, (reg__), (val__)) +#define I915_READ16_NOTRACE(reg__)__I915_REG_OP(read16_notrace, dev_priv, (reg__)) +#define I915_WRITE16_NOTRACE(reg__, val__) __I915_REG_OP(write16_notrace, dev_priv, (reg__), (val__)) + +#define I915_READ(reg__)__I915_REG_OP(read, dev_priv, (reg__)) +#define I915_WRITE(reg__, val__) __I915_REG_OP(write, dev_priv, (reg__), (val__)) +#define I915_READ_NOTRACE(reg__)__I915_REG_OP(read_notrace, dev_priv, (reg__)) +#define I915_WRITE_NOTRACE(reg__, val__) __I915_REG_OP(write_notrace, dev_priv, (reg__), (val__)) /* Be very careful with read/write 64-bit values. On 32-bit machines, they * will be implemented using 2 32-bit writes in an arbitrary order with @@ -3503,20 +3506,12 @@ static inline u64 intel_rc6_residency_us(struct drm_i915_private *dev_priv, * * You have been warned. */ -#define I915_READ64(reg) dev_priv->uncore.funcs.mmio_readq(dev_priv, (reg), true) - -#define I915_READ64_2x32(lower_reg, upper_reg) ({ \ - u32 upper, lower, old_upper, loop = 0; \ - upper = I915_READ(upper_reg); \ - do {\ - old_upper = upper; \ - lower = I915_READ(lower_reg); \ - upper = I915_READ(upper_reg); \ - } while (upper != old_upper && loop++ < 2); \ - (u64)upper << 32 | lower; }) +#define I915_READ64(reg__) __I915_REG_OP(read64, dev_priv, (reg__)) +#define I915_READ64_2x32(lower_reg__, upper_reg__) \ + __I915_REG_OP(read64_2x32, dev_priv, (lower_reg__), (upper_reg__)) -#define POSTING_READ(reg) (void)I915_READ_NOTRACE(reg) -#define POSTING_READ16(reg)(void)I915_READ16_NOTRACE(reg) +#define POSTING_READ(reg__)__I915_REG_OP(posting_read, dev_priv, (reg__)) +#define POSTING_READ16(reg__) __I915_REG_OP(posting_read16, dev_priv, (reg__)) /* These are untraced mmio-accessors that are only valid to be used inside * critical sections, such as inside IRQ handlers, where forcewake is explicitly @@ -3544,10 +3539,10 @@ static inline u64 intel_rc6_residency_us(struct drm_i915_private *dev_priv, * therefore generally be serialised, by either the
[Intel-gfx] [CI 9/9] drm/i915: take a reference to uncore in the engine and use it
From: Daniele Ceraolo Spurio A few advantages: - Prepares us for the planned split of display uncore from GT uncore - Improves our engine-centric view of the world in the engine code and allows us to avoid jumping back to dev_priv. - Allows us to wrap accesses to engine register in nice macros that automatically pick the right mmio base. Signed-off-by: Daniele Ceraolo Spurio Cc: Paulo Zanoni Cc: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190325214940.23632-10-daniele.ceraolospu...@intel.com --- drivers/gpu/drm/i915/gvt/handlers.c | 2 +- drivers/gpu/drm/i915/i915_debugfs.c | 2 +- drivers/gpu/drm/i915/i915_gpu_error.c | 42 +++--- drivers/gpu/drm/i915/i915_reg.h | 16 +-- drivers/gpu/drm/i915/i915_reset.c | 13 +- drivers/gpu/drm/i915/intel_engine_cs.c| 134 ++- drivers/gpu/drm/i915/intel_engine_types.h | 2 + drivers/gpu/drm/i915/intel_hangcheck.c| 4 +- drivers/gpu/drm/i915/intel_lrc.c | 21 ++- drivers/gpu/drm/i915/intel_lrc.h | 22 +-- drivers/gpu/drm/i915/intel_ringbuffer.c | 156 +++--- drivers/gpu/drm/i915/intel_ringbuffer.h | 45 +-- drivers/gpu/drm/i915/intel_uncore.c | 2 +- 13 files changed, 243 insertions(+), 218 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt/handlers.c b/drivers/gpu/drm/i915/gvt/handlers.c index b596cb42e24e..dbc749617922 100644 --- a/drivers/gpu/drm/i915/gvt/handlers.c +++ b/drivers/gpu/drm/i915/gvt/handlers.c @@ -1848,7 +1848,7 @@ static int init_generic_mmio_info(struct intel_gvt *gvt) MMIO_DH(GEN7_SC_INSTDONE, D_BDW_PLUS, mmio_read_from_hw, NULL); MMIO_GM_RDR(_MMIO(0x2148), D_ALL, NULL, NULL); - MMIO_GM_RDR(CCID, D_ALL, NULL, NULL); + MMIO_GM_RDR(CCID(RENDER_RING_BASE), D_ALL, NULL, NULL); MMIO_GM_RDR(_MMIO(0x12198), D_ALL, NULL, NULL); MMIO_D(GEN7_CXT_SIZE, D_ALL); diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 47bf07a59b5e..bb2c16c439ea 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -880,7 +880,7 @@ static int i915_interrupt_info(struct seq_file *m, void *data) for_each_engine(engine, dev_priv, id) { seq_printf(m, "Graphics Interrupt mask (%s): %08x\n", - engine->name, I915_READ_IMR(engine)); + engine->name, ENGINE_READ(engine, RING_IMR)); } } diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c index a9557f92756f..a2a98ccda421 100644 --- a/drivers/gpu/drm/i915/i915_gpu_error.c +++ b/drivers/gpu/drm/i915/i915_gpu_error.c @@ -1136,7 +1136,7 @@ static void error_record_engine_registers(struct i915_gpu_state *error, struct drm_i915_private *dev_priv = engine->i915; if (INTEL_GEN(dev_priv) >= 6) { - ee->rc_psmi = I915_READ(RING_PSMI_CTL(engine->mmio_base)); + ee->rc_psmi = ENGINE_READ(engine, RING_PSMI_CTL); if (INTEL_GEN(dev_priv) >= 8) ee->fault_reg = I915_READ(GEN8_RING_FAULT_REG); else @@ -1144,32 +1144,32 @@ static void error_record_engine_registers(struct i915_gpu_state *error, } if (INTEL_GEN(dev_priv) >= 4) { - ee->faddr = I915_READ(RING_DMA_FADD(engine->mmio_base)); - ee->ipeir = I915_READ(RING_IPEIR(engine->mmio_base)); - ee->ipehr = I915_READ(RING_IPEHR(engine->mmio_base)); - ee->instps = I915_READ(RING_INSTPS(engine->mmio_base)); - ee->bbaddr = I915_READ(RING_BBADDR(engine->mmio_base)); + ee->faddr = ENGINE_READ(engine, RING_DMA_FADD); + ee->ipeir = ENGINE_READ(engine, RING_IPEIR); + ee->ipehr = ENGINE_READ(engine, RING_IPEHR); + ee->instps = ENGINE_READ(engine, RING_INSTPS); + ee->bbaddr = ENGINE_READ(engine, RING_BBADDR); if (INTEL_GEN(dev_priv) >= 8) { - ee->faddr |= (u64) I915_READ(RING_DMA_FADD_UDW(engine->mmio_base)) << 32; - ee->bbaddr |= (u64) I915_READ(RING_BBADDR_UDW(engine->mmio_base)) << 32; + ee->faddr |= (u64)ENGINE_READ(engine, RING_DMA_FADD_UDW) << 32; + ee->bbaddr |= (u64)ENGINE_READ(engine, RING_BBADDR_UDW) << 32; } - ee->bbstate = I915_READ(RING_BBSTATE(engine->mmio_base)); + ee->bbstate = ENGINE_READ(engine, RING_BBSTATE); } else { - ee->faddr = I915_READ(DMA_FADD_I8XX); - ee->ipeir = I915_READ(IPEIR); - ee->ipehr = I915_READ(IPEHR); + ee->faddr = ENGINE_READ(engine, DMA_FADD_I8XX); + ee->ipeir = ENGINE_READ(engine,
[Intel-gfx] [CI 3/9] drm/i915: add uncore flags for unclaimed mmio
From: Daniele Ceraolo Spurio Save the HW capabilities to avoid having to jump back to dev_priv every time. Signed-off-by: Daniele Ceraolo Spurio Cc: Paulo Zanoni Cc: Chris Wilson Reviewed-by: Paulo Zanoni Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190325214940.23632-4-daniele.ceraolospu...@intel.com --- drivers/gpu/drm/i915/i915_drv.c | 4 +- drivers/gpu/drm/i915/intel_display.c | 2 +- drivers/gpu/drm/i915/intel_hangcheck.c| 2 +- drivers/gpu/drm/i915/intel_uncore.c | 57 ++- drivers/gpu/drm/i915/intel_uncore.h | 25 +++- drivers/gpu/drm/i915/selftests/intel_uncore.c | 15 ++--- 6 files changed, 65 insertions(+), 40 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index d3df0ebaa09c..622b175b05fd 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -2887,7 +2887,7 @@ static int intel_runtime_suspend(struct device *kdev) enable_rpm_wakeref_asserts(dev_priv); intel_runtime_pm_cleanup(dev_priv); - if (intel_uncore_arm_unclaimed_mmio_detection(dev_priv)) + if (intel_uncore_arm_unclaimed_mmio_detection(_priv->uncore)) DRM_ERROR("Unclaimed access detected prior to suspending\n"); dev_priv->runtime_pm.suspended = true; @@ -2941,7 +2941,7 @@ static int intel_runtime_resume(struct device *kdev) intel_opregion_notify_adapter(dev_priv, PCI_D0); dev_priv->runtime_pm.suspended = false; - if (intel_uncore_unclaimed_mmio(dev_priv)) + if (intel_uncore_unclaimed_mmio(_priv->uncore)) DRM_DEBUG_DRIVER("Unclaimed access during suspend, bios?\n"); if (INTEL_GEN(dev_priv) >= 11) { diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 1a8617f5e2e4..61c7bbd066e3 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -13533,7 +13533,7 @@ static void intel_atomic_commit_tail(struct drm_atomic_state *state) * so enable debugging for the next modeset - and hope we catch * the culprit. */ - intel_uncore_arm_unclaimed_mmio_detection(dev_priv); + intel_uncore_arm_unclaimed_mmio_detection(_priv->uncore); intel_display_power_put(dev_priv, POWER_DOMAIN_MODESET, wakeref); } diff --git a/drivers/gpu/drm/i915/intel_hangcheck.c b/drivers/gpu/drm/i915/intel_hangcheck.c index 57ed49dc19c4..125662c64934 100644 --- a/drivers/gpu/drm/i915/intel_hangcheck.c +++ b/drivers/gpu/drm/i915/intel_hangcheck.c @@ -270,7 +270,7 @@ static void i915_hangcheck_elapsed(struct work_struct *work) * periodically arm the mmio checker to see if we are triggering * any invalid access. */ - intel_uncore_arm_unclaimed_mmio_detection(dev_priv); + intel_uncore_arm_unclaimed_mmio_detection(_priv->uncore); for_each_engine(engine, dev_priv, id) { struct hangcheck hc; diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c index 6ea6351f5123..d7ce80cb55d8 100644 --- a/drivers/gpu/drm/i915/intel_uncore.c +++ b/drivers/gpu/drm/i915/intel_uncore.c @@ -509,18 +509,17 @@ gen6_check_for_fifo_debug(struct intel_uncore *uncore) } static bool -check_for_unclaimed_mmio(struct drm_i915_private *dev_priv) +check_for_unclaimed_mmio(struct intel_uncore *uncore) { - struct intel_uncore *uncore = _priv->uncore; bool ret = false; - if (HAS_FPGA_DBG_UNCLAIMED(dev_priv)) + if (intel_uncore_has_fpga_dbg_unclaimed(uncore)) ret |= fpga_check_for_unclaimed_mmio(uncore); - if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) + if (intel_uncore_has_dbg_unclaimed(uncore)) ret |= vlv_check_for_unclaimed_mmio(uncore); - if (IS_GEN_RANGE(dev_priv, 6, 7)) + if (intel_uncore_has_fifo(uncore)) ret |= gen6_check_for_fifo_debug(uncore); return ret; @@ -529,14 +528,12 @@ check_for_unclaimed_mmio(struct drm_i915_private *dev_priv) static void __intel_uncore_early_sanitize(struct intel_uncore *uncore, unsigned int restore_forcewake) { - struct drm_i915_private *i915 = uncore_to_i915(uncore); - /* clear out unclaimed reg detection bit */ - if (check_for_unclaimed_mmio(i915)) + if (check_for_unclaimed_mmio(uncore)) DRM_DEBUG("unclaimed mmio detected on uncore init, clearing\n"); /* WaDisableShadowRegForCpd:chv */ - if (IS_CHERRYVIEW(i915)) { + if (IS_CHERRYVIEW(uncore_to_i915(uncore))) { __raw_uncore_write32(uncore, GTFIFOCTL, __raw_uncore_read32(uncore, GTFIFOCTL) | GT_FIFO_CTL_BLOCK_ALL_POLICY_STALL | @@
[Intel-gfx] [CI 6/9] drm/i915: switch intel_uncore_forcewake_for_reg to intel_uncore
From: Daniele Ceraolo Spurio The intel_uncore structure is the owner of FW, so subclass the function to it. While at it, use a local uncore var and switch to the new read/write functions where it makes sense. Signed-off-by: Daniele Ceraolo Spurio Cc: Paulo Zanoni Cc: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190325214940.23632-7-daniele.ceraolospu...@intel.com --- drivers/gpu/drm/i915/gvt/mmio_context.c | 11 +++--- drivers/gpu/drm/i915/intel_engine_cs.c| 21 +- drivers/gpu/drm/i915/intel_guc.c | 2 +- drivers/gpu/drm/i915/intel_pm.c | 13 --- drivers/gpu/drm/i915/intel_uncore.c | 38 +-- drivers/gpu/drm/i915/intel_uncore.h | 2 +- drivers/gpu/drm/i915/intel_workarounds.c | 2 +- drivers/gpu/drm/i915/selftests/intel_uncore.c | 2 +- 8 files changed, 47 insertions(+), 44 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt/mmio_context.c b/drivers/gpu/drm/i915/gvt/mmio_context.c index a00a807a1d55..76630fbe51b6 100644 --- a/drivers/gpu/drm/i915/gvt/mmio_context.c +++ b/drivers/gpu/drm/i915/gvt/mmio_context.c @@ -327,6 +327,7 @@ int intel_vgpu_restore_inhibit_context(struct intel_vgpu *vgpu, static void handle_tlb_pending_event(struct intel_vgpu *vgpu, int ring_id) { struct drm_i915_private *dev_priv = vgpu->gvt->dev_priv; + struct intel_uncore *uncore = _priv->uncore; struct intel_vgpu_submission *s = >submission; enum forcewake_domains fw; i915_reg_t reg; @@ -351,21 +352,21 @@ static void handle_tlb_pending_event(struct intel_vgpu *vgpu, int ring_id) * otherwise device can go to RC6 state and interrupt invalidation * process */ - fw = intel_uncore_forcewake_for_reg(dev_priv, reg, + fw = intel_uncore_forcewake_for_reg(uncore, reg, FW_REG_READ | FW_REG_WRITE); if (ring_id == RCS0 && INTEL_GEN(dev_priv) >= 9) fw |= FORCEWAKE_RENDER; - intel_uncore_forcewake_get(_priv->uncore, fw); + intel_uncore_forcewake_get(uncore, fw); - I915_WRITE_FW(reg, 0x1); + intel_uncore_write_fw(uncore, reg, 0x1); - if (wait_for_atomic((I915_READ_FW(reg) == 0), 50)) + if (wait_for_atomic((intel_uncore_read_fw(uncore, reg) == 0), 50)) gvt_vgpu_err("timeout in invalidate ring (%d) tlb\n", ring_id); else vgpu_vreg_t(vgpu, reg) = 0; - intel_uncore_forcewake_put(_priv->uncore, fw); + intel_uncore_forcewake_put(uncore, fw); gvt_dbg_core("invalidate TLB for ring %d\n", ring_id); } diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c index c5b417327132..eb0fe9a58481 100644 --- a/drivers/gpu/drm/i915/intel_engine_cs.c +++ b/drivers/gpu/drm/i915/intel_engine_cs.c @@ -888,6 +888,7 @@ static inline u32 read_subslice_reg(struct drm_i915_private *dev_priv, int slice, int subslice, i915_reg_t reg) { + struct intel_uncore *uncore = _priv->uncore; u32 mcr_slice_subslice_mask; u32 mcr_slice_subslice_select; u32 default_mcr_s_ss_select; @@ -909,33 +910,33 @@ read_subslice_reg(struct drm_i915_private *dev_priv, int slice, default_mcr_s_ss_select = intel_calculate_mcr_s_ss_select(dev_priv); - fw_domains = intel_uncore_forcewake_for_reg(dev_priv, reg, + fw_domains = intel_uncore_forcewake_for_reg(uncore, reg, FW_REG_READ); - fw_domains |= intel_uncore_forcewake_for_reg(dev_priv, + fw_domains |= intel_uncore_forcewake_for_reg(uncore, GEN8_MCR_SELECTOR, FW_REG_READ | FW_REG_WRITE); - spin_lock_irq(_priv->uncore.lock); - intel_uncore_forcewake_get__locked(_priv->uncore, fw_domains); + spin_lock_irq(>lock); + intel_uncore_forcewake_get__locked(uncore, fw_domains); - mcr = I915_READ_FW(GEN8_MCR_SELECTOR); + mcr = intel_uncore_read_fw(uncore, GEN8_MCR_SELECTOR); WARN_ON_ONCE((mcr & mcr_slice_subslice_mask) != default_mcr_s_ss_select); mcr &= ~mcr_slice_subslice_mask; mcr |= mcr_slice_subslice_select; - I915_WRITE_FW(GEN8_MCR_SELECTOR, mcr); + intel_uncore_write_fw(uncore, GEN8_MCR_SELECTOR, mcr); - ret = I915_READ_FW(reg); + ret = intel_uncore_read_fw(uncore, reg); mcr &= ~mcr_slice_subslice_mask; mcr |= default_mcr_s_ss_select; - I915_WRITE_FW(GEN8_MCR_SELECTOR, mcr); + intel_uncore_write_fw(uncore, GEN8_MCR_SELECTOR, mcr); - intel_uncore_forcewake_put__locked(_priv->uncore, fw_domains); - spin_unlock_irq(_priv->uncore.lock); + intel_uncore_forcewake_put__locked(uncore, fw_domains); +
[Intel-gfx] [CI 2/9] drm/i915: add HAS_FORCEWAKE flag to uncore
From: Daniele Ceraolo Spurio We have several cases where we don't have forcewake (older gens, GVT and planned display-only uncore), so, instead of checking every time against the various condition, save the info in a flag and use that. Note that this patch also change the behavior for gen5 with vpgu enabled, but this is not an issue since we don't support vgpu on gen5. v2: split out from previous path, fix check for missing case (Paulo) v3: Inline helper for clarity in testing flags Signed-off-by: Daniele Ceraolo Spurio Cc: Paulo Zanoni Cc: Chris Wilson Reviewed-by: Paulo Zanoni Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190325214940.23632-3-daniele.ceraolospu...@intel.com --- drivers/gpu/drm/i915/intel_uncore.c | 31 +++-- drivers/gpu/drm/i915/intel_uncore.h | 9 + 2 files changed, 30 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c index 02341c189803..6ea6351f5123 100644 --- a/drivers/gpu/drm/i915/intel_uncore.c +++ b/drivers/gpu/drm/i915/intel_uncore.c @@ -1391,7 +1391,7 @@ static void intel_uncore_fw_domains_init(struct intel_uncore *uncore) { struct drm_i915_private *i915 = uncore_to_i915(uncore); - if (INTEL_GEN(i915) <= 5 || intel_vgpu_active(i915)) + if (!intel_uncore_has_forcewake(uncore)) return; if (INTEL_GEN(i915) >= 11) { @@ -1590,6 +1590,9 @@ int intel_uncore_init(struct intel_uncore *uncore) i915_check_vgpu(i915); + if (INTEL_GEN(i915) > 5 && !intel_vgpu_active(i915)) + uncore->flags |= UNCORE_HAS_FORCEWAKE; + intel_uncore_edram_detect(i915); intel_uncore_fw_domains_init(uncore); __intel_uncore_early_sanitize(uncore, 0); @@ -1598,12 +1601,14 @@ int intel_uncore_init(struct intel_uncore *uncore) uncore->pmic_bus_access_nb.notifier_call = i915_pmic_bus_access_notifier; - if (IS_GEN_RANGE(i915, 2, 4) || intel_vgpu_active(i915)) { - ASSIGN_WRITE_MMIO_VFUNCS(uncore, gen2); - ASSIGN_READ_MMIO_VFUNCS(uncore, gen2); - } else if (IS_GEN(i915, 5)) { - ASSIGN_WRITE_MMIO_VFUNCS(uncore, gen5); - ASSIGN_READ_MMIO_VFUNCS(uncore, gen5); + if (!intel_uncore_has_forcewake(uncore)) { + if (IS_GEN(i915, 5)) { + ASSIGN_WRITE_MMIO_VFUNCS(uncore, gen5); + ASSIGN_READ_MMIO_VFUNCS(uncore, gen5); + } else { + ASSIGN_WRITE_MMIO_VFUNCS(uncore, gen2); + ASSIGN_READ_MMIO_VFUNCS(uncore, gen2); + } } else if (IS_GEN_RANGE(i915, 6, 7)) { ASSIGN_WRITE_MMIO_VFUNCS(uncore, gen6); @@ -1912,7 +1917,10 @@ intel_uncore_forcewake_for_read(struct drm_i915_private *dev_priv, } else if (INTEL_GEN(dev_priv) >= 6) { fw_domains = __gen6_reg_read_fw_domains(uncore, offset); } else { - WARN_ON(!IS_GEN_RANGE(dev_priv, 2, 5)); + /* on devices with FW we expect to hit one of the above cases */ + if (intel_uncore_has_forcewake(uncore)) + MISSING_CASE(INTEL_GEN(dev_priv)); + fw_domains = 0; } @@ -1938,7 +1946,10 @@ intel_uncore_forcewake_for_write(struct drm_i915_private *dev_priv, } else if (IS_GEN_RANGE(dev_priv, 6, 7)) { fw_domains = FORCEWAKE_RENDER; } else { - WARN_ON(!IS_GEN_RANGE(dev_priv, 2, 5)); + /* on devices with FW we expect to hit one of the above cases */ + if (intel_uncore_has_forcewake(uncore)) + MISSING_CASE(INTEL_GEN(dev_priv)); + fw_domains = 0; } @@ -1969,7 +1980,7 @@ intel_uncore_forcewake_for_reg(struct drm_i915_private *dev_priv, WARN_ON(!op); - if (intel_vgpu_active(dev_priv)) + if (!intel_uncore_has_forcewake(_priv->uncore)) return 0; if (op & FW_REG_READ) diff --git a/drivers/gpu/drm/i915/intel_uncore.h b/drivers/gpu/drm/i915/intel_uncore.h index f7670cbc41c9..fa675f0f60bd 100644 --- a/drivers/gpu/drm/i915/intel_uncore.h +++ b/drivers/gpu/drm/i915/intel_uncore.h @@ -97,6 +97,9 @@ struct intel_uncore { spinlock_t lock; /** lock is also taken in irq contexts. */ + unsigned int flags; +#define UNCORE_HAS_FORCEWAKE BIT(0) + const struct intel_forcewake_range *fw_domains_table; unsigned int fw_domains_table_entries; @@ -143,6 +146,12 @@ forcewake_domain_to_uncore(const struct intel_uncore_forcewake_domain *d) return container_of(d, struct intel_uncore, fw_domain[d->id]); } +static inline bool +intel_uncore_has_forcewake(const struct intel_uncore *uncore) +{ + return uncore->flags & UNCORE_HAS_FORCEWAKE; +} + void intel_uncore_sanitize(struct drm_i915_private
[Intel-gfx] [CI 8/9] drm/i915: switch intel_wait_for_register to uncore
From: Daniele Ceraolo Spurio The intel_uncore structure is the owner of register access, so subclass the function to it. While at it, use a local uncore var and switch to the new read/write functions where it makes sense. Signed-off-by: Daniele Ceraolo Spurio Cc: Paulo Zanoni Cc: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190325214940.23632-9-daniele.ceraolospu...@intel.com --- drivers/gpu/drm/i915/i915_drv.c | 2 +- drivers/gpu/drm/i915/i915_perf.c| 12 ++--- drivers/gpu/drm/i915/icl_dsi.c | 6 ++- drivers/gpu/drm/i915/intel_cdclk.c | 12 ++--- drivers/gpu/drm/i915/intel_crt.c| 6 +-- drivers/gpu/drm/i915/intel_ddi.c| 2 +- drivers/gpu/drm/i915/intel_display.c| 25 +- drivers/gpu/drm/i915/intel_dp.c | 4 +- drivers/gpu/drm/i915/intel_dp_mst.c | 2 +- drivers/gpu/drm/i915/intel_dpio_phy.c | 2 +- drivers/gpu/drm/i915/intel_dpll_mgr.c | 25 +- drivers/gpu/drm/i915/intel_fbc.c| 2 +- drivers/gpu/drm/i915/intel_guc.c| 2 +- drivers/gpu/drm/i915/intel_hdcp.c | 17 +++ drivers/gpu/drm/i915/intel_huc.c| 2 +- drivers/gpu/drm/i915/intel_lvds.c | 6 ++- drivers/gpu/drm/i915/intel_psr.c| 8 ++-- drivers/gpu/drm/i915/intel_ringbuffer.c | 7 +-- drivers/gpu/drm/i915/intel_runtime_pm.c | 8 ++-- drivers/gpu/drm/i915/intel_sideband.c | 12 ++--- drivers/gpu/drm/i915/intel_uncore.c | 17 --- drivers/gpu/drm/i915/intel_uncore.h | 6 +-- drivers/gpu/drm/i915/vlv_dsi.c | 61 +++-- drivers/gpu/drm/i915/vlv_dsi_pll.c | 4 +- 24 files changed, 134 insertions(+), 116 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 622b175b05fd..ca8a8891b7b3 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -2687,7 +2687,7 @@ int vlv_force_gfx_clock(struct drm_i915_private *dev_priv, bool force_on) if (!force_on) return 0; - err = intel_wait_for_register(dev_priv, + err = intel_wait_for_register(_priv->uncore, VLV_GTLC_SURVIVABILITY_REG, VLV_GFX_CLK_STATUS_BIT, VLV_GFX_CLK_STATUS_BIT, diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/gpu/drm/i915/i915_perf.c index 85c5cb779297..39a4804091d7 100644 --- a/drivers/gpu/drm/i915/i915_perf.c +++ b/drivers/gpu/drm/i915/i915_perf.c @@ -1920,10 +1920,10 @@ static void i915_oa_stream_enable(struct i915_perf_stream *stream) static void gen7_oa_disable(struct i915_perf_stream *stream) { - struct drm_i915_private *dev_priv = stream->dev_priv; + struct intel_uncore *uncore = >dev_priv->uncore; - I915_WRITE(GEN7_OACONTROL, 0); - if (intel_wait_for_register(dev_priv, + intel_uncore_write(uncore, GEN7_OACONTROL, 0); + if (intel_wait_for_register(uncore, GEN7_OACONTROL, GEN7_OACONTROL_ENABLE, 0, 50)) DRM_ERROR("wait for OA to be disabled timed out\n"); @@ -1931,10 +1931,10 @@ static void gen7_oa_disable(struct i915_perf_stream *stream) static void gen8_oa_disable(struct i915_perf_stream *stream) { - struct drm_i915_private *dev_priv = stream->dev_priv; + struct intel_uncore *uncore = >dev_priv->uncore; - I915_WRITE(GEN8_OACONTROL, 0); - if (intel_wait_for_register(dev_priv, + intel_uncore_write(uncore, GEN8_OACONTROL, 0); + if (intel_wait_for_register(uncore, GEN8_OACONTROL, GEN8_OA_COUNTER_ENABLE, 0, 50)) DRM_ERROR("wait for OA to be disabled timed out\n"); diff --git a/drivers/gpu/drm/i915/icl_dsi.c b/drivers/gpu/drm/i915/icl_dsi.c index 1395338c6772..b67ffaa283dc 100644 --- a/drivers/gpu/drm/i915/icl_dsi.c +++ b/drivers/gpu/drm/i915/icl_dsi.c @@ -861,7 +861,8 @@ static void gen11_dsi_enable_transcoder(struct intel_encoder *encoder) I915_WRITE(PIPECONF(dsi_trans), tmp); /* wait for transcoder to be enabled */ - if (intel_wait_for_register(dev_priv, PIPECONF(dsi_trans), + if (intel_wait_for_register(_priv->uncore, + PIPECONF(dsi_trans), I965_PIPECONF_ACTIVE, I965_PIPECONF_ACTIVE, 10)) DRM_ERROR("DSI transcoder not enabled\n"); @@ -1039,7 +1040,8 @@ static void gen11_dsi_disable_transcoder(struct intel_encoder *encoder) I915_WRITE(PIPECONF(dsi_trans), tmp); /* wait for transcoder to be disabled */ - if (intel_wait_for_register(dev_priv, PIPECONF(dsi_trans), + if
[Intel-gfx] [CI 7/9] drm/i915: intel_wait_for_register_fw to uncore
From: Daniele Ceraolo Spurio The intel_uncore structure is the owner of register access, so subclass the function to it. While at it, use a local uncore var and switch to the new read/write functions where it makes sense. Signed-off-by: Daniele Ceraolo Spurio Cc: Paulo Zanoni Cc: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190325214940.23632-8-daniele.ceraolospu...@intel.com --- drivers/gpu/drm/i915/i915_reset.c | 36 ++--- drivers/gpu/drm/i915/intel_dpio_phy.c | 3 ++- drivers/gpu/drm/i915/intel_engine_cs.c | 10 +++ drivers/gpu/drm/i915/intel_guc.c| 11 drivers/gpu/drm/i915/intel_huc_fw.c | 27 +++ drivers/gpu/drm/i915/intel_i2c.c| 2 +- drivers/gpu/drm/i915/intel_pm.c | 4 +-- drivers/gpu/drm/i915/intel_ringbuffer.c | 18 ++--- drivers/gpu/drm/i915/intel_uncore.c | 11 drivers/gpu/drm/i915/intel_uncore.h | 34 ++- 10 files changed, 88 insertions(+), 68 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_reset.c b/drivers/gpu/drm/i915/i915_reset.c index 0aea19cefe4a..17f802a8f8f0 100644 --- a/drivers/gpu/drm/i915/i915_reset.c +++ b/drivers/gpu/drm/i915/i915_reset.c @@ -245,10 +245,12 @@ static int ironlake_do_reset(struct drm_i915_private *dev_priv, unsigned int engine_mask, unsigned int retry) { + struct intel_uncore *uncore = _priv->uncore; int ret; - I915_WRITE_FW(ILK_GDSR, ILK_GRDOM_RENDER | ILK_GRDOM_RESET_ENABLE); - ret = __intel_wait_for_register_fw(dev_priv, ILK_GDSR, + intel_uncore_write_fw(uncore, ILK_GDSR, + ILK_GRDOM_RENDER | ILK_GRDOM_RESET_ENABLE); + ret = __intel_wait_for_register_fw(uncore, ILK_GDSR, ILK_GRDOM_RESET_ENABLE, 0, 5000, 0, NULL); @@ -257,8 +259,9 @@ static int ironlake_do_reset(struct drm_i915_private *dev_priv, goto out; } - I915_WRITE_FW(ILK_GDSR, ILK_GRDOM_MEDIA | ILK_GRDOM_RESET_ENABLE); - ret = __intel_wait_for_register_fw(dev_priv, ILK_GDSR, + intel_uncore_write_fw(uncore, ILK_GDSR, + ILK_GRDOM_MEDIA | ILK_GRDOM_RESET_ENABLE); + ret = __intel_wait_for_register_fw(uncore, ILK_GDSR, ILK_GRDOM_RESET_ENABLE, 0, 5000, 0, NULL); @@ -268,8 +271,8 @@ static int ironlake_do_reset(struct drm_i915_private *dev_priv, } out: - I915_WRITE_FW(ILK_GDSR, 0); - POSTING_READ_FW(ILK_GDSR); + intel_uncore_write_fw(uncore, ILK_GDSR, 0); + intel_uncore_posting_read_fw(uncore, ILK_GDSR); return ret; } @@ -277,6 +280,7 @@ static int ironlake_do_reset(struct drm_i915_private *dev_priv, static int gen6_hw_domain_reset(struct drm_i915_private *dev_priv, u32 hw_domain_mask) { + struct intel_uncore *uncore = _priv->uncore; int err; /* @@ -284,10 +288,10 @@ static int gen6_hw_domain_reset(struct drm_i915_private *dev_priv, * for fifo space for the write or forcewake the chip for * the read */ - I915_WRITE_FW(GEN6_GDRST, hw_domain_mask); + intel_uncore_write_fw(uncore, GEN6_GDRST, hw_domain_mask); /* Wait for the device to ack the reset requests */ - err = __intel_wait_for_register_fw(dev_priv, + err = __intel_wait_for_register_fw(uncore, GEN6_GDRST, hw_domain_mask, 0, 500, 0, NULL); @@ -330,6 +334,7 @@ static int gen6_reset_engines(struct drm_i915_private *i915, static u32 gen11_lock_sfc(struct drm_i915_private *dev_priv, struct intel_engine_cs *engine) { + struct intel_uncore *uncore = _priv->uncore; u8 vdbox_sfc_access = RUNTIME_INFO(dev_priv)->vdbox_sfc_access; i915_reg_t sfc_forced_lock, sfc_forced_lock_ack; u32 sfc_forced_lock_bit, sfc_forced_lock_ack_bit; @@ -377,10 +382,9 @@ static u32 gen11_lock_sfc(struct drm_i915_private *dev_priv, * ends up being locked to the engine we want to reset, we have to reset * it as well (we will unlock it once the reset sequence is completed). */ - I915_WRITE_FW(sfc_forced_lock, - I915_READ_FW(sfc_forced_lock) | sfc_forced_lock_bit); + intel_uncore_rmw_or_fw(uncore, sfc_forced_lock, sfc_forced_lock_bit); - if (__intel_wait_for_register_fw(dev_priv, + if (__intel_wait_for_register_fw(uncore, sfc_forced_lock_ack,
[Intel-gfx] [CI 4/9] drm/i915: take a ref to the rpm in the uncore structure
From: Daniele Ceraolo Spurio Remove a bit of pointer dancing in the reg access path. Signed-off-by: Daniele Ceraolo Spurio Cc: Paulo Zanoni Cc: Chris Wilson Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190325214940.23632-5-daniele.ceraolospu...@intel.com --- drivers/gpu/drm/i915/intel_drv.h| 16 +++- drivers/gpu/drm/i915/intel_uncore.c | 16 +--- drivers/gpu/drm/i915/intel_uncore.h | 3 +++ 3 files changed, 23 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index 6102d21a8ba8..ab30067fe872 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h @@ -2269,20 +2269,26 @@ void icl_dbuf_slices_update(struct drm_i915_private *dev_priv, u8 req_slices); static inline void -assert_rpm_device_not_suspended(struct drm_i915_private *i915) +assert_rpm_device_not_suspended(struct i915_runtime_pm *rpm) { - WARN_ONCE(i915->runtime_pm.suspended, + WARN_ONCE(rpm->suspended, "Device suspended during HW access\n"); } static inline void -assert_rpm_wakelock_held(struct drm_i915_private *i915) +__assert_rpm_wakelock_held(struct i915_runtime_pm *rpm) { - assert_rpm_device_not_suspended(i915); - WARN_ONCE(!atomic_read(>runtime_pm.wakeref_count), + assert_rpm_device_not_suspended(rpm); + WARN_ONCE(!atomic_read(>wakeref_count), "RPM wakelock ref not held during HW access"); } +static inline void +assert_rpm_wakelock_held(struct drm_i915_private *i915) +{ + __assert_rpm_wakelock_held(>runtime_pm); +} + /** * disable_rpm_wakeref_asserts - disable the RPM assert checks * @i915: i915 device instance diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c index d7ce80cb55d8..78e4d5f2320e 100644 --- a/drivers/gpu/drm/i915/intel_uncore.c +++ b/drivers/gpu/drm/i915/intel_uncore.c @@ -342,7 +342,7 @@ intel_uncore_fw_release_timer(struct hrtimer *timer) struct intel_uncore *uncore = forcewake_domain_to_uncore(domain); unsigned long irqflags; - assert_rpm_device_not_suspended(uncore_to_i915(uncore)); + assert_rpm_device_not_suspended(uncore->rpm); if (xchg(>active, false)) return HRTIMER_RESTART; @@ -623,7 +623,7 @@ void intel_uncore_forcewake_get(struct intel_uncore *uncore, if (!uncore->funcs.force_wake_get) return; - assert_rpm_wakelock_held(uncore_to_i915(uncore)); + __assert_rpm_wakelock_held(uncore->rpm); spin_lock_irqsave(>lock, irqflags); __intel_uncore_forcewake_get(uncore, fw_domains); @@ -777,7 +777,7 @@ void assert_forcewakes_active(struct intel_uncore *uncore, if (!uncore->funcs.force_wake_get) return; - assert_rpm_wakelock_held(uncore_to_i915(uncore)); + __assert_rpm_wakelock_held(uncore->rpm); fw_domains &= uncore->fw_domains; WARN(fw_domains & ~uncore->fw_domains_active, @@ -1095,7 +1095,7 @@ unclaimed_reg_debug(struct intel_uncore *uncore, #define GEN2_READ_HEADER(x) \ struct intel_uncore *uncore = _priv->uncore; \ u##x val = 0; \ - assert_rpm_wakelock_held(dev_priv); + __assert_rpm_wakelock_held(uncore->rpm); #define GEN2_READ_FOOTER \ trace_i915_reg_rw(false, reg, val, sizeof(val), trace); \ @@ -1138,7 +1138,7 @@ __gen2_read(64) u32 offset = i915_mmio_reg_offset(reg); \ unsigned long irqflags; \ u##x val = 0; \ - assert_rpm_wakelock_held(dev_priv); \ + __assert_rpm_wakelock_held(uncore->rpm); \ spin_lock_irqsave(>lock, irqflags); \ unclaimed_reg_debug(uncore, reg, true, true) @@ -1213,7 +1213,7 @@ __gen6_read(64) #define GEN2_WRITE_HEADER \ struct intel_uncore *uncore = _priv->uncore; \ trace_i915_reg_rw(true, reg, val, sizeof(val), trace); \ - assert_rpm_wakelock_held(dev_priv); \ + __assert_rpm_wakelock_held(uncore->rpm); \ #define GEN2_WRITE_FOOTER @@ -1252,7 +1252,7 @@ __gen2_write(32) u32 offset = i915_mmio_reg_offset(reg); \ unsigned long irqflags; \ trace_i915_reg_rw(true, reg, val, sizeof(val), trace); \ - assert_rpm_wakelock_held(dev_priv); \ + __assert_rpm_wakelock_held(uncore->rpm); \ spin_lock_irqsave(>lock, irqflags); \ unclaimed_reg_debug(uncore, reg, false, true) @@ -1596,6 +1596,8 @@ int intel_uncore_init(struct intel_uncore *uncore) uncore->pmic_bus_access_nb.notifier_call = i915_pmic_bus_access_notifier; + uncore->rpm = >runtime_pm; + if (!intel_uncore_has_forcewake(uncore)) { if (IS_GEN(i915, 5)) { ASSIGN_WRITE_MMIO_VFUNCS(uncore, gen5); diff --git a/drivers/gpu/drm/i915/intel_uncore.h b/drivers/gpu/drm/i915/intel_uncore.h index b940d48d15fa..112571c3f411 100644
[Intel-gfx] [CI 1/9] drm/i915: rename raw reg access functions
From: Daniele Ceraolo Spurio They now work on uncore, so use raw_uncore_ prefix. Also move them to uncore.h Signed-off-by: Daniele Ceraolo Spurio Cc: Paulo Zanoni Cc: Chris Wilson Reviewed-by: Paulo Zanoni Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20190325214940.23632-2-daniele.ceraolospu...@intel.com --- drivers/gpu/drm/i915/i915_drv.h | 32 ++ drivers/gpu/drm/i915/i915_vgpu.c| 6 ++-- drivers/gpu/drm/i915/intel_uncore.c | 50 ++--- drivers/gpu/drm/i915/intel_uncore.h | 27 4 files changed, 58 insertions(+), 57 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 380198628d83..681bcbd5c06b 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -3518,32 +3518,6 @@ static inline u64 intel_rc6_residency_us(struct drm_i915_private *dev_priv, #define POSTING_READ(reg) (void)I915_READ_NOTRACE(reg) #define POSTING_READ16(reg)(void)I915_READ16_NOTRACE(reg) -#define __raw_read(x, s) \ -static inline uint##x##_t __raw_i915_read##x(const struct intel_uncore *uncore, \ -i915_reg_t reg) \ -{ \ - return read##s(uncore->regs + i915_mmio_reg_offset(reg)); \ -} - -#define __raw_write(x, s) \ -static inline void __raw_i915_write##x(const struct intel_uncore *uncore, \ - i915_reg_t reg, uint##x##_t val) \ -{ \ - write##s(val, uncore->regs + i915_mmio_reg_offset(reg)); \ -} -__raw_read(8, b) -__raw_read(16, w) -__raw_read(32, l) -__raw_read(64, q) - -__raw_write(8, b) -__raw_write(16, w) -__raw_write(32, l) -__raw_write(64, q) - -#undef __raw_read -#undef __raw_write - /* These are untraced mmio-accessors that are only valid to be used inside * critical sections, such as inside IRQ handlers, where forcewake is explicitly * controlled. @@ -3570,9 +3544,9 @@ __raw_write(64, q) * therefore generally be serialised, by either the dev_priv->uncore.lock or * a more localised lock guarding all access to that bank of registers. */ -#define I915_READ_FW(reg__) __raw_i915_read32(_priv->uncore, (reg__)) -#define I915_WRITE_FW(reg__, val__) __raw_i915_write32(_priv->uncore, (reg__), (val__)) -#define I915_WRITE64_FW(reg__, val__) __raw_i915_write64(_priv->uncore, (reg__), (val__)) +#define I915_READ_FW(reg__) __raw_uncore_read32(_priv->uncore, (reg__)) +#define I915_WRITE_FW(reg__, val__) __raw_uncore_write32(_priv->uncore, (reg__), (val__)) +#define I915_WRITE64_FW(reg__, val__) __raw_uncore_write64(_priv->uncore, (reg__), (val__)) #define POSTING_READ_FW(reg__) (void)I915_READ_FW(reg__) /* "Broadcast RGB" property */ diff --git a/drivers/gpu/drm/i915/i915_vgpu.c b/drivers/gpu/drm/i915/i915_vgpu.c index 3d0b493e4200..94d3992b599d 100644 --- a/drivers/gpu/drm/i915/i915_vgpu.c +++ b/drivers/gpu/drm/i915/i915_vgpu.c @@ -66,17 +66,17 @@ void i915_check_vgpu(struct drm_i915_private *dev_priv) BUILD_BUG_ON(sizeof(struct vgt_if) != VGT_PVINFO_SIZE); - magic = __raw_i915_read64(uncore, vgtif_reg(magic)); + magic = __raw_uncore_read64(uncore, vgtif_reg(magic)); if (magic != VGT_MAGIC) return; - version_major = __raw_i915_read16(uncore, vgtif_reg(version_major)); + version_major = __raw_uncore_read16(uncore, vgtif_reg(version_major)); if (version_major < VGT_VERSION_MAJOR) { DRM_INFO("VGT interface version mismatch!\n"); return; } - dev_priv->vgpu.caps = __raw_i915_read32(uncore, vgtif_reg(vgt_caps)); + dev_priv->vgpu.caps = __raw_uncore_read32(uncore, vgtif_reg(vgt_caps)); dev_priv->vgpu.active = true; DRM_INFO("Virtual GPU for Intel GVT-g detected.\n"); diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c index 1816eeae3ba9..02341c189803 100644 --- a/drivers/gpu/drm/i915/intel_uncore.c +++ b/drivers/gpu/drm/i915/intel_uncore.c @@ -31,7 +31,7 @@ #define FORCEWAKE_ACK_TIMEOUT_MS 50 #define GT_FIFO_TIMEOUT_MS 10 -#define __raw_posting_read(uncore__, reg__) (void)__raw_i915_read32((uncore__), (reg__)) +#define __raw_posting_read(...) ((void)__raw_uncore_read32(__VA_ARGS__)) static const char * const forcewake_domain_names[] = { "render", @@ -279,7 +279,7 @@ static inline u32 gt_thread_status(struct intel_uncore *uncore) { u32 val; - val = __raw_i915_read32(uncore, GEN6_GT_THREAD_STATUS_REG); + val = __raw_uncore_read32(uncore, GEN6_GT_THREAD_STATUS_REG); val &= GEN6_GT_THREAD_STATUS_CORE_MASK; return val; @@ -306,7 +306,7 @@ static void fw_domains_get_with_thread_status(struct intel_uncore *uncore, static inline u32 fifo_free_entries(struct intel_uncore *uncore) { - u32 count = __raw_i915_read32(uncore, GTFIFOCTL); + u32 count = __raw_uncore_read32(uncore, GTFIFOCTL);
[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/selftests: Fix an IS_ERR() vs NULL check
== Series Details == Series: drm/i915/selftests: Fix an IS_ERR() vs NULL check URL : https://patchwork.freedesktop.org/series/58557/ State : failure == Summary == CI Bug Log - changes from CI_DRM_5815_full -> Patchwork_12598_full Summary --- **FAILURE** Serious unknown changes coming with Patchwork_12598_full absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_12598_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. Possible new issues --- Here are the unknown changes that may have been introduced in Patchwork_12598_full: ### IGT changes ### Possible regressions * igt@gem_ringfill@basic-default-interruptible: - shard-iclb: NOTRUN -> INCOMPLETE Suppressed The following results come from untrusted machines, tests, or statuses. They do not affect the overall result. * {igt@gem_exec_big@single}: - shard-iclb: NOTRUN -> INCOMPLETE Known issues Here are the changes found in Patchwork_12598_full that come from known issues: ### IGT changes ### Issues hit * igt@gem_create@create-clear: - shard-snb: PASS -> INCOMPLETE [fdo#105411] * igt@gem_exec_params@no-blt: - shard-snb: NOTRUN -> SKIP [fdo#109271] +194 * igt@gem_wait@await-bsd: - shard-kbl: PASS -> DMESG-WARN [fdo#103558] / [fdo#105602] +8 * igt@i915_pm_lpsp@non-edp: - shard-iclb: NOTRUN -> SKIP [fdo#109301] * igt@i915_pm_rpm@cursor: - shard-skl: NOTRUN -> INCOMPLETE [fdo#107807] * igt@kms_atomic_transition@5x-modeset-transitions-nonblocking: - shard-snb: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +22 * igt@kms_busy@basic-flip-d: - shard-glk: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] - shard-apl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +2 * igt@kms_busy@extended-modeset-hang-newfb-render-a: - shard-snb: NOTRUN -> DMESG-WARN [fdo#110222] * igt@kms_busy@extended-modeset-hang-newfb-render-d: - shard-skl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] * igt@kms_busy@extended-pageflip-hang-newfb-render-a: - shard-apl: NOTRUN -> DMESG-WARN [fdo#110222] +1 * igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-c: - shard-kbl: PASS -> DMESG-WARN [fdo#110222] * igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-d: - shard-iclb: NOTRUN -> SKIP [fdo#109278] +1 * igt@kms_color@pipe-a-ctm-max: - shard-iclb: NOTRUN -> FAIL [fdo#108147] * igt@kms_color@pipe-a-gamma: - shard-iclb: NOTRUN -> FAIL [fdo#104782] * igt@kms_cursor_crc@cursor-256x256-random: - shard-apl: PASS -> FAIL [fdo#103232] * igt@kms_cursor_crc@cursor-64x21-onscreen: - shard-glk: PASS -> FAIL [fdo#103232] * igt@kms_cursor_crc@cursor-64x64-suspend: - shard-glk: NOTRUN -> FAIL [fdo#103232] * igt@kms_cursor_legacy@2x-long-cursor-vs-flip-atomic: - shard-iclb: NOTRUN -> SKIP [fdo#109274] * igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions: - shard-iclb: PASS -> FAIL [fdo#103355] +1 * igt@kms_fbcon_fbt@fbc: - shard-iclb: PASS -> DMESG-WARN [fdo#109593] * igt@kms_flip@flip-vs-expired-vblank: - shard-kbl: PASS -> FAIL [fdo#102887] / [fdo#105363] * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-blt: - shard-iclb: NOTRUN -> FAIL [fdo#103167] * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-shrfb-draw-mmap-gtt: - shard-iclb: PASS -> FAIL [fdo#103167] +1 * igt@kms_frontbuffer_tracking@fbcpsr-1p-offscren-pri-indfb-draw-pwrite: - shard-iclb: PASS -> FAIL [fdo#109247] +10 * igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-cur-indfb-move: - shard-iclb: NOTRUN -> SKIP [fdo#109280] +6 * igt@kms_frontbuffer_tracking@fbcpsr-shrfb-scaledprimary: - shard-apl: NOTRUN -> SKIP [fdo#109271] +37 * igt@kms_frontbuffer_tracking@psr-2p-primscrn-spr-indfb-draw-mmap-cpu: - shard-glk: NOTRUN -> SKIP [fdo#109271] +22 * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes: - shard-snb: PASS -> FAIL [fdo#103375] * igt@kms_plane_alpha_blend@pipe-b-alpha-transparant-fb: - shard-apl: NOTRUN -> FAIL [fdo#108145] * igt@kms_plane_scaling@pipe-c-scaler-with-pixel-format: - shard-glk: PASS -> SKIP [fdo#109271] / [fdo#109278] * igt@kms_psr@primary_page_flip: - shard-iclb: PASS -> FAIL [fdo#107383] / [fdo#110215] * igt@kms_setmode@basic: - shard-snb: NOTRUN -> FAIL [fdo#99912] * igt@kms_vblank@pipe-a-ts-continuation-suspend: - shard-iclb: PASS -> FAIL
[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Update size upon return from GEM_CREATE (rev2)
== Series Details == Series: drm/i915: Update size upon return from GEM_CREATE (rev2) URL : https://patchwork.freedesktop.org/series/58592/ State : warning == Summary == $ dim checkpatch origin/drm-tip 6fac14bf9f60 drm/i915: Update size upon return from GEM_CREATE -:15: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #15: References: ff72145badb8 ("drm: dumb scanout create/mmap for intel/radeon (v3)") -:15: ERROR:GIT_COMMIT_ID: Please use git commit description style 'commit <12+ chars of sha1> ("")' - ie: 'commit ff72145badb8 ("drm: dumb scanout create/mmap for intel/radeon (v3)")' #15: References: ff72145badb8 ("drm: dumb scanout create/mmap for intel/radeon (v3)") total: 1 errors, 1 warnings, 0 checks, 41 lines checked ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Only reset the pinned kernel contexts on resume
== Series Details == Series: drm/i915: Only reset the pinned kernel contexts on resume URL : https://patchwork.freedesktop.org/series/58589/ State : success == Summary == CI Bug Log - changes from CI_DRM_5818 -> Patchwork_12603 Summary --- **SUCCESS** No regressions found. External URL: https://patchwork.freedesktop.org/api/1.0/series/58589/revisions/1/mbox/ Known issues Here are the changes found in Patchwork_12603 that come from known issues: ### IGT changes ### Issues hit * igt@i915_selftest@live_contexts: - fi-skl-gvtdvm: PASS -> DMESG-FAIL [fdo#110235 ] * igt@kms_frontbuffer_tracking@basic: - fi-byt-clapper: PASS -> FAIL [fdo#103167] * igt@kms_pipe_crc_basic@hang-read-crc-pipe-a: - fi-byt-clapper: PASS -> FAIL [fdo#103191] / [fdo#107362] Possible fixes * igt@i915_pm_rpm@basic-pci-d3-state: - fi-hsw-4770:SKIP [fdo#109271] -> PASS +2 * igt@kms_busy@basic-flip-a: - fi-gdg-551: FAIL [fdo#103182] -> PASS [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167 [fdo#103182]: https://bugs.freedesktop.org/show_bug.cgi?id=103182 [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191 [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#110235 ]: https://bugs.freedesktop.org/show_bug.cgi?id=110235 Participating hosts (45 -> 39) -- Missing(6): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-u3 Build changes - * Linux: CI_DRM_5818 -> Patchwork_12603 CI_DRM_5818: de0e80842f3d103996e99cfe27f999690c2ee06e @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4905: a350b9f9f606296b1599c3617c8530a8985709e2 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_12603: b55c7a9bd9f400b97f9912406c15a38a7764f252 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == b55c7a9bd9f4 drm/i915: Only reset the pinned kernel contexts on resume == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12603/ ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: Only reset the pinned kernel contexts on resume
== Series Details == Series: drm/i915: Only reset the pinned kernel contexts on resume URL : https://patchwork.freedesktop.org/series/58589/ State : warning == Summary == $ dim sparse origin/drm-tip Sparse version: v0.5.2 Commit: drm/i915: Only reset the pinned kernel contexts on resume -drivers/gpu/drm/i915/selftests/../i915_drv.h:3597:16: warning: expression using sizeof(void) +drivers/gpu/drm/i915/selftests/../i915_drv.h:3596:16: warning: expression using sizeof(void) ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Do not enable FEC without DSC
== Series Details == Series: series starting with [1/2] drm/i915: Do not enable FEC without DSC URL : https://patchwork.freedesktop.org/series/58588/ State : success == Summary == CI Bug Log - changes from CI_DRM_5818 -> Patchwork_12602 Summary --- **SUCCESS** No regressions found. External URL: https://patchwork.freedesktop.org/api/1.0/series/58588/revisions/1/mbox/ Known issues Here are the changes found in Patchwork_12602 that come from known issues: ### IGT changes ### Issues hit * igt@i915_module_load@reload: - fi-blb-e6850: PASS -> INCOMPLETE [fdo#107718] * igt@i915_pm_rpm@module-reload: - fi-skl-6770hq: PASS -> FAIL [fdo#108511] * igt@i915_selftest@live_uncore: - fi-ivb-3770:PASS -> DMESG-FAIL [fdo#110210] * igt@kms_frontbuffer_tracking@basic: - fi-byt-clapper: PASS -> FAIL [fdo#103167] Possible fixes * igt@i915_pm_rpm@basic-pci-d3-state: - fi-hsw-4770:SKIP [fdo#109271] -> PASS +2 Warnings * igt@i915_selftest@live_contexts: - fi-icl-u3: INCOMPLETE [fdo#108569] -> DMESG-FAIL [fdo#108569] [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167 [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718 [fdo#108511]: https://bugs.freedesktop.org/show_bug.cgi?id=108511 [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#110210]: https://bugs.freedesktop.org/show_bug.cgi?id=110210 Participating hosts (45 -> 38) -- Missing(7): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-j1900 fi-byt-squawks fi-bsw-cyan fi-gdg-551 Build changes - * Linux: CI_DRM_5818 -> Patchwork_12602 CI_DRM_5818: de0e80842f3d103996e99cfe27f999690c2ee06e @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4905: a350b9f9f606296b1599c3617c8530a8985709e2 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_12602: d4765b6682ad9caeb34c3bab5eb6e0d3eeb4e483 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == d4765b6682ad drm/i915: Clean up DSC vs. not bpp handling ebed6de93f4d drm/i915: Do not enable FEC without DSC == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12602/ ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 8/9] drm/i915: switch intel_wait_for_register to uncore
Hi Daniele, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on drm-intel/for-linux-next] [also build test WARNING on next-20190326] [cannot apply to v5.1-rc2] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Daniele-Ceraolo-Spurio/more-uncore-rework/20190326-110805 base: git://anongit.freedesktop.org/drm-intel for-linux-next reproduce: make htmldocs All warnings (new ones prefixed by >>): kernel/rcu/tree.c:711: warning: Excess function parameter 'irq' description in 'rcu_nmi_exit' include/linux/dma-buf.h:304: warning: Function parameter or member 'cb_excl.cb' not described in 'dma_buf' include/linux/dma-buf.h:304: warning: Function parameter or member 'cb_excl.poll' not described in 'dma_buf' include/linux/dma-buf.h:304: warning: Function parameter or member 'cb_excl.active' not described in 'dma_buf' include/linux/dma-buf.h:304: warning: Function parameter or member 'cb_shared.cb' not described in 'dma_buf' include/linux/dma-buf.h:304: warning: Function parameter or member 'cb_shared.poll' not described in 'dma_buf' include/linux/dma-buf.h:304: warning: Function parameter or member 'cb_shared.active' not described in 'dma_buf' include/linux/firmware/intel/stratix10-svc-client.h:1: warning: no structured comments found include/linux/gpio/driver.h:371: warning: Function parameter or member 'init_valid_mask' not described in 'gpio_chip' include/linux/iio/hw-consumer.h:1: warning: no structured comments found include/linux/input/sparse-keymap.h:46: warning: Function parameter or member 'sw' not described in 'key_entry' include/linux/regulator/machine.h:199: warning: Function parameter or member 'max_uV_step' not described in 'regulation_constraints' include/linux/regulator/driver.h:228: warning: Function parameter or member 'resume' not described in 'regulator_ops' arch/s390/include/asm/cio.h:245: warning: Function parameter or member 'esw.esw0' not described in 'irb' arch/s390/include/asm/cio.h:245: warning: Function parameter or member 'esw.esw1' not described in 'irb' arch/s390/include/asm/cio.h:245: warning: Function parameter or member 'esw.esw2' not described in 'irb' arch/s390/include/asm/cio.h:245: warning: Function parameter or member 'esw.esw3' not described in 'irb' arch/s390/include/asm/cio.h:245: warning: Function parameter or member 'esw.eadm' not described in 'irb' drivers/slimbus/stream.c:1: warning: no structured comments found include/linux/spi/spi.h:180: warning: Function parameter or member 'driver_override' not described in 'spi_device' drivers/target/target_core_device.c:1: warning: no structured comments found drivers/usb/typec/bus.c:1: warning: no structured comments found drivers/usb/typec/class.c:1: warning: no structured comments found include/linux/w1.h:281: warning: Function parameter or member 'of_match_table' not described in 'w1_family' fs/direct-io.c:257: warning: Excess function parameter 'offset' description in 'dio_complete' fs/file_table.c:1: warning: no structured comments found fs/libfs.c:477: warning: Excess function parameter 'available' description in 'simple_write_end' fs/posix_acl.c:646: warning: Function parameter or member 'inode' not described in 'posix_acl_update_mode' fs/posix_acl.c:646: warning: Function parameter or member 'mode_p' not described in 'posix_acl_update_mode' fs/posix_acl.c:646: warning: Function parameter or member 'acl' not described in 'posix_acl_update_mode' drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:294: warning: Excess function parameter 'mm' description in 'amdgpu_mn_invalidate_range_start_hsa' drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:294: warning: Excess function parameter 'start' description in 'amdgpu_mn_invalidate_range_start_hsa' drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:294: warning: Excess function parameter 'end' description in 'amdgpu_mn_invalidate_range_start_hsa' drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:343: warning: Excess function parameter 'mm' description in 'amdgpu_mn_invalidate_range_end' drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:343: warning: Excess function parameter 'start' description in 'amdgpu_mn_invalidate_range_end' drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:343: warning: Excess function parameter 'end' description in 'amdgpu_mn_invalidate_range_end' drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:183: warning: Function parameter or member 'blockable' not described in 'amdgpu_mn_read_lock' drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:295: warning: Function parameter or member 'range' not described in 'amdgpu_mn_invalidate_range_start_hsa' drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:295: warning: Excess function parameter 'mm' description in 'amdgpu_mn_invalidate_range_start_hsa' drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c:295: warning: Excess function parameter
[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [v2,1/6] drm/i915: Add broadcast RGB property for DP MST
== Series Details == Series: series starting with [v2,1/6] drm/i915: Add broadcast RGB property for DP MST URL : https://patchwork.freedesktop.org/series/58585/ State : success == Summary == CI Bug Log - changes from CI_DRM_5818 -> Patchwork_12601 Summary --- **SUCCESS** No regressions found. External URL: https://patchwork.freedesktop.org/api/1.0/series/58585/revisions/1/mbox/ Known issues Here are the changes found in Patchwork_12601 that come from known issues: ### IGT changes ### Issues hit * igt@gem_exec_suspend@basic-s4-devices: - fi-kbl-7500u: PASS -> DMESG-WARN [fdo#105128] / [fdo#107139] * igt@i915_selftest@live_execlists: - fi-apl-guc: PASS -> INCOMPLETE [fdo#103927] / [fdo#109720] * igt@i915_selftest@live_uncore: - fi-skl-gvtdvm: PASS -> DMESG-FAIL [fdo#110210] * igt@kms_busy@basic-flip-b: - fi-gdg-551: PASS -> FAIL [fdo#103182] * igt@kms_frontbuffer_tracking@basic: - fi-byt-clapper: PASS -> FAIL [fdo#103167] * igt@runner@aborted: - fi-apl-guc: NOTRUN -> FAIL [fdo#108622] / [fdo#109720] Possible fixes * igt@i915_pm_rpm@basic-pci-d3-state: - fi-hsw-4770:SKIP [fdo#109271] -> PASS +2 * igt@kms_frontbuffer_tracking@basic: - fi-icl-u3: FAIL [fdo#103167] -> PASS * igt@kms_pipe_crc_basic@read-crc-pipe-a-frame-sequence: - fi-byt-clapper: FAIL [fdo#103191] / [fdo#107362] -> PASS Warnings * igt@i915_selftest@live_contexts: - fi-icl-u3: INCOMPLETE [fdo#108569] -> DMESG-FAIL [fdo#108569] [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167 [fdo#103182]: https://bugs.freedesktop.org/show_bug.cgi?id=103182 [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191 [fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927 [fdo#105128]: https://bugs.freedesktop.org/show_bug.cgi?id=105128 [fdo#107139]: https://bugs.freedesktop.org/show_bug.cgi?id=107139 [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362 [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569 [fdo#108622]: https://bugs.freedesktop.org/show_bug.cgi?id=108622 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720 [fdo#110210]: https://bugs.freedesktop.org/show_bug.cgi?id=110210 Participating hosts (45 -> 39) -- Missing(6): fi-kbl-soraka fi-hsw-4770r fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan Build changes - * Linux: CI_DRM_5818 -> Patchwork_12601 CI_DRM_5818: de0e80842f3d103996e99cfe27f999690c2ee06e @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4905: a350b9f9f606296b1599c3617c8530a8985709e2 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_12601: e7d746c0f1cade7dec453b2d0d5dc30dcc80fd1b @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == e7d746c0f1ca drm/i915: Set DP min_bpp to 8*3 for non-RGB output formats 7c30861f2132 drm/i915: Update TRANS_MSA_MISC for fastsets 079d8c3dda72 drm/i915: Add max_bpc property for DP MST 37b12d1eba04 drm/i915: Remove the 8bpc shackles from DP MST 34e5685e988f drm/i915: Expose the force_audio property with DP MST 18c4bad008ca drm/i915: Add broadcast RGB property for DP MST == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12601/ ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH i-g-t] i915/gem_exec_big: 128MiB not enough slack? Let out the rope!
Even with 128MiB reserved for other use, a single pass of gem_exec_big runs out of memory. Give in and halve our batch size, that has to be enough slack! As to why it keeps on failing, is left as an exercise to the reader -- we have to solve the mm/ mystery one day, as eventually it will be our only remaining source of bugs! Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin --- tests/i915/gem_exec_big.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/i915/gem_exec_big.c b/tests/i915/gem_exec_big.c index 015f59e29..440136ee8 100644 --- a/tests/i915/gem_exec_big.c +++ b/tests/i915/gem_exec_big.c @@ -260,7 +260,7 @@ static void single(int i915) uint32_t handle; void *ptr; - batch_size = (intel_get_avail_ram_mb() - 128) << 20; /* CI slack */ + batch_size = (intel_get_avail_ram_mb() / 2) << 20; /* XXX CI slack? */ limit = gem_aperture_size(i915) - (256 << 10); /* low pages reserved */ if (!gem_uses_full_ppgtt(i915)) limit = 3 * limit / 4; -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.IGT: failure for Do not re-read dpll registers (rev3)
== Series Details == Series: Do not re-read dpll registers (rev3) URL : https://patchwork.freedesktop.org/series/58382/ State : failure == Summary == CI Bug Log - changes from CI_DRM_5815_full -> Patchwork_12597_full Summary --- **FAILURE** Serious unknown changes coming with Patchwork_12597_full absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_12597_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. Possible new issues --- Here are the unknown changes that may have been introduced in Patchwork_12597_full: ### IGT changes ### Possible regressions * igt@gem_exec_nop@basic-sequential: - shard-iclb: NOTRUN -> INCOMPLETE Suppressed The following results come from untrusted machines, tests, or statuses. They do not affect the overall result. * {igt@gem_exec_big@single}: - shard-iclb: NOTRUN -> INCOMPLETE Known issues Here are the changes found in Patchwork_12597_full that come from known issues: ### IGT changes ### Issues hit * igt@gem_exec_params@no-blt: - shard-snb: NOTRUN -> SKIP [fdo#109271] +194 * igt@gem_exec_parse@oacontrol-tracking: - shard-skl: NOTRUN -> SKIP [fdo#109271] +36 * igt@i915_pm_lpsp@non-edp: - shard-iclb: NOTRUN -> SKIP [fdo#109301] * igt@kms_atomic_transition@3x-modeset-transitions-nonblocking: - shard-skl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +2 * igt@kms_atomic_transition@5x-modeset-transitions-nonblocking: - shard-snb: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +22 * igt@kms_atomic_transition@5x-modeset-transitions-nonblocking-fencing: - shard-apl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +1 * igt@kms_busy@basic-flip-d: - shard-glk: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] * igt@kms_busy@extended-modeset-hang-newfb-render-a: - shard-snb: NOTRUN -> DMESG-WARN [fdo#110222] * igt@kms_busy@extended-pageflip-hang-newfb-render-a: - shard-apl: NOTRUN -> DMESG-WARN [fdo#110222] +1 * igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-a: - shard-skl: NOTRUN -> DMESG-WARN [fdo#110222] * igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-c: - shard-kbl: PASS -> DMESG-WARN [fdo#110222] * igt@kms_busy@extended-pageflip-modeset-hang-oldfb-render-d: - shard-iclb: NOTRUN -> SKIP [fdo#109278] +1 * igt@kms_color@pipe-a-ctm-max: - shard-iclb: NOTRUN -> FAIL [fdo#108147] * igt@kms_color@pipe-a-gamma: - shard-iclb: NOTRUN -> FAIL [fdo#104782] * igt@kms_cursor_crc@cursor-128x128-suspend: - shard-apl: PASS -> DMESG-WARN [fdo#108566] * igt@kms_cursor_crc@cursor-64x21-onscreen: - shard-glk: PASS -> FAIL [fdo#103232] * igt@kms_cursor_crc@cursor-64x64-suspend: - shard-glk: NOTRUN -> FAIL [fdo#103232] * igt@kms_cursor_legacy@2x-long-cursor-vs-flip-atomic: - shard-iclb: NOTRUN -> SKIP [fdo#109274] * igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions: - shard-iclb: PASS -> FAIL [fdo#103355] +2 * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions: - shard-skl: NOTRUN -> FAIL [fdo#102670] / [fdo#106081] * igt@kms_flip@flip-vs-expired-vblank: - shard-apl: PASS -> FAIL [fdo#102887] / [fdo#105363] * igt@kms_flip@modeset-vs-vblank-race: - shard-glk: PASS -> FAIL [fdo#103060] * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-cur-indfb-draw-mmap-wc: - shard-iclb: PASS -> FAIL [fdo#103167] * igt@kms_frontbuffer_tracking@fbcpsr-1p-offscren-pri-indfb-draw-pwrite: - shard-iclb: PASS -> FAIL [fdo#109247] +21 * igt@kms_frontbuffer_tracking@fbcpsr-2p-primscrn-cur-indfb-move: - shard-iclb: NOTRUN -> SKIP [fdo#109280] +6 * igt@kms_frontbuffer_tracking@fbcpsr-rgb101010-draw-blt: - shard-iclb: PASS -> FAIL [fdo#105682] / [fdo#109247] * igt@kms_frontbuffer_tracking@fbcpsr-shrfb-scaledprimary: - shard-apl: NOTRUN -> SKIP [fdo#109271] +32 * igt@kms_frontbuffer_tracking@psr-1p-primscrn-indfb-msflip-blt: - shard-skl: PASS -> FAIL [fdo#103167] * igt@kms_frontbuffer_tracking@psr-2p-primscrn-spr-indfb-draw-mmap-cpu: - shard-glk: NOTRUN -> SKIP [fdo#109271] +22 * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-b-frame-sequence: - shard-apl: NOTRUN -> INCOMPLETE [fdo#103927] * igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min: - shard-skl: PASS -> FAIL [fdo#108145] * igt@kms_plane_alpha_blend@pipe-b-alpha-7efc: - shard-skl: NOTRUN -> FAIL [fdo#107815] / [fdo#108145] *
Re: [Intel-gfx] [PATCH 02/16] drm/fb-helper: dpms_legacy(): Only set on connectors in use
On Tue, Mar 26, 2019 at 06:55:32PM +0100, Noralf Trønnes wrote: > For each enabled crtc the functions sets dpms on all registered connectors. > Limit this to only doing it once and on the connectors actually in use. > > Signed-off-by: Noralf Trønnes Fixes: 023eb571a1d0 ("drm: correctly update connector DPMS status in drm_fb_helper") Reviewed-by: Daniel Vetter Just want to trick the AUTOSEL bot into cherrypicking a silly patch onto -stable :-) -Daniel > --- > drivers/gpu/drm/drm_fb_helper.c | 11 +-- > 1 file changed, 5 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c > index eea15465da7a..b91df658db59 100644 > --- a/drivers/gpu/drm/drm_fb_helper.c > +++ b/drivers/gpu/drm/drm_fb_helper.c > @@ -639,20 +639,19 @@ static struct sysrq_key_op > sysrq_drm_fb_helper_restore_op = { }; > static void dpms_legacy(struct drm_fb_helper *fb_helper, int dpms_mode) > { > struct drm_device *dev = fb_helper->dev; > - struct drm_crtc *crtc; > struct drm_connector *connector; > + struct drm_mode_set *modeset; > int i, j; > > drm_modeset_lock_all(dev); > for (i = 0; i < fb_helper->crtc_count; i++) { > - crtc = fb_helper->crtc_info[i].mode_set.crtc; > + modeset = _helper->crtc_info[i].mode_set; > > - if (!crtc->enabled) > + if (!modeset->crtc->enabled) > continue; > > - /* Walk the connectors & encoders on this fb turning them > on/off */ > - drm_fb_helper_for_each_connector(fb_helper, j) { > - connector = fb_helper->connector_info[j]->connector; > + for (j = 0; j < modeset->num_connectors; j++) { > + connector = modeset->connectors[j]; > connector->funcs->dpms(connector, dpms_mode); > drm_object_property_set_value(>base, > dev->mode_config.dpms_property, dpms_mode); > -- > 2.20.1 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 01/16] drm/fb-helper: Remove unused gamma_size variable
On Tue, Mar 26, 2019 at 06:55:31PM +0100, Noralf Trønnes wrote: > The gamma_size variable has not been used since > commit 4abe35204af8 ("drm/kms/fb: use slow work mechanism for normal hotplug > also.") > > While in the area move a comment back to its code block. > They got separated by > commit d50ba256b5f1 ("drm/kms: start adding command line interface using > fb."). > > Signed-off-by: Noralf Trønnes Reviewed-by: Daniel Vetter > --- > drivers/gpu/drm/drm_fb_helper.c | 6 +- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c > index 04d23cb430bf..eea15465da7a 100644 > --- a/drivers/gpu/drm/drm_fb_helper.c > +++ b/drivers/gpu/drm/drm_fb_helper.c > @@ -1873,7 +1873,6 @@ static int drm_fb_helper_single_fb_probe(struct > drm_fb_helper *fb_helper, > int crtc_count = 0; > int i; > struct drm_fb_helper_surface_size sizes; > - int gamma_size = 0; > int best_depth = 0; > > memset(, 0, sizeof(struct drm_fb_helper_surface_size)); > @@ -1889,7 +1888,6 @@ static int drm_fb_helper_single_fb_probe(struct > drm_fb_helper *fb_helper, > if (preferred_bpp != sizes.surface_bpp) > sizes.surface_depth = sizes.surface_bpp = preferred_bpp; > > - /* first up get a count of crtcs now in use and new min/maxes > width/heights */ > drm_fb_helper_for_each_connector(fb_helper, i) { > struct drm_fb_helper_connector *fb_helper_conn = > fb_helper->connector_info[i]; > struct drm_cmdline_mode *cmdline_mode; > @@ -1969,6 +1967,7 @@ static int drm_fb_helper_single_fb_probe(struct > drm_fb_helper *fb_helper, > sizes.surface_depth = best_depth; > } > > + /* first up get a count of crtcs now in use and new min/maxes > width/heights */ > crtc_count = 0; > for (i = 0; i < fb_helper->crtc_count; i++) { > struct drm_display_mode *desired_mode; > @@ -1991,9 +1990,6 @@ static int drm_fb_helper_single_fb_probe(struct > drm_fb_helper *fb_helper, > x = fb_helper->crtc_info[i].x; > y = fb_helper->crtc_info[i].y; > > - if (gamma_size == 0) > - gamma_size = > fb_helper->crtc_info[i].mode_set.crtc->gamma_size; > - > sizes.surface_width = max_t(u32, desired_mode->hdisplay + x, > sizes.surface_width); > sizes.surface_height = max_t(u32, desired_mode->vdisplay + y, > sizes.surface_height); > > -- > 2.20.1 > > ___ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [v2,1/6] drm/i915: Add broadcast RGB property for DP MST
== Series Details == Series: series starting with [v2,1/6] drm/i915: Add broadcast RGB property for DP MST URL : https://patchwork.freedesktop.org/series/58585/ State : warning == Summary == $ dim sparse origin/drm-tip Sparse version: v0.5.2 Commit: drm/i915: Add broadcast RGB property for DP MST +^~~~ -drivers/gpu/drm/i915/gvt/gtt.c:757:9:expected void [noderef] **slot -drivers/gpu/drm/i915/gvt/gtt.c:757:9:expected void **slot -drivers/gpu/drm/i915/gvt/gtt.c:757:9:expected void **slot -drivers/gpu/drm/i915/gvt/gtt.c:757:9:expected void **slot -drivers/gpu/drm/i915/gvt/gtt.c:757:9:got void [noderef] ** -drivers/gpu/drm/i915/gvt/gtt.c:757:9:got void [noderef] ** -drivers/gpu/drm/i915/gvt/gtt.c:757:9:got void [noderef] ** -drivers/gpu/drm/i915/gvt/gtt.c:757:9:got void **slot -drivers/gpu/drm/i915/gvt/gtt.c:757:9: warning: incorrect type in argument 1 (different address spaces) -drivers/gpu/drm/i915/gvt/gtt.c:757:9: warning: incorrect type in assignment (different address spaces) -drivers/gpu/drm/i915/gvt/gtt.c:757:9: warning: incorrect type in assignment (different address spaces) -drivers/gpu/drm/i915/gvt/gtt.c:757:9: warning: incorrect type in assignment (different address spaces) -drivers/gpu/drm/i915/gvt/gtt.c:758:45:expected void [noderef] **slot -drivers/gpu/drm/i915/gvt/gtt.c:758:45:got void **slot -drivers/gpu/drm/i915/gvt/gtt.c:758:45: warning: incorrect type in argument 1 (different address spaces) -drivers/gpu/drm/i915/gvt/mmio.c:282:23: warning: memcpy with byte count of 279040 -drivers/gpu/drm/i915/gvt/mmio.c:283:23: warning: memcpy with byte count of 279040 -drivers/gpu/drm/i915/gvt/vgpu.c:196:48: warning: expression using sizeof(void) -drivers/gpu/drm/i915/gvt/vgpu.c:196:48: warning: expression using sizeof(void) -drivers/gpu/drm/i915/gvt/vgpu.c:196:48: warning: expression using sizeof(void) -drivers/gpu/drm/i915/gvt/vgpu.c:196:48: warning: expression using sizeof(void) -drivers/gpu/drm/i915/gvt/vgpu.c:196:48: warning: expression using sizeof(void) -drivers/gpu/drm/i915/gvt/vgpu.c:196:48: warning: expression using sizeof(void) -drivers/gpu/drm/i915/gvt/vgpu.c:196:48: warning: expression using sizeof(void) -drivers/gpu/drm/i915/gvt/vgpu.c:196:48: warning: expression using sizeof(void) -drivers/gpu/drm/i915/gvt/vgpu.c:196:48: warning: expression using sizeof(void) -drivers/gpu/drm/i915/gvt/vgpu.c:196:48: warning: expression using sizeof(void) -drivers/gpu/drm/i915/gvt/vgpu.c:196:48: warning: expression using sizeof(void) -drivers/gpu/drm/i915/gvt/vgpu.c:196:48: warning: expression using sizeof(void) -drivers/gpu/drm/i915/gvt/vgpu.c:196:48: warning: expression using sizeof(void) -drivers/gpu/drm/i915/gvt/vgpu.c:196:48: warning: expression using sizeof(void) +cc1: all warnings being treated as errors +drivers/gpu/drm/i915/intel_dp_mst.c:41:40: error: unused variable ‘intel_conn_state’ [-Werror=unused-variable] +drivers/gpu/drm/i915/intel_dp_mst.c: In function ‘intel_dp_mst_compute_config’: -./include/linux/overflow.h:251:13: error: incorrect type in conditional -./include/linux/overflow.h:251:13: error: incorrect type in conditional -./include/linux/overflow.h:251:13: error: undefined identifier '__builtin_mul_overflow' -./include/linux/overflow.h:251:13: error: undefined identifier '__builtin_mul_overflow' -./include/linux/overflow.h:251:13:got void -./include/linux/overflow.h:251:13:got void -./include/linux/overflow.h:251:13: warning: call with no type! -./include/linux/overflow.h:251:13: warning: call with no type! -./include/linux/slab.h:664:13: error: undefined identifier '__builtin_mul_overflow' -./include/linux/slab.h:664:13: error: undefined identifier '__builtin_mul_overflow' -./include/linux/slab.h:664:13: warning: call with no type! -./include/linux/slab.h:664:13: warning: call with no type! -./include/uapi/linux/perf_event.h:147:56: warning: cast truncates bits from constant value (8000 becomes 0) -./include/uapi/linux/perf_event.h:147:56: warning: cast truncates bits from constant value (8000 becomes 0) -./include/uapi/linux/perf_event.h:147:56: warning: cast truncates bits from constant value (8000 becomes 0) -./include/uapi/linux/perf_event.h:147:56: warning: cast truncates bits from constant value (8000 becomes 0) -./include/uapi/linux/perf_event.h:147:56: warning: cast truncates bits from constant value (8000 becomes 0) -./include/uapi/linux/perf_event.h:147:56: warning: cast truncates bits from constant value (8000 becomes 0) -./include/uapi/linux/perf_event.h:147:56: warning: cast truncates bits from constant value (8000 becomes 0) -./include/uapi/linux/perf_event.h:147:56: warning: cast truncates bits from constant value (8000 becomes 0) -./include/uapi/linux/perf_event.h:147:56: warning: cast truncates bits from constant value (8000 becomes 0)
[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [01/21] drm/fb-helper: Add fill_info() functions
== Series Details == Series: series starting with [01/21] drm/fb-helper: Add fill_info() functions URL : https://patchwork.freedesktop.org/series/58578/ State : success == Summary == CI Bug Log - changes from CI_DRM_5818 -> Patchwork_12600 Summary --- **SUCCESS** No regressions found. External URL: https://patchwork.freedesktop.org/api/1.0/series/58578/revisions/1/mbox/ Known issues Here are the changes found in Patchwork_12600 that come from known issues: ### IGT changes ### Issues hit * igt@i915_selftest@live_contexts: - fi-bdw-gvtdvm: PASS -> DMESG-FAIL [fdo#110235 ] * igt@kms_busy@basic-flip-b: - fi-gdg-551: PASS -> FAIL [fdo#103182] * igt@kms_frontbuffer_tracking@basic: - fi-byt-clapper: PASS -> FAIL [fdo#103167] * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-b: - fi-byt-clapper: PASS -> FAIL [fdo#103191] / [fdo#107362] +2 * igt@prime_vgem@basic-fence-flip: - fi-ilk-650: PASS -> FAIL [fdo#104008] Possible fixes * igt@i915_pm_rpm@basic-pci-d3-state: - fi-hsw-4770:SKIP [fdo#109271] -> PASS +2 * igt@kms_busy@basic-flip-a: - fi-gdg-551: FAIL [fdo#103182] -> PASS * igt@kms_frontbuffer_tracking@basic: - fi-icl-u3: FAIL [fdo#103167] -> PASS * igt@kms_pipe_crc_basic@read-crc-pipe-a-frame-sequence: - fi-byt-clapper: FAIL [fdo#103191] / [fdo#107362] -> PASS Warnings * igt@i915_selftest@live_contexts: - fi-icl-u3: INCOMPLETE [fdo#108569] -> DMESG-FAIL [fdo#108569] [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167 [fdo#103182]: https://bugs.freedesktop.org/show_bug.cgi?id=103182 [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191 [fdo#104008]: https://bugs.freedesktop.org/show_bug.cgi?id=104008 [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362 [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#110235 ]: https://bugs.freedesktop.org/show_bug.cgi?id=110235 Participating hosts (45 -> 40) -- Missing(5): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan Build changes - * Linux: CI_DRM_5818 -> Patchwork_12600 CI_DRM_5818: de0e80842f3d103996e99cfe27f999690c2ee06e @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4905: a350b9f9f606296b1599c3617c8530a8985709e2 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_12600: 62609175fe2a34635dca3c7bda713019c38ab2e4 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 62609175fe2a drm/fb-helper: Unexport fill_{var,info} 0981df50e6e9 drm/vboxvideo: Use drm_fb_helper_fill_info 2131021ff7c4 drm/udl: Use drm_fb_helper_fill_info e65049fa5ba4 drm/tegra: Use drm_fb_helper_fill_info cd0176602aa1 drm/rockchip: Use drm_fb_helper_fill_info e0b4cd8482f1 drm/radeon: Use drm_fb_helper_fill_info 788143f847ba drm/omap: Use drm_fb_helper_fill_info dbdc4e735135 drm/nouveau: Use drm_fb_helper_fill_info ab1afd2adf69 drm/bochs: Use drm_fb_helper_fill_info 82d5c3d72fa3 drm/mga200g: Use drm_fb_helper_fill_info c6ef43e13b00 drm/i915: Use drm_fb_helper_fill_info 446787a8660a drm/hibmc: Use drm_fb_helper_fill_info 73a013bb36ea drm/gma500: Use drm_fb_helper_fill_info b41fd86b4e4d drm/exynos: Use drm_fb_helper_fill_info b2b96b775828 drm/cirrus: Use drm_fb_helper_fill_info f8d363754340 drm/ast: Use drm_fb_helper_fill_info fcfc103bed21 drm/armada: Use drm_fb_helper_fill_info 3e3b4caa15a0 drm/amdgpu: Use drm_fb_helper_fill_info 850287b53f8e drm/fb_helper: set info->par in fill_info() bc2c591b50c1 drm/fb-helper: set fbi->fix.id in fill_info() 14d8e1994710 drm/fb-helper: Add fill_info() functions == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12600/ ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [v2,1/6] drm/i915: Add broadcast RGB property for DP MST
== Series Details == Series: series starting with [v2,1/6] drm/i915: Add broadcast RGB property for DP MST URL : https://patchwork.freedesktop.org/series/58585/ State : warning == Summary == $ dim checkpatch origin/drm-tip 18c4bad008ca drm/i915: Add broadcast RGB property for DP MST 34e5685e988f drm/i915: Expose the force_audio property with DP MST 37b12d1eba04 drm/i915: Remove the 8bpc shackles from DP MST -:231: CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations #231: FILE: drivers/gpu/drm/i915/intel_drv.h:1917: +}; +void intel_dp_adjust_compliance_config(struct intel_dp *intel_dp, total: 0 errors, 0 warnings, 1 checks, 196 lines checked 079d8c3dda72 drm/i915: Add max_bpc property for DP MST 7c30861f2132 drm/i915: Update TRANS_MSA_MISC for fastsets e7d746c0f1ca drm/i915: Set DP min_bpp to 8*3 for non-RGB output formats ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915: Adding missing '; ' to ENGINE_INSTANCES
On 26/03/2019 18:00, Chris Wilson wrote: Tvrtko spotted that I left off the trailing ';'. It went unnoticed by CI because despite adding the macro, we didn't add a user, so include one as well (a simple debug print). Reported-by: Tvrtko Ursulin Fixes: 97ee6e925552 ("drm/i915: stop storing the media fuse") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/intel_device_info.c | 8 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 380198628d83..f73e78cf2f11 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -2458,7 +2458,7 @@ static inline unsigned int i915_sg_segment_size(void) unsigned int first__ = (first); \ unsigned int count__ = (count); \ (INTEL_INFO(dev_priv)->engine_mask & \ -GENMASK(first__ + count__ - 1, first__)) >> first__ \ +GENMASK(first__ + count__ - 1, first__)) >> first__; \ }) #define VDBOX_MASK(dev_priv) \ ENGINE_INSTANCES_MASK(dev_priv, VCS0, I915_MAX_VCS) diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c index 5776a0def7ac..bd226b9b7f8f 100644 --- a/drivers/gpu/drm/i915/intel_device_info.c +++ b/drivers/gpu/drm/i915/intel_device_info.c @@ -890,7 +890,6 @@ void intel_device_info_init_mmio(struct drm_i915_private *dev_priv) vebox_mask = (media_fuse & GEN11_GT_VEBOX_DISABLE_MASK) >> GEN11_GT_VEBOX_DISABLE_SHIFT; - DRM_DEBUG_DRIVER("vdbox enable: %04x\n", vdbox_mask); for (i = 0; i < I915_MAX_VCS; i++) { if (!HAS_ENGINE(dev_priv, _VCS(i))) continue; @@ -908,8 +907,10 @@ void intel_device_info_init_mmio(struct drm_i915_private *dev_priv) if (logical_vdbox++ % 2 == 0) RUNTIME_INFO(dev_priv)->vdbox_sfc_access |= BIT(i); } + DRM_DEBUG_DRIVER("vdbox enable: %04x, instances: %04lx\n", + vdbox_mask, VDBOX_MASK(dev_priv)); + GEM_BUG_ON(vdbox_mask != VDBOX_MASK(dev_priv)); - DRM_DEBUG_DRIVER("vebox enable: %04x\n", vebox_mask); for (i = 0; i < I915_MAX_VECS; i++) { if (!HAS_ENGINE(dev_priv, _VECS(i))) continue; @@ -919,4 +920,7 @@ void intel_device_info_init_mmio(struct drm_i915_private *dev_priv) DRM_DEBUG_DRIVER("vecs%u fused off\n", i); } } + DRM_DEBUG_DRIVER("vebox enable: %04x, instances: %04lx\n", + vebox_mask, VEBOX_MASK(dev_priv)); + GEM_BUG_ON(vebox_mask != VEBOX_MASK(dev_priv)); } Reviewed-by: Tvrtko Ursulin Regards, Tvrtko ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 4/4] drm/uapi: Remove unused DRM_DISPLAY_INFO_LEN
On Tue, Mar 26, 2019 at 07:34:01PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > Remove the unused DRM_DISPLAY_INFO_LEN from the uapi headers. > I presume the original plan was to expose the display name > via getconnector, but looks like that never happened. So we have > the define for the length of the string but no string anywhere. > > A quick scan didn't seem to reveal userspace referencing this > so hopefully we can just nuke it. > > Signed-off-by: Ville Syrjälä Reviewed-by: Daniel Vetter -Daniel > --- > include/uapi/drm/drm_mode.h | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h > index a439c2e67896..09d72966899a 100644 > --- a/include/uapi/drm/drm_mode.h > +++ b/include/uapi/drm/drm_mode.h > @@ -33,7 +33,6 @@ > extern "C" { > #endif > > -#define DRM_DISPLAY_INFO_LEN 32 > #define DRM_CONNECTOR_NAME_LEN 32 > #define DRM_DISPLAY_MODE_LEN 32 > #define DRM_PROP_NAME_LEN32 > -- > 2.19.2 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 3/4] drm: Kill drm_display_info.name
On Tue, Mar 26, 2019 at 07:34:00PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > drm_display_info.name is only ever set by a few panel drveirs but > never actually used anywhere except in i915 debugfs code. Trash it. > > Signed-off-by: Ville Syrjälä Huh, nice find. Reviewed-by: Daniel Vetter > --- > drivers/gpu/drm/i915/i915_debugfs.c| 1 - > drivers/gpu/drm/panel/panel-arm-versatile.c| 2 -- > drivers/gpu/drm/panel/panel-ilitek-ili9322.c | 2 -- > drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c | 1 - > drivers/gpu/drm/panel/panel-samsung-s6d16d0.c | 3 --- > drivers/gpu/drm/panel/panel-tpo-tpg110.c | 2 -- > include/drm/drm_connector.h| 5 - > 7 files changed, 16 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_debugfs.c > b/drivers/gpu/drm/i915/i915_debugfs.c > index 47bf07a59b5e..933228443b96 100644 > --- a/drivers/gpu/drm/i915/i915_debugfs.c > +++ b/drivers/gpu/drm/i915/i915_debugfs.c > @@ -2866,7 +2866,6 @@ static void intel_connector_info(struct seq_file *m, > if (connector->status == connector_status_disconnected) > return; > > - seq_printf(m, "\tname: %s\n", connector->display_info.name); > seq_printf(m, "\tphysical dimensions: %dx%dmm\n", > connector->display_info.width_mm, > connector->display_info.height_mm); > diff --git a/drivers/gpu/drm/panel/panel-arm-versatile.c > b/drivers/gpu/drm/panel/panel-arm-versatile.c > index 078fa2c0eef8..a79908dfa3c8 100644 > --- a/drivers/gpu/drm/panel/panel-arm-versatile.c > +++ b/drivers/gpu/drm/panel/panel-arm-versatile.c > @@ -264,8 +264,6 @@ static int versatile_panel_get_modes(struct drm_panel > *panel) > struct versatile_panel *vpanel = to_versatile_panel(panel); > struct drm_display_mode *mode; > > - strncpy(connector->display_info.name, vpanel->panel_type->name, > - DRM_DISPLAY_INFO_LEN); > connector->display_info.width_mm = vpanel->panel_type->width_mm; > connector->display_info.height_mm = vpanel->panel_type->height_mm; > connector->display_info.bus_flags = vpanel->panel_type->bus_flags; > diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9322.c > b/drivers/gpu/drm/panel/panel-ilitek-ili9322.c > index 35497ff08391..a1c4cd2940fb 100644 > --- a/drivers/gpu/drm/panel/panel-ilitek-ili9322.c > +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9322.c > @@ -662,8 +662,6 @@ static int ili9322_get_modes(struct drm_panel *panel) > struct ili9322 *ili = panel_to_ili9322(panel); > struct drm_display_mode *mode; > > - strncpy(connector->display_info.name, "ILI9322 TFT LCD driver\0", > - DRM_DISPLAY_INFO_LEN); > connector->display_info.width_mm = ili->conf->width_mm; > connector->display_info.height_mm = ili->conf->height_mm; > > diff --git a/drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c > b/drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c > index 5e8d4523e9ed..a1d8d92fac2b 100644 > --- a/drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c > +++ b/drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c > @@ -190,7 +190,6 @@ static int lcd_olinuxino_get_modes(struct drm_panel > *panel) > num++; > } > > - memcpy(connector->display_info.name, lcd_info->name, 32); > connector->display_info.width_mm = lcd_info->width_mm; > connector->display_info.height_mm = lcd_info->height_mm; > connector->display_info.bpc = lcd_info->bpc; > diff --git a/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c > b/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c > index 33c22ee036f8..f75bef24e050 100644 > --- a/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c > +++ b/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c > @@ -148,9 +148,6 @@ static int s6d16d0_get_modes(struct drm_panel *panel) > struct drm_connector *connector = panel->connector; > struct drm_display_mode *mode; > > - strncpy(connector->display_info.name, "Samsung S6D16D0\0", > - DRM_DISPLAY_INFO_LEN); > - > mode = drm_mode_duplicate(panel->drm, _s6d16d0_mode); > if (!mode) { > DRM_ERROR("bad mode or failed to add mode\n"); > diff --git a/drivers/gpu/drm/panel/panel-tpo-tpg110.c > b/drivers/gpu/drm/panel/panel-tpo-tpg110.c > index 25f00cfc1af4..71591e5f5938 100644 > --- a/drivers/gpu/drm/panel/panel-tpo-tpg110.c > +++ b/drivers/gpu/drm/panel/panel-tpo-tpg110.c > @@ -390,8 +390,6 @@ static int tpg110_get_modes(struct drm_panel *panel) > struct tpg110 *tpg = to_tpg110(panel); > struct drm_display_mode *mode; > > - strncpy(connector->display_info.name, tpg->panel_mode->name, > - DRM_DISPLAY_INFO_LEN); > connector->display_info.width_mm = tpg->width; > connector->display_info.height_mm = tpg->height; > connector->display_info.bus_flags = tpg->panel_mode->bus_flags; > diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h >
Re: [Intel-gfx] [PATCH 2/4] drm: Fix tabs vs. spaces
On Tue, Mar 26, 2019 at 07:33:59PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > A set of 8 spaces has snuck in. Replace with a tab, and > toss in an extra newline while at it. > > Signed-off-by: Ville Syrjälä > --- > include/drm/drm_connector.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h > index fcdca46e0c24..c5bff7518ec5 100644 > --- a/include/drm/drm_connector.h > +++ b/include/drm/drm_connector.h > @@ -363,7 +363,8 @@ struct drm_display_info { > /** >* @width_mm: Physical width in mm. >*/ > -unsigned int width_mm; > + unsigned int width_mm; > + Reviewed-by: Daniel Vetter > /** >* @height_mm: Physical height in mm. >*/ > -- > 2.19.2 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 1/4] drm: Nuke unused drm_display_info.pixel_clock
On Tue, Mar 26, 2019 at 07:33:58PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > drm_display_info.pixel_clock is unused. Let's get rid of it. > > Signed-off-by: Ville Syrjälä > --- > include/drm/drm_connector.h | 6 -- > 1 file changed, 6 deletions(-) > > diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h > index bb3bd8e1633a..fcdca46e0c24 100644 > --- a/include/drm/drm_connector.h > +++ b/include/drm/drm_connector.h > @@ -369,12 +369,6 @@ struct drm_display_info { >*/ > unsigned int height_mm; > > - /** > - * @pixel_clock: Maximum pixel clock supported by the sink, in units of > - * 100Hz. This mismatches the clock in _display_mode (which is in > - * kHZ), because that's what the EDID uses as base unit. > - */ > - unsigned int pixel_clock; I'm wondering how I've come up with this fantasy of a text, because afaict it wasn't ever used. At least seems unused back when I wrote the kerneldoc. *shrug* Reviewed-by: Daniel Vetter > /** >* @bpc: Maximum bits per color channel. Used by HDMI and DP outputs. >*/ > -- > 2.19.2 > > ___ > dri-devel mailing list > dri-de...@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 1/2] drm/i915: Do not enable FEC without DSC
On Tue, Mar 26, 2019 at 06:16:57PM +0200, Ville Syrjälä wrote: > On Tue, Mar 26, 2019 at 09:00:27AM -0700, Manasi Navare wrote: > > On Tue, Mar 26, 2019 at 04:49:02PM +0200, Ville Syrjala wrote: > > > From: Ville Syrjälä > > > > > > Currently we enable FEC even when DSC is no used. While that is > > > theoretically valid supposedly there isn't much of a benefit from > > > this. But more importantly we do not account for the FEC link > > > bandwidth overhead (2.4%) in the non-DSC link bandwidth computations. > > > So the code may think we have enough bandwidth when we in fact > > > do not. > > > > > > Cc: Anusha Srivatsa > > > Cc: Manasi Navare > > > Fixes: 240999cf339f ("i915/dp/fec: Add fec_enable to the crtc state.") > > > Signed-off-by: Ville Syrjälä > > > --- > > > drivers/gpu/drm/i915/intel_dp.c | 6 +++--- > > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > > > diff --git a/drivers/gpu/drm/i915/intel_dp.c > > > b/drivers/gpu/drm/i915/intel_dp.c > > > index 326de12c3f44..bbf678561509 100644 > > > --- a/drivers/gpu/drm/i915/intel_dp.c > > > +++ b/drivers/gpu/drm/i915/intel_dp.c > > > @@ -1925,6 +1925,9 @@ static int intel_dp_dsc_compute_config(struct > > > intel_dp *intel_dp, > > > int pipe_bpp; > > > int ret; > > > > > > + pipe_config->fec_enable = !intel_dp_is_edp(intel_dp) && > > > + intel_dp_supports_fec(intel_dp, pipe_config); > > > + > > > > We could still not enable DSC after this point since it has more checks in > > this > > function. Even though in that case we would fail the encoder config so > > wouldnt > > matter if we have enabled FEC or not, but its less intutive. > > IMHO, the ideal place to set the fec enable is in > > intel_dp_compute_link_config() > > after the all to dsc_compute_config and set it only if > > pipe_config->dsc_params.compression_enable > > That would require changing intel_dp_supports_dsc() which I decided > wasn't worth the hassle. Hmm, yea because intel_dp_supports_dsc depends on fec_enable. In that case we would need to change that to use intel_dp_supports_fec(). TBH that makes more sense since we should set dp_supports based on HW FEC capability and then set the crtc_state->fec_enable based on crtc_state->dsc_params.compression_enable. But since it doesnt change the functionality, I am ok either ways. Manasi > > > > > Manasi > > > > > if (!intel_dp_supports_dsc(intel_dp, pipe_config)) > > > return -EINVAL; > > > > > > @@ -2168,9 +2171,6 @@ intel_dp_compute_config(struct intel_encoder > > > *encoder, > > > if (adjusted_mode->flags & DRM_MODE_FLAG_DBLCLK) > > > return -EINVAL; > > > > > > - pipe_config->fec_enable = !intel_dp_is_edp(intel_dp) && > > > - intel_dp_supports_fec(intel_dp, pipe_config); > > > - > > > ret = intel_dp_compute_link_config(encoder, pipe_config, conn_state); > > > if (ret < 0) > > > return ret; > > > -- > > > 2.19.2 > > > > > > ___ > > > Intel-gfx mailing list > > > Intel-gfx@lists.freedesktop.org > > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx > > -- > Ville Syrjälä > Intel ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 15/16] drm/client: Hack: Add bootsplash example
An example to showcase the client API. TODO: A bootsplash client needs a way to tell drm_fb_helper to stay away, otherwise it will chime in on setup and hotplug. Most DRM drivers register fbdev before calling drm_dev_register() (the generic emulation is an exception). This have to be reversed for bootsplash to fend off fbdev. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/Kconfig | 5 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/drm_bootsplash.c | 216 +++ drivers/gpu/drm/drm_client.c | 7 + drivers/gpu/drm/drm_drv.c| 4 + include/drm/drm_client.h | 3 + 6 files changed, 236 insertions(+) create mode 100644 drivers/gpu/drm/drm_bootsplash.c diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index 5e1bc630b885..a7019c54e2a2 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -65,6 +65,11 @@ config DRM_DEBUG_SELFTEST If in doubt, say "N". +config DRM_CLIENT_BOOTSPLASH + bool "DRM Bootsplash" + help + DRM Bootsplash + config DRM_KMS_HELPER tristate depends on DRM diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index e630eccb951c..ac0573023842 100644 --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile @@ -32,6 +32,7 @@ drm-$(CONFIG_OF) += drm_of.o drm-$(CONFIG_AGP) += drm_agpsupport.o drm-$(CONFIG_DEBUG_FS) += drm_debugfs.o drm_debugfs_crc.o drm-$(CONFIG_DRM_LOAD_EDID_FIRMWARE) += drm_edid_load.o +drm-$(CONFIG_DRM_CLIENT_BOOTSPLASH) += drm_bootsplash.o drm_kms_helper-y := drm_crtc_helper.o drm_dp_helper.o drm_dsc.o drm_probe_helper.o \ drm_plane_helper.o drm_dp_mst_topology.o drm_atomic_helper.o \ diff --git a/drivers/gpu/drm/drm_bootsplash.c b/drivers/gpu/drm/drm_bootsplash.c new file mode 100644 index ..fdc3349a2496 --- /dev/null +++ b/drivers/gpu/drm/drm_bootsplash.c @@ -0,0 +1,216 @@ +/* DRM internal client example */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +// drm_lastclose() +#include "drm_internal.h" + +static bool drm_bootsplash_enabled = true; +module_param_named(bootsplash_enabled, drm_bootsplash_enabled, bool, 0600); +MODULE_PARM_DESC(bootsplash_enabled, "Enable bootsplash client [default=true]"); + +struct drm_bootsplash { + struct drm_client_dev client; + struct mutex lock; + struct work_struct worker; + bool started; + bool stop; +}; + +static bool drm_bootsplash_key_pressed; + +static int drm_bootsplash_keyboard_notifier_call(struct notifier_block *blk, +unsigned long code, void *_param) +{ + /* Any key is good */ + drm_bootsplash_key_pressed = true; + + return NOTIFY_OK; +} + +static struct notifier_block drm_bootsplash_keyboard_notifier_block = { + .notifier_call = drm_bootsplash_keyboard_notifier_call, +}; + +static u32 drm_bootsplash_color_table[3] = { + 0x00ff, 0xff00, 0x00ff, +}; + +/* Draw a box with changing colors */ +static void drm_bootsplash_draw(struct drm_client_buffer *buffer, unsigned int sequence) +{ + unsigned int width = buffer->fb->width; + unsigned int height = buffer->fb->height; + unsigned int x, y; + u32 *pix; + + pix = buffer->vaddr; + pix += ((height / 2) - 50) * width; + pix += (width / 2) - 50; + + for (y = 0; y < 100; y++) { + for (x = 0; x < 100; x++) + *pix++ = drm_bootsplash_color_table[sequence]; + pix += width - 100; + } +} + +static void drm_bootsplash_worker(struct work_struct *work) +{ + struct drm_bootsplash *splash = container_of(work, struct drm_bootsplash, worker); + struct drm_client_dev *client = >client; + struct drm_device *dev = client->dev; + struct drm_client_display *display; + unsigned int buffer_num = 0, sequence = 0, i; + bool stop; + int ret = 0; + + while (!drm_bootsplash_key_pressed) { + mutex_lock(>lock); + stop = splash->stop; + mutex_unlock(>lock); + if (stop) + break; + + buffer_num = !buffer_num; + + mutex_lock(>displaylist_mutex); + + ret = -ENOENT; + + i = 0; + drm_client_for_each_display(display, client) { + DRM_DEBUG_KMS("draw: i=%u, buffer_num=%u, sequence=%u\n", i++, buffer_num, sequence); + + drm_bootsplash_draw(display->buffers[buffer_num], sequence); + + ret = drm_client_display_commit_buffer(display, buffer_num); + if (ret == -EBUSY) + break; + + } + mutex_unlock(>displaylist_mutex); + + if (ret == -ENOENT || ret ==
[Intel-gfx] [PATCH 16/16] drm/vc4: Call drm_dev_register() after all setup is done
drm_dev_register() initializes internal clients like bootsplash as the last thing it does, so all setup needs to be done at this point. Fix by calling vc4_kms_load() before registering. Also check the error code returned from that function. Cc: Eric Anholt Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/vc4/vc4_drv.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c index 4daf44fd4548..ba87b2dfa767 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c @@ -280,11 +280,13 @@ static int vc4_drm_bind(struct device *dev) drm_fb_helper_remove_conflicting_framebuffers(NULL, "vc4drmfb", false); - ret = drm_dev_register(drm, 0); + ret = vc4_kms_load(drm); if (ret < 0) goto unbind_all; - vc4_kms_load(drm); + ret = drm_dev_register(drm, 0); + if (ret < 0) + goto unbind_all; drm_fbdev_generic_setup(drm, 16); -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 14/16] drm/client: Add display abstraction
Add display abstraction and helpers to probe for displays and commit modesets. TODO: If the bootsplash client doesn't need to subclass drm_client_display, the callbacks can be removed. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_client.c | 415 +++ include/drm/drm_client.h | 80 +++ 2 files changed, 495 insertions(+) diff --git a/drivers/gpu/drm/drm_client.c b/drivers/gpu/drm/drm_client.c index 3bc96b0b30ec..ef01a31a9dbe 100644 --- a/drivers/gpu/drm/drm_client.c +++ b/drivers/gpu/drm/drm_client.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include @@ -106,6 +107,9 @@ int drm_client_init(struct drm_device *dev, struct drm_client_dev *client, drm_dev_get(dev); + mutex_init(>displaylist_mutex); + INIT_LIST_HEAD(>displaylist); + return 0; err_put_module: @@ -156,6 +160,9 @@ void drm_client_release(struct drm_client_dev *client) DRM_DEV_DEBUG_KMS(dev->dev, "%s\n", client->name); + drm_client_release_displays(client); + mutex_destroy(>displaylist_mutex); + drm_client_close(client); drm_dev_put(dev); if (client->funcs) @@ -1419,6 +1426,414 @@ void drm_client_modesets_dpms(struct drm_device *dev, struct drm_mode_set *modes } EXPORT_SYMBOL(drm_client_modesets_dpms); +static struct drm_client_display * +drm_client_display_alloc(struct drm_client_dev *client, unsigned int num_modesets) +{ + struct drm_client_display *display; + struct drm_mode_set *modesets; + + modesets = kcalloc(num_modesets + 1, sizeof(*modesets), GFP_KERNEL); + if (!modesets) + return ERR_PTR(-ENOMEM); + + if (client->funcs && client->funcs->display_alloc) + display = client->funcs->display_alloc(client); + else + display = kzalloc(sizeof(*display), GFP_KERNEL); + if (!display) + display = ERR_PTR(-ENOMEM); + + if (IS_ERR(display)) { + kfree(modesets); + return display; + } + + display->client = client; + display->modesets = modesets; + + return display; +} + +static void drm_client_display_release(struct drm_client_display *display) +{ + unsigned int i; + + if (!display) + return; + + for (i = 0; i < display->num_buffers; i++) + drm_client_framebuffer_delete(display->buffers[i]); + kfree(display->buffers); + + drm_mode_destroy(display->client->dev, display->mode); + + drm_client_modesets_release(display->modesets); + + if (display->client->funcs && display->client->funcs->display_free) + display->client->funcs->display_free(display); + else + kfree(display); +} + +static void drm_client_display_debugprint(struct drm_client_display *display) +{ + struct drm_display_mode *mode = display->mode; + struct drm_mode_set *modeset; + unsigned int i; + + DRM_DEBUG_KMS(" %dx%d %dHz\n", mode->hdisplay, mode->vdisplay, mode->vrefresh); + + drm_client_for_each_modeset(modeset, display->modesets) { + DRM_DEBUG_KMS("crtc=%d, connectors:", modeset->crtc->base.id); + for (i = 0; i < modeset->num_connectors; i++) + DRM_DEBUG_KMS(" %s\n", modeset->connectors[i]->name); + } +} + +static bool drm_client_modeset_equal(struct drm_mode_set *modeset1, struct drm_mode_set *modeset2) +{ + unsigned int i; + + if (modeset1->crtc != modeset2->crtc || + !drm_mode_equal(modeset1->mode, modeset2->mode) || + modeset1->x != modeset2->x || modeset1->y != modeset2->y || + modeset1->num_connectors != modeset2->num_connectors) + return false; + + for (i = 0; i < modeset1->num_connectors; i++) { + if (modeset1->connectors[i] != modeset2->connectors[i]) + return false; + } + + return true; +} + +static bool drm_client_display_equal(struct drm_client_display *display1, +struct drm_client_display *display2) +{ + struct drm_mode_set *modeset1, *modeset2; + + if (!display1 || !display2) + return false; + + if (display1 == display2) + return true; + + if (!drm_mode_equal(display1->mode, display2->mode)) + return false; + + for (modeset1 = display1->modesets, modeset2 = display2->modesets; +modeset1->crtc && modeset2->crtc; modeset1++, modeset2++) + if (!drm_client_modeset_equal(modeset1, modeset2)) + return false; + + return !modeset1->crtc && !modeset2->crtc; +} + +static int drm_client_display_framebuffer_create(struct drm_client_display *display, +unsigned int num_buffers, u32 format) +{ + struct drm_client_buffer **buffers; + struct
[Intel-gfx] [PATCH 12/16] drm/fb-helper: Move out modeset config code
No functional changes, just moving code as-is and fixing includes. There is one addition and that is exporting drm_client_modesets_probe(). Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_client.c| 698 drivers/gpu/drm/drm_fb_helper.c | 697 --- include/drm/drm_client.h| 4 +- 3 files changed, 700 insertions(+), 699 deletions(-) diff --git a/drivers/gpu/drm/drm_client.c b/drivers/gpu/drm/drm_client.c index 5b199c051960..3bc96b0b30ec 100644 --- a/drivers/gpu/drm/drm_client.c +++ b/drivers/gpu/drm/drm_client.c @@ -11,9 +11,11 @@ #include #include +#include #include #include #include +#include #include #include #include @@ -24,6 +26,12 @@ #include "drm_crtc_internal.h" #include "drm_internal.h" +#define DRM_CLIENT_MAX_CLONED_CONNECTORS 8 + +struct drm_client_offset { + int x, y; +}; + /** * DOC: overview * @@ -486,6 +494,696 @@ struct drm_mode_set *drm_client_find_modeset(struct drm_mode_set *modesets, stru } EXPORT_SYMBOL(drm_client_find_modeset); +static struct drm_display_mode * +drm_connector_has_preferred_mode(struct drm_connector *connector, int width, int height) +{ + struct drm_display_mode *mode; + + list_for_each_entry(mode, >modes, head) { + if (mode->hdisplay > width || + mode->vdisplay > height) + continue; + if (mode->type & DRM_MODE_TYPE_PREFERRED) + return mode; + } + return NULL; +} + +static struct drm_display_mode * +drm_connector_pick_cmdline_mode(struct drm_connector *connector) +{ + struct drm_cmdline_mode *cmdline_mode; + struct drm_display_mode *mode; + bool prefer_non_interlace; + + cmdline_mode = >cmdline_mode; + if (cmdline_mode->specified == false) + return NULL; + + /* attempt to find a matching mode in the list of modes +* we have gotten so far, if not add a CVT mode that conforms +*/ + if (cmdline_mode->rb || cmdline_mode->margins) + goto create_mode; + + prefer_non_interlace = !cmdline_mode->interlace; +again: + list_for_each_entry(mode, >modes, head) { + /* check width/height */ + if (mode->hdisplay != cmdline_mode->xres || + mode->vdisplay != cmdline_mode->yres) + continue; + + if (cmdline_mode->refresh_specified) { + if (mode->vrefresh != cmdline_mode->refresh) + continue; + } + + if (cmdline_mode->interlace) { + if (!(mode->flags & DRM_MODE_FLAG_INTERLACE)) + continue; + } else if (prefer_non_interlace) { + if (mode->flags & DRM_MODE_FLAG_INTERLACE) + continue; + } + return mode; + } + + if (prefer_non_interlace) { + prefer_non_interlace = false; + goto again; + } + +create_mode: + mode = drm_mode_create_from_cmdline_mode(connector->dev, cmdline_mode); + list_add(>head, >modes); + return mode; +} + +static bool drm_connector_enabled(struct drm_connector *connector, bool strict) +{ + bool enable; + + if (connector->display_info.non_desktop) + return false; + + if (strict) + enable = connector->status == connector_status_connected; + else + enable = connector->status != connector_status_disconnected; + + return enable; +} + +static void drm_client_connectors_enabled(struct drm_connector **connectors, + unsigned int connector_count, + bool *enabled) +{ + bool any_enabled = false; + struct drm_connector *connector; + int i = 0; + + for (i = 0; i < connector_count; i++) { + connector = connectors[i]; + enabled[i] = drm_connector_enabled(connector, true); + DRM_DEBUG_KMS("connector %d enabled? %s\n", connector->base.id, + connector->display_info.non_desktop ? "non desktop" : enabled[i] ? "yes" : "no"); + + any_enabled |= enabled[i]; + } + + if (any_enabled) + return; + + for (i = 0; i < connector_count; i++) + enabled[i] = drm_connector_enabled(connectors[i], false); +} + +static bool drm_client_target_cloned(struct drm_device *dev, +struct drm_connector **connectors, +unsigned int connector_count, +struct drm_display_mode **modes, +struct drm_client_offset *offsets, +bool *enabled, int width, int
[Intel-gfx] [PATCH 13/16] drm/fb-helper: Avoid race with DRM userspace
drm_fb_helper_is_bound() is used to check if DRM userspace is in control. This is done by looking at the fb on the primary plane. By the time fb-helper gets around to committing, it's possible that the facts have changed. Avoid this race by holding the drm_device->master_mutex lock while committing. When DRM userspace does its first open, it will now wait until fb-helper is done. The helper will stay away if there's a master. Locking rule: Always take the fb-helper lock first. Suggested-by: Daniel Vetter Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_auth.c | 20 ++ drivers/gpu/drm/drm_fb_helper.c | 49 - drivers/gpu/drm/drm_internal.h | 2 ++ 3 files changed, 58 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/drm_auth.c b/drivers/gpu/drm/drm_auth.c index 1669c42c40ed..db199807b7dc 100644 --- a/drivers/gpu/drm/drm_auth.c +++ b/drivers/gpu/drm/drm_auth.c @@ -368,3 +368,23 @@ void drm_master_put(struct drm_master **master) *master = NULL; } EXPORT_SYMBOL(drm_master_put); + +/* Used by drm_client and drm_fb_helper */ +bool drm_master_internal_acquire(struct drm_device *dev) +{ + mutex_lock(>master_mutex); + if (dev->master) { + mutex_unlock(>master_mutex); + return false; + } + + return true; +} +EXPORT_SYMBOL(drm_master_internal_acquire); + +/* Used by drm_client and drm_fb_helper */ +void drm_master_internal_release(struct drm_device *dev) +{ + mutex_unlock(>master_mutex); +} +EXPORT_SYMBOL(drm_master_internal_release); diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 4a073cd4e423..9f253fcf3f79 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -41,6 +41,8 @@ #include #include +#include "drm_internal.h" + static bool drm_fbdev_emulation = true; module_param_named(fbdev_emulation, drm_fbdev_emulation, bool, 0600); MODULE_PARM_DESC(fbdev_emulation, @@ -235,7 +237,12 @@ int drm_fb_helper_restore_fbdev_mode_unlocked(struct drm_fb_helper *fb_helper) return 0; mutex_lock(_helper->lock); - ret = drm_client_modesets_commit(fb_helper->dev, fb_helper->modesets); + if (drm_master_internal_acquire(fb_helper->dev)) { + ret = drm_client_modesets_commit(fb_helper->dev, fb_helper->modesets); + drm_master_internal_release(fb_helper->dev); + } else { + ret = -EBUSY; + } do_delayed = fb_helper->delayed_hotplug; if (do_delayed) @@ -332,13 +339,16 @@ static struct sysrq_key_op sysrq_drm_fb_helper_restore_op = { }; static void drm_fb_helper_dpms(struct fb_info *info, int dpms_mode) { struct drm_fb_helper *fb_helper = info->par; + struct drm_device *dev = fb_helper->dev; /* * For each CRTC in this fb, turn the connectors on/off. */ mutex_lock(_helper->lock); - if (drm_fb_helper_is_bound(fb_helper)) - drm_client_modesets_dpms(fb_helper->dev, fb_helper->modesets, dpms_mode); + if (drm_master_internal_acquire(dev)) { + drm_client_modesets_dpms(dev, fb_helper->modesets, dpms_mode); + drm_master_internal_release(dev); + } mutex_unlock(_helper->lock); } @@ -1097,6 +1107,7 @@ static int setcmap_atomic(struct fb_cmap *cmap, struct fb_info *info) int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info) { struct drm_fb_helper *fb_helper = info->par; + struct drm_device *dev = fb_helper->dev; int ret; if (oops_in_progress) @@ -1104,9 +1115,9 @@ int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info) mutex_lock(_helper->lock); - if (!drm_fb_helper_is_bound(fb_helper)) { + if (!drm_master_internal_acquire(dev)) { ret = -EBUSY; - goto out; + goto unlock; } if (info->fix.visual == FB_VISUAL_TRUECOLOR) @@ -1116,7 +1127,8 @@ int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info) else ret = setcmap_legacy(cmap, info); -out: + drm_master_internal_release(dev); +unlock: mutex_unlock(_helper->lock); return ret; @@ -1136,11 +1148,13 @@ int drm_fb_helper_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg) { struct drm_fb_helper *fb_helper = info->par; + struct drm_device *dev = fb_helper->dev; struct drm_crtc *crtc; int ret = 0; mutex_lock(_helper->lock); - if (!drm_fb_helper_is_bound(fb_helper)) { + + if (!drm_master_internal_acquire(dev)) { ret = -EBUSY; goto unlock; } @@ -1177,13 +1191,15 @@ int drm_fb_helper_ioctl(struct fb_info *info, unsigned int cmd, } ret = 0; - goto unlock; + break;
[Intel-gfx] [PATCH 10/16] drm/fb-helper: Remove drm_fb_helper_connector
All drivers add all their connectors so there's no need to keep around an array of available connectors. Rename functions which signature is changed since they will be moved to drm_client in a later patch. Signed-off-by: Noralf Trønnes --- checkpatch complains, but I'm unable to satisfy it: ERROR: Macros with complex values should be enclosed in parentheses #939: FILE: include/drm/drm_client.h:160: +#define drm_client_for_each_connector_iter(connector, iter) \ + drm_for_each_connector_iter(connector, iter) \ + if (connector->connector_type != DRM_MODE_CONNECTOR_WRITEBACK) Documentation/gpu/todo.rst | 3 + drivers/gpu/drm/drm_fb_helper.c | 499 ++-- include/drm/drm_client.h| 15 + include/drm/drm_fb_helper.h | 80 ++--- 4 files changed, 194 insertions(+), 403 deletions(-) diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst index 8fa08b5feab7..f6cdd1c26788 100644 --- a/Documentation/gpu/todo.rst +++ b/Documentation/gpu/todo.rst @@ -306,6 +306,9 @@ drm_fb_helper cleanup tasks - The max connector argument for drm_fb_helper_init() and drm_fb_helper_fbdev_setup() isn't used anymore and can be removed. +- The helper doesn't keep an array of connectors anymore so these can be + removed: drm_fb_helper_single_add_all_connectors(), + drm_fb_helper_add_one_connector() and drm_fb_helper_remove_one_connector(). Core refactorings = diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index be946d702019..de805956849d 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -92,12 +92,6 @@ static DEFINE_MUTEX(kernel_fb_helper_lock); * Setup fbdev emulation by calling drm_fb_helper_fbdev_setup() and tear it * down by calling drm_fb_helper_fbdev_teardown(). * - * Drivers that need to handle connector hotplugging (e.g. dp mst) can't use - * the setup helper and will need to do the whole four-step setup process with - * drm_fb_helper_prepare(), drm_fb_helper_init(), - * drm_fb_helper_single_add_all_connectors(), enable hotplugging and - * drm_fb_helper_initial_config() to avoid a possible race window. - * * At runtime drivers should restore the fbdev console by using * drm_fb_helper_lastclose() as their _driver.lastclose callback. * They should also notify the fb helper code from updates to the output @@ -120,8 +114,7 @@ static DEFINE_MUTEX(kernel_fb_helper_lock); * encoders and connectors. To finish up the fbdev helper initialization, the * drm_fb_helper_init() function is called. To probe for all attached displays * and set up an initial configuration using the detected hardware, drivers - * should call drm_fb_helper_single_add_all_connectors() followed by - * drm_fb_helper_initial_config(). + * should call drm_fb_helper_initial_config(). * * If _framebuffer_funcs.dirty is set, the * drm_fb_helper_{cfb,sys}_{write,fillrect,copyarea,imageblit} functions will @@ -134,165 +127,6 @@ static DEFINE_MUTEX(kernel_fb_helper_lock); * deferred I/O (coupled with drm_fb_helper_fbdev_teardown()). */ -#define drm_fb_helper_for_each_connector(fbh, i__) \ - for (({ lockdep_assert_held(&(fbh)->lock); }), \ -i__ = 0; i__ < (fbh)->connector_count; i__++) - -static int __drm_fb_helper_add_one_connector(struct drm_fb_helper *fb_helper, -struct drm_connector *connector) -{ - struct drm_fb_helper_connector *fb_conn; - struct drm_fb_helper_connector **temp; - unsigned int count; - - if (!drm_fbdev_emulation) - return 0; - - lockdep_assert_held(_helper->lock); - - count = fb_helper->connector_count + 1; - - if (count > fb_helper->connector_info_alloc_count) { - size_t size = count * sizeof(fb_conn); - - temp = krealloc(fb_helper->connector_info, size, GFP_KERNEL); - if (!temp) - return -ENOMEM; - - fb_helper->connector_info_alloc_count = count; - fb_helper->connector_info = temp; - } - - fb_conn = kzalloc(sizeof(*fb_conn), GFP_KERNEL); - if (!fb_conn) - return -ENOMEM; - - drm_connector_get(connector); - fb_conn->connector = connector; - fb_helper->connector_info[fb_helper->connector_count++] = fb_conn; - - return 0; -} - -int drm_fb_helper_add_one_connector(struct drm_fb_helper *fb_helper, - struct drm_connector *connector) -{ - int err; - - if (!fb_helper) - return 0; - - mutex_lock(_helper->lock); - err = __drm_fb_helper_add_one_connector(fb_helper, connector); - mutex_unlock(_helper->lock); - - return err; -} -EXPORT_SYMBOL(drm_fb_helper_add_one_connector); - -/** - * drm_fb_helper_single_add_all_connectors() - add all connectors to fbdev - *emulation
[Intel-gfx] [PATCH 11/16] drm/fb-helper: Prepare to move out modeset config code
This prepares the modeset code so it can be moved out as-is in the next patch. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_fb_helper.c | 75 + include/drm/drm_fb_helper.h | 4 -- 2 files changed, 57 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index de805956849d..afe4d4220e4d 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -45,6 +45,10 @@ #include "drm_crtc_internal.h" #include "drm_crtc_helper_internal.h" +struct drm_client_offset { + int x, y; +}; + static bool drm_fbdev_emulation = true; module_param_named(fbdev_emulation, drm_fbdev_emulation, bool, 0600); MODULE_PARM_DESC(fbdev_emulation, @@ -1792,7 +1796,7 @@ static bool drm_client_target_cloned(struct drm_device *dev, struct drm_connector **connectors, unsigned int connector_count, struct drm_display_mode **modes, -struct drm_fb_offset *offsets, +struct drm_client_offset *offsets, bool *enabled, int width, int height) { int count, i, j; @@ -1871,7 +1875,7 @@ static bool drm_client_target_cloned(struct drm_device *dev, static int drm_client_get_tile_offsets(struct drm_connector **connectors, unsigned int connector_count, struct drm_display_mode **modes, - struct drm_fb_offset *offsets, + struct drm_client_offset *offsets, int idx, int h_idx, int v_idx) { @@ -1904,7 +1908,7 @@ static int drm_client_get_tile_offsets(struct drm_connector **connectors, static bool drm_client_target_preferred(struct drm_connector **connectors, unsigned int connector_count, struct drm_display_mode **modes, - struct drm_fb_offset *offsets, + struct drm_client_offset *offsets, bool *enabled, int width, int height) { const u64 mask = BIT_ULL(connector_count) - 1; @@ -2068,7 +2072,7 @@ static bool drm_client_firmware_config(struct drm_device *dev, unsigned int connector_count, struct drm_crtc **crtcs, struct drm_display_mode **modes, - struct drm_fb_offset *offsets, + struct drm_client_offset *offsets, bool *enabled, int width, int height) { unsigned int count = min_t(unsigned int, connector_count, BITS_PER_LONG); @@ -2236,32 +2240,51 @@ static bool drm_client_firmware_config(struct drm_device *dev, return ret; } -static void drm_setup_crtcs(struct drm_fb_helper *fb_helper, - u32 width, u32 height) +/** + * drm_client_modesets_probe() - Probe for displays + * @dev: DRM device + * @width: Maximum display mode width (optional) + * @height: Maximum display mode height (optional) + * + * This function tries to set up pipelines for enabled connectors and returns + * the CRTC config as a _mode_set array. + * + * Use drm_client_modesets_release() to free the array and its resources. + * + * Returns: + * A _mode_set array on success, NULL if no connectors are found + * or error pointer on failure. + */ +struct drm_mode_set * +drm_client_modesets_probe(struct drm_device *dev, unsigned int width, unsigned int height) { struct drm_connector *connector, **connectors = NULL; struct drm_connector_list_iter conn_iter; - struct drm_device *dev = fb_helper->dev; struct drm_mode_set *modesets = NULL; unsigned int total_modes_count = 0; + struct drm_client_offset *offsets; unsigned int connector_count = 0; struct drm_display_mode **modes; - struct drm_fb_offset *offsets; struct drm_crtc **crtcs; + int i, ret = 0; bool *enabled; - int i; DRM_DEBUG_KMS("\n"); - /* prevent concurrent modification of connector_count by hotplug */ - lockdep_assert_held(_helper->lock); + + if (!width) + width = dev->mode_config.max_width; + if (!height) + height = dev->mode_config.max_height; drm_connector_list_iter_begin(dev, _iter); drm_client_for_each_connector_iter(connector, _iter) { struct drm_connector **tmp; tmp = krealloc(connectors, (connector_count + 1) * sizeof(*connectors), GFP_KERNEL); -
[Intel-gfx] [PATCH] drm/i915: Adding missing '; ' to ENGINE_INSTANCES
Tvrtko spotted that I left off the trailing ';'. It went unnoticed by CI because despite adding the macro, we didn't add a user, so include one as well (a simple debug print). Reported-by: Tvrtko Ursulin Fixes: 97ee6e925552 ("drm/i915: stop storing the media fuse") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/intel_device_info.c | 8 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 380198628d83..f73e78cf2f11 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -2458,7 +2458,7 @@ static inline unsigned int i915_sg_segment_size(void) unsigned int first__ = (first); \ unsigned int count__ = (count); \ (INTEL_INFO(dev_priv)->engine_mask &\ -GENMASK(first__ + count__ - 1, first__)) >> first__\ +GENMASK(first__ + count__ - 1, first__)) >> first__; \ }) #define VDBOX_MASK(dev_priv) \ ENGINE_INSTANCES_MASK(dev_priv, VCS0, I915_MAX_VCS) diff --git a/drivers/gpu/drm/i915/intel_device_info.c b/drivers/gpu/drm/i915/intel_device_info.c index 5776a0def7ac..bd226b9b7f8f 100644 --- a/drivers/gpu/drm/i915/intel_device_info.c +++ b/drivers/gpu/drm/i915/intel_device_info.c @@ -890,7 +890,6 @@ void intel_device_info_init_mmio(struct drm_i915_private *dev_priv) vebox_mask = (media_fuse & GEN11_GT_VEBOX_DISABLE_MASK) >> GEN11_GT_VEBOX_DISABLE_SHIFT; - DRM_DEBUG_DRIVER("vdbox enable: %04x\n", vdbox_mask); for (i = 0; i < I915_MAX_VCS; i++) { if (!HAS_ENGINE(dev_priv, _VCS(i))) continue; @@ -908,8 +907,10 @@ void intel_device_info_init_mmio(struct drm_i915_private *dev_priv) if (logical_vdbox++ % 2 == 0) RUNTIME_INFO(dev_priv)->vdbox_sfc_access |= BIT(i); } + DRM_DEBUG_DRIVER("vdbox enable: %04x, instances: %04lx\n", + vdbox_mask, VDBOX_MASK(dev_priv)); + GEM_BUG_ON(vdbox_mask != VDBOX_MASK(dev_priv)); - DRM_DEBUG_DRIVER("vebox enable: %04x\n", vebox_mask); for (i = 0; i < I915_MAX_VECS; i++) { if (!HAS_ENGINE(dev_priv, _VECS(i))) continue; @@ -919,4 +920,7 @@ void intel_device_info_init_mmio(struct drm_i915_private *dev_priv) DRM_DEBUG_DRIVER("vecs%u fused off\n", i); } } + DRM_DEBUG_DRIVER("vebox enable: %04x, instances: %04lx\n", + vebox_mask, VEBOX_MASK(dev_priv)); + GEM_BUG_ON(vebox_mask != VEBOX_MASK(dev_priv)); } -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 06/16] drm/i915/fbdev: Move intel_fb_initial_config() to fbdev helper
It is generic code and having it in the helper will let other drivers benefit from it. One change was necessary assuming this to be true: INTEL_INFO(dev_priv)->num_pipes == dev->mode_config.num_crtc Suggested-by: Daniel Vetter Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: intel-gfx@lists.freedesktop.org Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_fb_helper.c| 194 - drivers/gpu/drm/i915/intel_fbdev.c | 218 - include/drm/drm_fb_helper.h| 23 --- 3 files changed, 190 insertions(+), 245 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 36310901e935..634f4dcf0c41 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -2545,6 +2545,194 @@ static int drm_pick_crtcs(struct drm_fb_helper *fb_helper, return best_score; } +static struct drm_fb_helper_crtc * +drm_fb_helper_crtc(struct drm_fb_helper *fb_helper, struct drm_crtc *crtc) +{ + int i; + + for (i = 0; i < fb_helper->crtc_count; i++) + if (fb_helper->crtc_info[i].mode_set.crtc == crtc) + return _helper->crtc_info[i]; + + return NULL; +} + +/* Try to read the BIOS display configuration and use it for the initial config */ +static bool drm_fb_helper_firmware_config(struct drm_fb_helper *fb_helper, + struct drm_fb_helper_crtc **crtcs, + struct drm_display_mode **modes, + struct drm_fb_offset *offsets, + bool *enabled, int width, int height) +{ + struct drm_device *dev = fb_helper->dev; + unsigned int count = min(fb_helper->connector_count, BITS_PER_LONG); + unsigned long conn_configured, conn_seq; + int i, j; + bool *save_enabled; + bool fallback = true, ret = true; + int num_connectors_enabled = 0; + int num_connectors_detected = 0; + struct drm_modeset_acquire_ctx ctx; + + save_enabled = kcalloc(count, sizeof(bool), GFP_KERNEL); + if (!save_enabled) + return false; + + drm_modeset_acquire_init(, 0); + + while (drm_modeset_lock_all_ctx(dev, ) != 0) + drm_modeset_backoff(); + + memcpy(save_enabled, enabled, count); + conn_seq = GENMASK(count - 1, 0); + conn_configured = 0; +retry: + for (i = 0; i < count; i++) { + struct drm_fb_helper_connector *fb_conn; + struct drm_connector *connector; + struct drm_encoder *encoder; + struct drm_fb_helper_crtc *new_crtc; + + fb_conn = fb_helper->connector_info[i]; + connector = fb_conn->connector; + + if (conn_configured & BIT(i)) + continue; + + /* First pass, only consider tiled connectors */ + if (conn_seq == GENMASK(count - 1, 0) && !connector->has_tile) + continue; + + if (connector->status == connector_status_connected) + num_connectors_detected++; + + if (!enabled[i]) { + DRM_DEBUG_KMS("connector %s not enabled, skipping\n", + connector->name); + conn_configured |= BIT(i); + continue; + } + + if (connector->force == DRM_FORCE_OFF) { + DRM_DEBUG_KMS("connector %s is disabled by user, skipping\n", + connector->name); + enabled[i] = false; + continue; + } + + encoder = connector->state->best_encoder; + if (!encoder || WARN_ON(!connector->state->crtc)) { + if (connector->force > DRM_FORCE_OFF) + goto bail; + + DRM_DEBUG_KMS("connector %s has no encoder or crtc, skipping\n", + connector->name); + enabled[i] = false; + conn_configured |= BIT(i); + continue; + } + + num_connectors_enabled++; + + new_crtc = drm_fb_helper_crtc(fb_helper, connector->state->crtc); + + /* +* Make sure we're not trying to drive multiple connectors +* with a single CRTC, since our cloning support may not +* match the BIOS. +*/ + for (j = 0; j < count; j++) { + if (crtcs[j] == new_crtc) { + DRM_DEBUG_KMS("fallback: cloned configuration\n"); + goto bail; + } + } + + DRM_DEBUG_KMS("looking for cmdline mode
[Intel-gfx] [PATCH 08/16] drm/fb-helper: Prepare to move out commit code
This makes the necessary changes so the commit code can be moved out to drm_client as-is in the next patch. It's split up to ease review. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_fb_helper.c | 93 + 1 file changed, 59 insertions(+), 34 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 85bea51e2072..9dcb77dfff0a 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -382,9 +382,20 @@ int drm_fb_helper_debug_leave(struct fb_info *info) } EXPORT_SYMBOL(drm_fb_helper_debug_leave); -/* Check if the plane can hw rotate to match panel orientation */ -static bool drm_fb_helper_panel_rotation(struct drm_mode_set *modeset, -unsigned int *rotation) +/** + * drm_client_panel_rotation() - Check panel orientation + * @modeset: DRM modeset + * @rotation: Returned rotation value + * + * This function checks if the primary plane in @modeset can hw rotate to match + * the panel orientation on its connector. + * + * Note: Currently only 0 and 180 degrees are supported. + * + * Return: + * True if the plane can do the rotation, false otherwise. + */ +bool drm_client_panel_rotation(struct drm_mode_set *modeset, unsigned int *rotation) { struct drm_connector *connector = modeset->connectors[0]; struct drm_plane *plane = modeset->crtc->primary; @@ -425,9 +436,9 @@ static bool drm_fb_helper_panel_rotation(struct drm_mode_set *modeset, return true; } -static int restore_fbdev_mode_atomic(struct drm_fb_helper *fb_helper, bool active) +static int drm_client_modesets_commit_atomic(struct drm_device *dev, struct drm_mode_set *modesets, +bool active) { - struct drm_device *dev = fb_helper->dev; struct drm_plane_state *plane_state; struct drm_plane *plane; struct drm_atomic_state *state; @@ -463,11 +474,11 @@ static int restore_fbdev_mode_atomic(struct drm_fb_helper *fb_helper, bool activ goto out_state; } - drm_client_for_each_modeset(mode_set, fb_helper->modesets) { + drm_client_for_each_modeset(mode_set, modesets) { struct drm_plane *primary = mode_set->crtc->primary; unsigned int rotation; - if (drm_fb_helper_panel_rotation(mode_set, )) { + if (drm_client_panel_rotation(mode_set, )) { /* Cannot fail as we've already gotten the plane state above */ plane_state = drm_atomic_get_new_plane_state(state, primary); plane_state->rotation = rotation; @@ -509,14 +520,13 @@ static int restore_fbdev_mode_atomic(struct drm_fb_helper *fb_helper, bool activ goto retry; } -static int restore_fbdev_mode_legacy(struct drm_fb_helper *fb_helper) +static int drm_client_modesets_commit_legacy(struct drm_device *dev, struct drm_mode_set *modesets) { - struct drm_device *dev = fb_helper->dev; struct drm_mode_set *mode_set; struct drm_plane *plane; int ret = 0; - drm_modeset_lock_all(fb_helper->dev); + drm_modeset_lock_all(dev); drm_for_each_plane(plane, dev) { if (plane->type != DRM_PLANE_TYPE_PRIMARY) drm_plane_force_disable(plane); @@ -527,7 +537,7 @@ static int restore_fbdev_mode_legacy(struct drm_fb_helper *fb_helper) DRM_MODE_ROTATE_0); } - drm_client_for_each_modeset(mode_set, fb_helper->modesets) { + drm_client_for_each_modeset(mode_set, modesets) { struct drm_crtc *crtc = mode_set->crtc; if (crtc->funcs->cursor_set2) { @@ -545,19 +555,25 @@ static int restore_fbdev_mode_legacy(struct drm_fb_helper *fb_helper) goto out; } out: - drm_modeset_unlock_all(fb_helper->dev); + drm_modeset_unlock_all(dev); return ret; } -static int restore_fbdev_mode(struct drm_fb_helper *fb_helper) +/** + * drm_client_modesets_commit() - Commit CRTC configuration + * @dev: DRM device + * @modesets: Modeset array + * + * Returns: + * Zero on success or negative error code on failure. + */ +int drm_client_modesets_commit(struct drm_device *dev, struct drm_mode_set *modesets) { - struct drm_device *dev = fb_helper->dev; - if (drm_drv_uses_atomic_modeset(dev)) - return restore_fbdev_mode_atomic(fb_helper, true); + return drm_client_modesets_commit_atomic(dev, modesets, true); else - return restore_fbdev_mode_legacy(fb_helper); + return drm_client_modesets_commit_legacy(dev, modesets); } /** @@ -583,7 +599,7 @@ int drm_fb_helper_restore_fbdev_mode_unlocked(struct drm_fb_helper *fb_helper) return 0; mutex_lock(_helper->lock); - ret =
[Intel-gfx] [PATCH 03/16] drm/atomic: Move __drm_atomic_helper_disable_plane/set_config()
Prepare for moving drm_fb_helper modesetting code to drm_client. drm_client will be linked to drm.ko, so move __drm_atomic_helper_disable_plane() and __drm_atomic_helper_set_config() out of drm_kms_helper.ko. While at it, fix two checkpatch complaints: - WARNING: Block comments use a trailing */ on a separate line - CHECK: Alignment should match open parenthesis Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_atomic.c| 168 drivers/gpu/drm/drm_atomic_helper.c | 164 --- drivers/gpu/drm/drm_crtc_internal.h | 5 + include/drm/drm_atomic_helper.h | 4 - 4 files changed, 173 insertions(+), 168 deletions(-) diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index 5eb40130fafb..c3a9ffbf2310 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c @@ -1130,6 +1130,174 @@ int drm_atomic_nonblocking_commit(struct drm_atomic_state *state) } EXPORT_SYMBOL(drm_atomic_nonblocking_commit); +/* just used from drm-client and atomic-helper: */ +int __drm_atomic_helper_disable_plane(struct drm_plane *plane, + struct drm_plane_state *plane_state) +{ + int ret; + + ret = drm_atomic_set_crtc_for_plane(plane_state, NULL); + if (ret != 0) + return ret; + + drm_atomic_set_fb_for_plane(plane_state, NULL); + plane_state->crtc_x = 0; + plane_state->crtc_y = 0; + plane_state->crtc_w = 0; + plane_state->crtc_h = 0; + plane_state->src_x = 0; + plane_state->src_y = 0; + plane_state->src_w = 0; + plane_state->src_h = 0; + + return 0; +} +EXPORT_SYMBOL(__drm_atomic_helper_disable_plane); + +static int update_output_state(struct drm_atomic_state *state, + struct drm_mode_set *set) +{ + struct drm_device *dev = set->crtc->dev; + struct drm_crtc *crtc; + struct drm_crtc_state *new_crtc_state; + struct drm_connector *connector; + struct drm_connector_state *new_conn_state; + int ret, i; + + ret = drm_modeset_lock(>mode_config.connection_mutex, + state->acquire_ctx); + if (ret) + return ret; + + /* First disable all connectors on the target crtc. */ + ret = drm_atomic_add_affected_connectors(state, set->crtc); + if (ret) + return ret; + + for_each_new_connector_in_state(state, connector, new_conn_state, i) { + if (new_conn_state->crtc == set->crtc) { + ret = drm_atomic_set_crtc_for_connector(new_conn_state, + NULL); + if (ret) + return ret; + + /* Make sure legacy setCrtc always re-trains */ + new_conn_state->link_status = DRM_LINK_STATUS_GOOD; + } + } + + /* Then set all connectors from set->connectors on the target crtc */ + for (i = 0; i < set->num_connectors; i++) { + new_conn_state = drm_atomic_get_connector_state(state, + set->connectors[i]); + if (IS_ERR(new_conn_state)) + return PTR_ERR(new_conn_state); + + ret = drm_atomic_set_crtc_for_connector(new_conn_state, + set->crtc); + if (ret) + return ret; + } + + for_each_new_crtc_in_state(state, crtc, new_crtc_state, i) { + /* +* Don't update ->enable for the CRTC in the set_config request, +* since a mismatch would indicate a bug in the upper layers. +* The actual modeset code later on will catch any +* inconsistencies here. +*/ + if (crtc == set->crtc) + continue; + + if (!new_crtc_state->connector_mask) { + ret = drm_atomic_set_mode_prop_for_crtc(new_crtc_state, + NULL); + if (ret < 0) + return ret; + + new_crtc_state->active = false; + } + } + + return 0; +} + +/* just used from drm-client and atomic-helper: */ +int __drm_atomic_helper_set_config(struct drm_mode_set *set, + struct drm_atomic_state *state) +{ + struct drm_crtc_state *crtc_state; + struct drm_plane_state *primary_state; + struct drm_crtc *crtc = set->crtc; + int hdisplay, vdisplay; + int ret; + + crtc_state = drm_atomic_get_crtc_state(state, crtc); + if (IS_ERR(crtc_state)) + return PTR_ERR(crtc_state); + + primary_state =
[Intel-gfx] [PATCH 02/16] drm/fb-helper: dpms_legacy(): Only set on connectors in use
For each enabled crtc the functions sets dpms on all registered connectors. Limit this to only doing it once and on the connectors actually in use. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_fb_helper.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index eea15465da7a..b91df658db59 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -639,20 +639,19 @@ static struct sysrq_key_op sysrq_drm_fb_helper_restore_op = { }; static void dpms_legacy(struct drm_fb_helper *fb_helper, int dpms_mode) { struct drm_device *dev = fb_helper->dev; - struct drm_crtc *crtc; struct drm_connector *connector; + struct drm_mode_set *modeset; int i, j; drm_modeset_lock_all(dev); for (i = 0; i < fb_helper->crtc_count; i++) { - crtc = fb_helper->crtc_info[i].mode_set.crtc; + modeset = _helper->crtc_info[i].mode_set; - if (!crtc->enabled) + if (!modeset->crtc->enabled) continue; - /* Walk the connectors & encoders on this fb turning them on/off */ - drm_fb_helper_for_each_connector(fb_helper, j) { - connector = fb_helper->connector_info[j]->connector; + for (j = 0; j < modeset->num_connectors; j++) { + connector = modeset->connectors[j]; connector->funcs->dpms(connector, dpms_mode); drm_object_property_set_value(>base, dev->mode_config.dpms_property, dpms_mode); -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 09/16] drm/fb-helper: Move out commit code
Move the modeset commit code to drm_client. No changes except exporting API. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_client.c| 236 drivers/gpu/drm/drm_fb_helper.c | 232 --- include/drm/drm_client.h| 3 + 3 files changed, 239 insertions(+), 232 deletions(-) diff --git a/drivers/gpu/drm/drm_client.c b/drivers/gpu/drm/drm_client.c index 84f848f21679..5b199c051960 100644 --- a/drivers/gpu/drm/drm_client.c +++ b/drivers/gpu/drm/drm_client.c @@ -9,6 +9,7 @@ #include #include +#include #include #include #include @@ -485,6 +486,241 @@ struct drm_mode_set *drm_client_find_modeset(struct drm_mode_set *modesets, stru } EXPORT_SYMBOL(drm_client_find_modeset); +/** + * drm_client_panel_rotation() - Check panel orientation + * @modeset: DRM modeset + * @rotation: Returned rotation value + * + * This function checks if the primary plane in @modeset can hw rotate to match + * the panel orientation on its connector. + * + * Note: Currently only 0 and 180 degrees are supported. + * + * Return: + * True if the plane can do the rotation, false otherwise. + */ +bool drm_client_panel_rotation(struct drm_mode_set *modeset, unsigned int *rotation) +{ + struct drm_connector *connector = modeset->connectors[0]; + struct drm_plane *plane = modeset->crtc->primary; + u64 valid_mask = 0; + unsigned int i; + + if (!modeset->num_connectors) + return false; + + switch (connector->display_info.panel_orientation) { + case DRM_MODE_PANEL_ORIENTATION_BOTTOM_UP: + *rotation = DRM_MODE_ROTATE_180; + break; + case DRM_MODE_PANEL_ORIENTATION_LEFT_UP: + *rotation = DRM_MODE_ROTATE_90; + break; + case DRM_MODE_PANEL_ORIENTATION_RIGHT_UP: + *rotation = DRM_MODE_ROTATE_270; + break; + default: + *rotation = DRM_MODE_ROTATE_0; + } + + /* +* TODO: support 90 / 270 degree hardware rotation, +* depending on the hardware this may require the framebuffer +* to be in a specific tiling format. +*/ + if (*rotation != DRM_MODE_ROTATE_180 || !plane->rotation_property) + return false; + + for (i = 0; i < plane->rotation_property->num_values; i++) + valid_mask |= (1ULL << plane->rotation_property->values[i]); + + if (!(*rotation & valid_mask)) + return false; + + return true; +} +EXPORT_SYMBOL(drm_client_panel_rotation); + +static int drm_client_modesets_commit_atomic(struct drm_device *dev, struct drm_mode_set *modesets, +bool active) +{ + struct drm_plane_state *plane_state; + struct drm_plane *plane; + struct drm_atomic_state *state; + struct drm_modeset_acquire_ctx ctx; + struct drm_mode_set *mode_set; + int ret; + + drm_modeset_acquire_init(, 0); + + state = drm_atomic_state_alloc(dev); + if (!state) { + ret = -ENOMEM; + goto out_ctx; + } + + state->acquire_ctx = +retry: + drm_for_each_plane(plane, dev) { + plane_state = drm_atomic_get_plane_state(state, plane); + if (IS_ERR(plane_state)) { + ret = PTR_ERR(plane_state); + goto out_state; + } + + plane_state->rotation = DRM_MODE_ROTATE_0; + + /* disable non-primary: */ + if (plane->type == DRM_PLANE_TYPE_PRIMARY) + continue; + + ret = __drm_atomic_helper_disable_plane(plane, plane_state); + if (ret != 0) + goto out_state; + } + + drm_client_for_each_modeset(mode_set, modesets) { + struct drm_plane *primary = mode_set->crtc->primary; + unsigned int rotation; + + if (drm_client_panel_rotation(mode_set, )) { + /* Cannot fail as we've already gotten the plane state above */ + plane_state = drm_atomic_get_new_plane_state(state, primary); + plane_state->rotation = rotation; + } + + ret = __drm_atomic_helper_set_config(mode_set, state); + if (ret != 0) + goto out_state; + + /* +* __drm_atomic_helper_set_config() sets active when a +* mode is set, unconditionally clear it if we force DPMS off +*/ + if (!active) { + struct drm_crtc *crtc = mode_set->crtc; + struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state, crtc); + + crtc_state->active = false; + } + } + + ret = drm_atomic_commit(state); + +out_state: + if (ret
[Intel-gfx] [PATCH 07/16] drm/fb-helper: Remove drm_fb_helper_crtc
It now only contains the modeset so use that directly instead. The modeset code will be moved to drm_client, so add code there. The modeset connector array size is hardcoded for the cloned case to avoid having to pass in a value from the driver. A value of 8 is chosen to err on the safe side. This means that the max connector argument for drm_fb_helper_init() and drm_fb_helper_fbdev_setup() isn't used anymore, a todo entry for this is added. Signed-off-by: Noralf Trønnes --- Documentation/gpu/todo.rst | 7 + drivers/gpu/drm/drm_client.c| 93 drivers/gpu/drm/drm_fb_helper.c | 262 +++- include/drm/drm_client.h| 16 ++ include/drm/drm_fb_helper.h | 14 +- 5 files changed, 207 insertions(+), 185 deletions(-) diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst index 1528ad2d598b..8fa08b5feab7 100644 --- a/Documentation/gpu/todo.rst +++ b/Documentation/gpu/todo.rst @@ -300,6 +300,13 @@ it to use drm_mode_hsync() instead. Contact: Sean Paul +drm_fb_helper cleanup tasks +--- + +- The max connector argument for drm_fb_helper_init() and + drm_fb_helper_fbdev_setup() isn't used anymore and can be removed. + + Core refactorings = diff --git a/drivers/gpu/drm/drm_client.c b/drivers/gpu/drm/drm_client.c index 9b2bd28dde0a..84f848f21679 100644 --- a/drivers/gpu/drm/drm_client.c +++ b/drivers/gpu/drm/drm_client.c @@ -392,6 +392,99 @@ void drm_client_framebuffer_delete(struct drm_client_buffer *buffer) } EXPORT_SYMBOL(drm_client_framebuffer_delete); +/** + * drm_client_modesets_create() - Create modeset array + * @dev: DRM device + * + * This function creates a _mode_set array, one entry per CRTC. + * + * Returns: + * A _mode_set array or an error pointer on allocation failure. + */ +struct drm_mode_set *drm_client_modesets_create(struct drm_device *dev) +{ + unsigned int num_crtc = dev->mode_config.num_crtc; + struct drm_mode_set *modeset, *modesets; + unsigned int max_connector_count = 1; + struct drm_crtc *crtc; + unsigned int i = 0; + + /* Add terminating zero entry to enable index less iteration */ + modesets = kcalloc(num_crtc + 1, sizeof(*modesets), GFP_KERNEL); + if (!modesets) + return ERR_PTR(-ENOMEM); + + drm_for_each_crtc(crtc, dev) + modesets[i++].crtc = crtc; + + /* Cloning is only supported in the single crtc case. */ + if (num_crtc == 1) + max_connector_count = DRM_CLIENT_MAX_CLONED_CONNECTORS; + + drm_client_for_each_modeset(modeset, modesets) { + modeset->connectors = kcalloc(max_connector_count, + sizeof(*modeset->connectors), GFP_KERNEL); + if (!modeset->connectors) + goto err_free; + } + + return modesets; + +err_free: + drm_client_modesets_release(modesets); + + return ERR_PTR(-ENOMEM); +} +EXPORT_SYMBOL(drm_client_modesets_create); + +/** + * drm_client_modesets_release() - Free modesets + * @modesets: Modeset array (can be NULL or error pointer) + * + * This function destroys any attached display modes, puts connectors and frees + * the modeset array. + */ +void drm_client_modesets_release(struct drm_mode_set *modesets) +{ + struct drm_mode_set *modeset; + unsigned int i; + + if (IS_ERR_OR_NULL(modesets)) + return; + + drm_client_for_each_modeset(modeset, modesets) { + drm_mode_destroy(modeset->crtc->dev, modeset->mode); + + for (i = 0; i < modeset->num_connectors; i++) + drm_connector_put(modeset->connectors[i]); + kfree(modeset->connectors); + } + kfree(modesets); +} +EXPORT_SYMBOL(drm_client_modesets_release); + +/** + * drm_client_find_modeset() - Find modeset matching a CRTC + * @modesets: Modeset array + * @crtc: CRTC + * + * This function looks up the modeset connected to @crtc. + * + * Returns: + * A _mode_set or NULL. + */ +struct drm_mode_set *drm_client_find_modeset(struct drm_mode_set *modesets, struct drm_crtc *crtc) +{ + struct drm_mode_set *modeset; + + drm_client_for_each_modeset(modeset, modesets) + if (modeset->crtc == crtc) + return modeset; + + return NULL; +} +EXPORT_SYMBOL(drm_client_find_modeset); + #ifdef CONFIG_DEBUG_FS static int drm_client_debugfs_internal_clients(struct seq_file *m, void *data) { diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 634f4dcf0c41..85bea51e2072 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -316,13 +316,10 @@ int drm_fb_helper_debug_enter(struct fb_info *info) { struct drm_fb_helper *helper = info->par; const struct drm_crtc_helper_funcs *funcs; - int i; + struct drm_mode_set *mode_set;
[Intel-gfx] [PATCH 04/16] drm/fb-helper: No need to cache rotation and sw_rotations
Getting rotation info is cheap so we can do it on demand. This is done in preparation for the removal of struct drm_fb_helper_crtc. Cc: Hans de Goede Signed-off-by: Noralf Trønnes --- Hans, You had this comment inline in restore_fbdev_mode_atomic() the last time I sent this out: We want plane_state->rotation to be set to DRM_MODE_ROTATE_0 in the else case, AFAIK new_plane_state starts with the current state and rotation may have a different value there. Otherwise this looks good to me. Rotation is reset for each plane in the code section above the one I'm changing. Noralf. drivers/gpu/drm/drm_fb_helper.c | 131 include/drm/drm_fb_helper.h | 8 -- 2 files changed, 65 insertions(+), 74 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index b91df658db59..e1b147fdd3f9 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -387,6 +387,49 @@ int drm_fb_helper_debug_leave(struct fb_info *info) } EXPORT_SYMBOL(drm_fb_helper_debug_leave); +/* Check if the plane can hw rotate to match panel orientation */ +static bool drm_fb_helper_panel_rotation(struct drm_mode_set *modeset, +unsigned int *rotation) +{ + struct drm_connector *connector = modeset->connectors[0]; + struct drm_plane *plane = modeset->crtc->primary; + u64 valid_mask = 0; + unsigned int i; + + if (!modeset->num_connectors) + return false; + + switch (connector->display_info.panel_orientation) { + case DRM_MODE_PANEL_ORIENTATION_BOTTOM_UP: + *rotation = DRM_MODE_ROTATE_180; + break; + case DRM_MODE_PANEL_ORIENTATION_LEFT_UP: + *rotation = DRM_MODE_ROTATE_90; + break; + case DRM_MODE_PANEL_ORIENTATION_RIGHT_UP: + *rotation = DRM_MODE_ROTATE_270; + break; + default: + *rotation = DRM_MODE_ROTATE_0; + } + + /* +* TODO: support 90 / 270 degree hardware rotation, +* depending on the hardware this may require the framebuffer +* to be in a specific tiling format. +*/ + if (*rotation != DRM_MODE_ROTATE_180 || !plane->rotation_property) + return false; + + for (i = 0; i < plane->rotation_property->num_values; i++) + valid_mask |= (1ULL << plane->rotation_property->values[i]); + + if (!(*rotation & valid_mask)) + return false; + + return true; +} + static int restore_fbdev_mode_atomic(struct drm_fb_helper *fb_helper, bool active) { struct drm_device *dev = fb_helper->dev; @@ -427,10 +470,13 @@ static int restore_fbdev_mode_atomic(struct drm_fb_helper *fb_helper, bool activ for (i = 0; i < fb_helper->crtc_count; i++) { struct drm_mode_set *mode_set = _helper->crtc_info[i].mode_set; struct drm_plane *primary = mode_set->crtc->primary; + unsigned int rotation; - /* Cannot fail as we've already gotten the plane state above */ - plane_state = drm_atomic_get_new_plane_state(state, primary); - plane_state->rotation = fb_helper->crtc_info[i].rotation; + if (drm_fb_helper_panel_rotation(mode_set, )) { + /* Cannot fail as we've already gotten the plane state above */ + plane_state = drm_atomic_get_new_plane_state(state, primary); + plane_state->rotation = rotation; + } ret = __drm_atomic_helper_set_config(mode_set, state); if (ret != 0) @@ -881,7 +927,6 @@ int drm_fb_helper_init(struct drm_device *dev, if (!fb_helper->crtc_info[i].mode_set.connectors) goto out_free; fb_helper->crtc_info[i].mode_set.num_connectors = 0; - fb_helper->crtc_info[i].rotation = DRM_MODE_ROTATE_0; } i = 0; @@ -2500,62 +2545,6 @@ static int drm_pick_crtcs(struct drm_fb_helper *fb_helper, return best_score; } -/* - * This function checks if rotation is necessary because of panel orientation - * and if it is, if it is supported. - * If rotation is necessary and supported, it gets set in fb_crtc.rotation. - * If rotation is necessary but not supported, a DRM_MODE_ROTATE_* flag gets - * or-ed into fb_helper->sw_rotations. In drm_setup_crtcs_fb() we check if only - * one bit is set and then we set fb_info.fbcon_rotate_hint to make fbcon do - * the unsupported rotation. - */ -static void drm_setup_crtc_rotation(struct drm_fb_helper *fb_helper, - struct drm_fb_helper_crtc *fb_crtc, - struct drm_connector *connector) -{ - struct drm_plane *plane = fb_crtc->mode_set.crtc->primary; - uint64_t valid_mask = 0; - int i, rotation; - -
[Intel-gfx] [PATCH 01/16] drm/fb-helper: Remove unused gamma_size variable
The gamma_size variable has not been used since commit 4abe35204af8 ("drm/kms/fb: use slow work mechanism for normal hotplug also.") While in the area move a comment back to its code block. They got separated by commit d50ba256b5f1 ("drm/kms: start adding command line interface using fb."). Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_fb_helper.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 04d23cb430bf..eea15465da7a 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -1873,7 +1873,6 @@ static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper, int crtc_count = 0; int i; struct drm_fb_helper_surface_size sizes; - int gamma_size = 0; int best_depth = 0; memset(, 0, sizeof(struct drm_fb_helper_surface_size)); @@ -1889,7 +1888,6 @@ static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper, if (preferred_bpp != sizes.surface_bpp) sizes.surface_depth = sizes.surface_bpp = preferred_bpp; - /* first up get a count of crtcs now in use and new min/maxes width/heights */ drm_fb_helper_for_each_connector(fb_helper, i) { struct drm_fb_helper_connector *fb_helper_conn = fb_helper->connector_info[i]; struct drm_cmdline_mode *cmdline_mode; @@ -1969,6 +1967,7 @@ static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper, sizes.surface_depth = best_depth; } + /* first up get a count of crtcs now in use and new min/maxes width/heights */ crtc_count = 0; for (i = 0; i < fb_helper->crtc_count; i++) { struct drm_display_mode *desired_mode; @@ -1991,9 +1990,6 @@ static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper, x = fb_helper->crtc_info[i].x; y = fb_helper->crtc_info[i].y; - if (gamma_size == 0) - gamma_size = fb_helper->crtc_info[i].mode_set.crtc->gamma_size; - sizes.surface_width = max_t(u32, desired_mode->hdisplay + x, sizes.surface_width); sizes.surface_height = max_t(u32, desired_mode->vdisplay + y, sizes.surface_height); -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 00/16] drm/fb-helper: Move modesetting code to drm_client
This moves the modesetting code from drm_fb_helper to drm_client so it can be shared by all internal clients. I have also added a client display abstraction and a bootsplash example client to show where this might be heading. Hopefully Max Staudt will be able to pick up his bootsplash work now. Noralf. Noralf Trønnes (16): drm/fb-helper: Remove unused gamma_size variable drm/fb-helper: dpms_legacy(): Only set on connectors in use drm/atomic: Move __drm_atomic_helper_disable_plane/set_config() drm/fb-helper: No need to cache rotation and sw_rotations drm/fb-helper: Remove drm_fb_helper_crtc->{x,y,desired_mode} drm/i915/fbdev: Move intel_fb_initial_config() to fbdev helper drm/fb-helper: Remove drm_fb_helper_crtc drm/fb-helper: Prepare to move out commit code drm/fb-helper: Move out commit code drm/fb-helper: Remove drm_fb_helper_connector drm/fb-helper: Prepare to move out modeset config code drm/fb-helper: Move out modeset config code drm/fb-helper: Avoid race with DRM userspace drm/client: Add display abstraction drm/client: Hack: Add bootsplash example drm/vc4: Call drm_dev_register() after all setup is done Documentation/gpu/todo.rst | 10 + drivers/gpu/drm/Kconfig |5 + drivers/gpu/drm/Makefile|1 + drivers/gpu/drm/drm_atomic.c| 168 drivers/gpu/drm/drm_atomic_helper.c | 164 --- drivers/gpu/drm/drm_auth.c | 20 + drivers/gpu/drm/drm_bootsplash.c| 216 drivers/gpu/drm/drm_client.c| 1449 +++ drivers/gpu/drm/drm_crtc_internal.h |5 + drivers/gpu/drm/drm_drv.c |4 + drivers/gpu/drm/drm_fb_helper.c | 1151 ++--- drivers/gpu/drm/drm_internal.h |2 + drivers/gpu/drm/i915/intel_fbdev.c | 218 drivers/gpu/drm/vc4/vc4_drv.c |6 +- include/drm/drm_atomic_helper.h |4 - include/drm/drm_client.h| 117 +++ include/drm/drm_fb_helper.h | 127 +-- 17 files changed, 2128 insertions(+), 1539 deletions(-) create mode 100644 drivers/gpu/drm/drm_bootsplash.c -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 05/16] drm/fb-helper: Remove drm_fb_helper_crtc->{x, y, desired_mode}
The values are already present in the modeset. This is done in preparation for the removal of struct drm_fb_helper_crtc. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_fb_helper.c | 12 include/drm/drm_fb_helper.h | 2 -- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index e1b147fdd3f9..36310901e935 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -2023,16 +2023,16 @@ static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper, */ bool lastv = true, lasth = true; - desired_mode = fb_helper->crtc_info[i].desired_mode; mode_set = _helper->crtc_info[i].mode_set; + desired_mode = mode_set->mode; if (!desired_mode) continue; crtc_count++; - x = fb_helper->crtc_info[i].x; - y = fb_helper->crtc_info[i].y; + x = mode_set->x; + y = mode_set->y; sizes.surface_width = max_t(u32, desired_mode->hdisplay + x, sizes.surface_width); sizes.surface_height = max_t(u32, desired_mode->vdisplay + y, sizes.surface_height); @@ -2617,11 +2617,7 @@ static void drm_setup_crtcs(struct drm_fb_helper *fb_helper, DRM_DEBUG_KMS("desired mode %s set on crtc %d (%d,%d)\n", mode->name, fb_crtc->mode_set.crtc->base.id, offset->x, offset->y); - fb_crtc->desired_mode = mode; - fb_crtc->x = offset->x; - fb_crtc->y = offset->y; - modeset->mode = drm_mode_duplicate(dev, - fb_crtc->desired_mode); + modeset->mode = drm_mode_duplicate(dev, mode); drm_connector_get(connector); modeset->connectors[modeset->num_connectors++] = connector; modeset->x = offset->x; diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h index cff1aa222886..7a095964f6b2 100644 --- a/include/drm/drm_fb_helper.h +++ b/include/drm/drm_fb_helper.h @@ -48,8 +48,6 @@ struct drm_fb_offset { struct drm_fb_helper_crtc { struct drm_mode_set mode_set; - struct drm_display_mode *desired_mode; - int x, y; }; /** -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [01/21] drm/fb-helper: Add fill_info() functions
== Series Details == Series: series starting with [01/21] drm/fb-helper: Add fill_info() functions URL : https://patchwork.freedesktop.org/series/58578/ State : warning == Summary == $ dim sparse origin/drm-tip Sparse version: v0.5.2 Commit: drm/fb-helper: Add fill_info() functions Okay! Commit: drm/fb-helper: set fbi->fix.id in fill_info() Okay! Commit: drm/fb_helper: set info->par in fill_info() Okay! Commit: drm/amdgpu: Use drm_fb_helper_fill_info -O:drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c:259:27:expected char [noderef] *screen_base -O:drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c:259:27:got void * -O:drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c:259:27: warning: incorrect type in assignment (different address spaces) +drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c:251:27:expected char [noderef] *screen_base +drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c:251:27:got void * +drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c:251:27: warning: incorrect type in assignment (different address spaces) Commit: drm/armada: Use drm_fb_helper_fill_info Okay! Commit: drm/ast: Use drm_fb_helper_fill_info Okay! Commit: drm/cirrus: Use drm_fb_helper_fill_info Okay! Commit: drm/exynos: Use drm_fb_helper_fill_info Okay! Commit: drm/gma500: Use drm_fb_helper_fill_info Okay! Commit: drm/hibmc: Use drm_fb_helper_fill_info Okay! Commit: drm/i915: Use drm_fb_helper_fill_info Okay! Commit: drm/mga200g: Use drm_fb_helper_fill_info Okay! Commit: drm/bochs: Use drm_fb_helper_fill_info Okay! Commit: drm/nouveau: Use drm_fb_helper_fill_info Okay! Commit: drm/omap: Use drm_fb_helper_fill_info Okay! Commit: drm/radeon: Use drm_fb_helper_fill_info Okay! Commit: drm/rockchip: Use drm_fb_helper_fill_info Okay! Commit: drm/tegra: Use drm_fb_helper_fill_info Okay! Commit: drm/udl: Use drm_fb_helper_fill_info Okay! Commit: drm/vboxvideo: Use drm_fb_helper_fill_info Okay! Commit: drm/fb-helper: Unexport fill_{var,info} Okay! ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [01/21] drm/fb-helper: Add fill_info() functions
== Series Details == Series: series starting with [01/21] drm/fb-helper: Add fill_info() functions URL : https://patchwork.freedesktop.org/series/58578/ State : warning == Summary == $ dim checkpatch origin/drm-tip 14d8e1994710 drm/fb-helper: Add fill_info() functions -:17: WARNING:TYPO_SPELLING: 'dimesions' may be misspelled - perhaps 'dimensions'? #17: v2: We need to keep sizes, since they might not match the fb dimesions -:56: CHECK:BRACES: Blank lines aren't necessary before a close brace '}' #56: FILE: drivers/gpu/drm/drm_fb_helper.c:2132: + +} -:85: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter ' total: 0 errors, 2 warnings, 1 checks, 51 lines checked bc2c591b50c1 drm/fb-helper: set fbi->fix.id in fill_info() -:36: WARNING:BAD_SIGN_OFF: Non-standard signature: igned-off-by: #36: igned-off-by: Daniel Vetter -:36: WARNING:BAD_SIGN_OFF: 'Igned-off-by:' is the preferred signature form #36: igned-off-by: Daniel Vetter -:61: ERROR:MISSING_SIGN_OFF: Missing Signed-off-by: line(s) total: 1 errors, 2 warnings, 0 checks, 17 lines checked 850287b53f8e drm/fb_helper: set info->par in fill_info() 3e3b4caa15a0 drm/amdgpu: Use drm_fb_helper_fill_info -:89: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter ' total: 0 errors, 1 warnings, 0 checks, 56 lines checked fcfc103bed21 drm/armada: Use drm_fb_helper_fill_info -:40: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter ' total: 0 errors, 1 warnings, 0 checks, 18 lines checked f8d363754340 drm/ast: Use drm_fb_helper_fill_info -:66: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter ' total: 0 errors, 1 warnings, 0 checks, 32 lines checked b2b96b775828 drm/cirrus: Use drm_fb_helper_fill_info -:17: WARNING:OBSOLETE: drivers/gpu/drm/cirrus/cirrus_drv.h is marked as 'obsolete' in the MAINTAINERS hierarchy. No unnecessary modifications please. -:20: WARNING:OBSOLETE: drivers/gpu/drm/cirrus/cirrus_drv.h is marked as 'obsolete' in the MAINTAINERS hierarchy. No unnecessary modifications please. -:30: WARNING:OBSOLETE: drivers/gpu/drm/cirrus/cirrus_fbdev.c is marked as 'obsolete' in the MAINTAINERS hierarchy. No unnecessary modifications please. -:33: WARNING:OBSOLETE: drivers/gpu/drm/cirrus/cirrus_fbdev.c is marked as 'obsolete' in the MAINTAINERS hierarchy. No unnecessary modifications please. -:57: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter ' total: 0 errors, 5 warnings, 0 checks, 30 lines checked b41fd86b4e4d drm/exynos: Use drm_fb_helper_fill_info -:40: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter ' total: 0 errors, 1 warnings, 0 checks, 12 lines checked 73a013bb36ea drm/gma500: Use drm_fb_helper_fill_info -:61: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter ' total: 0 errors, 1 warnings, 0 checks, 33 lines checked 446787a8660a drm/hibmc: Use drm_fb_helper_fill_info -:65: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter ' total: 0 errors, 1 warnings, 0 checks, 31 lines checked c6ef43e13b00 drm/i915: Use drm_fb_helper_fill_info -:46: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter ' total: 0 errors, 1 warnings, 0 checks, 21 lines checked 82d5c3d72fa3 drm/mga200g: Use drm_fb_helper_fill_info -:65: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter ' total: 0 errors, 1 warnings, 0 checks, 34 lines checked ab1afd2adf69 drm/bochs: Use drm_fb_helper_fill_info -:37: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter ' total: 0 errors, 1 warnings, 0 checks, 14 lines checked dbdc4e735135 drm/nouveau: Use drm_fb_helper_fill_info -:66: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter ' total: 0 errors, 1 warnings, 0 checks, 30 lines checked 788143f847ba drm/omap: Use drm_fb_helper_fill_info -:35: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter ' total: 0 errors, 1 warnings, 0 checks, 14 lines checked e0b4cd8482f1 drm/radeon: Use drm_fb_helper_fill_info -:61: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter ' total: 0 errors, 1 warnings, 0 checks, 34 lines checked cd0176602aa1 drm/rockchip: Use drm_fb_helper_fill_info -:38: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter ' total: 0 errors, 1 warnings, 0 checks, 13 lines checked e65049fa5ba4 drm/tegra: Use drm_fb_helper_fill_info -:36: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter ' total: 0 errors, 1 warnings, 0 checks, 12 lines checked
[Intel-gfx] [PATCH 4/4] drm/uapi: Remove unused DRM_DISPLAY_INFO_LEN
From: Ville Syrjälä Remove the unused DRM_DISPLAY_INFO_LEN from the uapi headers. I presume the original plan was to expose the display name via getconnector, but looks like that never happened. So we have the define for the length of the string but no string anywhere. A quick scan didn't seem to reveal userspace referencing this so hopefully we can just nuke it. Signed-off-by: Ville Syrjälä --- include/uapi/drm/drm_mode.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h index a439c2e67896..09d72966899a 100644 --- a/include/uapi/drm/drm_mode.h +++ b/include/uapi/drm/drm_mode.h @@ -33,7 +33,6 @@ extern "C" { #endif -#define DRM_DISPLAY_INFO_LEN 32 #define DRM_CONNECTOR_NAME_LEN 32 #define DRM_DISPLAY_MODE_LEN 32 #define DRM_PROP_NAME_LEN 32 -- 2.19.2 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 1/4] drm: Nuke unused drm_display_info.pixel_clock
From: Ville Syrjälä drm_display_info.pixel_clock is unused. Let's get rid of it. Signed-off-by: Ville Syrjälä --- include/drm/drm_connector.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h index bb3bd8e1633a..fcdca46e0c24 100644 --- a/include/drm/drm_connector.h +++ b/include/drm/drm_connector.h @@ -369,12 +369,6 @@ struct drm_display_info { */ unsigned int height_mm; - /** -* @pixel_clock: Maximum pixel clock supported by the sink, in units of -* 100Hz. This mismatches the clock in _display_mode (which is in -* kHZ), because that's what the EDID uses as base unit. -*/ - unsigned int pixel_clock; /** * @bpc: Maximum bits per color channel. Used by HDMI and DP outputs. */ -- 2.19.2 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 3/4] drm: Kill drm_display_info.name
From: Ville Syrjälä drm_display_info.name is only ever set by a few panel drveirs but never actually used anywhere except in i915 debugfs code. Trash it. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/i915_debugfs.c| 1 - drivers/gpu/drm/panel/panel-arm-versatile.c| 2 -- drivers/gpu/drm/panel/panel-ilitek-ili9322.c | 2 -- drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c | 1 - drivers/gpu/drm/panel/panel-samsung-s6d16d0.c | 3 --- drivers/gpu/drm/panel/panel-tpo-tpg110.c | 2 -- include/drm/drm_connector.h| 5 - 7 files changed, 16 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 47bf07a59b5e..933228443b96 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -2866,7 +2866,6 @@ static void intel_connector_info(struct seq_file *m, if (connector->status == connector_status_disconnected) return; - seq_printf(m, "\tname: %s\n", connector->display_info.name); seq_printf(m, "\tphysical dimensions: %dx%dmm\n", connector->display_info.width_mm, connector->display_info.height_mm); diff --git a/drivers/gpu/drm/panel/panel-arm-versatile.c b/drivers/gpu/drm/panel/panel-arm-versatile.c index 078fa2c0eef8..a79908dfa3c8 100644 --- a/drivers/gpu/drm/panel/panel-arm-versatile.c +++ b/drivers/gpu/drm/panel/panel-arm-versatile.c @@ -264,8 +264,6 @@ static int versatile_panel_get_modes(struct drm_panel *panel) struct versatile_panel *vpanel = to_versatile_panel(panel); struct drm_display_mode *mode; - strncpy(connector->display_info.name, vpanel->panel_type->name, - DRM_DISPLAY_INFO_LEN); connector->display_info.width_mm = vpanel->panel_type->width_mm; connector->display_info.height_mm = vpanel->panel_type->height_mm; connector->display_info.bus_flags = vpanel->panel_type->bus_flags; diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9322.c b/drivers/gpu/drm/panel/panel-ilitek-ili9322.c index 35497ff08391..a1c4cd2940fb 100644 --- a/drivers/gpu/drm/panel/panel-ilitek-ili9322.c +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9322.c @@ -662,8 +662,6 @@ static int ili9322_get_modes(struct drm_panel *panel) struct ili9322 *ili = panel_to_ili9322(panel); struct drm_display_mode *mode; - strncpy(connector->display_info.name, "ILI9322 TFT LCD driver\0", - DRM_DISPLAY_INFO_LEN); connector->display_info.width_mm = ili->conf->width_mm; connector->display_info.height_mm = ili->conf->height_mm; diff --git a/drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c b/drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c index 5e8d4523e9ed..a1d8d92fac2b 100644 --- a/drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c +++ b/drivers/gpu/drm/panel/panel-olimex-lcd-olinuxino.c @@ -190,7 +190,6 @@ static int lcd_olinuxino_get_modes(struct drm_panel *panel) num++; } - memcpy(connector->display_info.name, lcd_info->name, 32); connector->display_info.width_mm = lcd_info->width_mm; connector->display_info.height_mm = lcd_info->height_mm; connector->display_info.bpc = lcd_info->bpc; diff --git a/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c b/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c index 33c22ee036f8..f75bef24e050 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6d16d0.c @@ -148,9 +148,6 @@ static int s6d16d0_get_modes(struct drm_panel *panel) struct drm_connector *connector = panel->connector; struct drm_display_mode *mode; - strncpy(connector->display_info.name, "Samsung S6D16D0\0", - DRM_DISPLAY_INFO_LEN); - mode = drm_mode_duplicate(panel->drm, _s6d16d0_mode); if (!mode) { DRM_ERROR("bad mode or failed to add mode\n"); diff --git a/drivers/gpu/drm/panel/panel-tpo-tpg110.c b/drivers/gpu/drm/panel/panel-tpo-tpg110.c index 25f00cfc1af4..71591e5f5938 100644 --- a/drivers/gpu/drm/panel/panel-tpo-tpg110.c +++ b/drivers/gpu/drm/panel/panel-tpo-tpg110.c @@ -390,8 +390,6 @@ static int tpg110_get_modes(struct drm_panel *panel) struct tpg110 *tpg = to_tpg110(panel); struct drm_display_mode *mode; - strncpy(connector->display_info.name, tpg->panel_mode->name, - DRM_DISPLAY_INFO_LEN); connector->display_info.width_mm = tpg->width; connector->display_info.height_mm = tpg->height; connector->display_info.bus_flags = tpg->panel_mode->bus_flags; diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h index c5bff7518ec5..02a131202add 100644 --- a/include/drm/drm_connector.h +++ b/include/drm/drm_connector.h @@ -355,11 +355,6 @@ enum drm_bus_flags { * drm_add_edid_modes(). */ struct drm_display_info { - /** -* @name:
[Intel-gfx] [PATCH 2/4] drm: Fix tabs vs. spaces
From: Ville Syrjälä A set of 8 spaces has snuck in. Replace with a tab, and toss in an extra newline while at it. Signed-off-by: Ville Syrjälä --- include/drm/drm_connector.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h index fcdca46e0c24..c5bff7518ec5 100644 --- a/include/drm/drm_connector.h +++ b/include/drm/drm_connector.h @@ -363,7 +363,8 @@ struct drm_display_info { /** * @width_mm: Physical width in mm. */ -unsigned int width_mm; + unsigned int width_mm; + /** * @height_mm: Physical height in mm. */ -- 2.19.2 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v2] drm/i915: Update size upon return from GEM_CREATE
Quoting Vanshidhar Konda (2019-03-26 17:29:07) > On Tue, Mar 26, 2019 at 06:02:18PM +0100, Michał Winiarski wrote: > >Since GEM_CREATE is trying to outsmart the user by rounding up unaligned > >objects, we used to update the size returned to userspace. > >This update seems to have been lost throughout the history. > > > >v2: Use round_up(), reorder locals (Chris) > > > >References: ff72145badb8 ("drm: dumb scanout create/mmap for intel/radeon > >(v3)") > >Signed-off-by: Michał Winiarski > >Cc: Chris Wilson > >Cc: Janusz Krzysztofik > >Cc: Joonas Lahtinen > >Reviewed-by: Chris Wilson > >--- > > drivers/gpu/drm/i915/i915_gem.c | 12 +++- > > 1 file changed, 7 insertions(+), 5 deletions(-) > > > >diff --git a/drivers/gpu/drm/i915/i915_gem.c > >b/drivers/gpu/drm/i915/i915_gem.c > >index f6cdd5fb9deb..e506e43cfade 100644 > >--- a/drivers/gpu/drm/i915/i915_gem.c > >+++ b/drivers/gpu/drm/i915/i915_gem.c > >@@ -622,14 +622,15 @@ i915_gem_phys_pwrite(struct drm_i915_gem_object *obj, > > static int > > i915_gem_create(struct drm_file *file, > > struct drm_i915_private *dev_priv, > >- u64 size, > >+ u64 *size_p, > > u32 *handle_p) > > { > > struct drm_i915_gem_object *obj; > >- int ret; > > u32 handle; > >+ u64 size; > >+ int ret; > > > >- size = roundup(size, PAGE_SIZE); > >+ size = round_up(*size_p, PAGE_SIZE); > > if (size == 0) > > return -EINVAL; > > > > Does it make more sense to check the size prior to doing a roundup? The only failure conditions known at this point are size==0 and size > -PAGE_SIZE which is more concisely handled as a single test afterwards. -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v2] drm/i915: Update size upon return from GEM_CREATE
On Tue, Mar 26, 2019 at 06:02:18PM +0100, Michał Winiarski wrote: Since GEM_CREATE is trying to outsmart the user by rounding up unaligned objects, we used to update the size returned to userspace. This update seems to have been lost throughout the history. v2: Use round_up(), reorder locals (Chris) References: ff72145badb8 ("drm: dumb scanout create/mmap for intel/radeon (v3)") Signed-off-by: Michał Winiarski Cc: Chris Wilson Cc: Janusz Krzysztofik Cc: Joonas Lahtinen Reviewed-by: Chris Wilson --- drivers/gpu/drm/i915/i915_gem.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index f6cdd5fb9deb..e506e43cfade 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -622,14 +622,15 @@ i915_gem_phys_pwrite(struct drm_i915_gem_object *obj, static int i915_gem_create(struct drm_file *file, struct drm_i915_private *dev_priv, - u64 size, + u64 *size_p, u32 *handle_p) { struct drm_i915_gem_object *obj; - int ret; u32 handle; + u64 size; + int ret; - size = roundup(size, PAGE_SIZE); + size = round_up(*size_p, PAGE_SIZE); if (size == 0) return -EINVAL; Does it make more sense to check the size prior to doing a roundup? @@ -645,6 +646,7 @@ i915_gem_create(struct drm_file *file, return ret; *handle_p = handle; + *size_p = obj->base.size; return 0; } @@ -657,7 +659,7 @@ i915_gem_dumb_create(struct drm_file *file, args->pitch = ALIGN(args->width * DIV_ROUND_UP(args->bpp, 8), 64); args->size = args->pitch * args->height; return i915_gem_create(file, to_i915(dev), - args->size, >handle); + >size, >handle); } static bool gpu_write_needs_clflush(struct drm_i915_gem_object *obj) @@ -682,7 +684,7 @@ i915_gem_create_ioctl(struct drm_device *dev, void *data, i915_gem_flush_free_objects(dev_priv); return i915_gem_create(file, dev_priv, - args->size, >handle); + >size, >handle); } static inline enum fb_op_origin -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 2/3] iris: Create a composite context for both compute and render pipelines
Quoting Kenneth Graunke (2019-03-26 17:01:57) > On Tuesday, March 26, 2019 12:16:20 AM PDT Chris Wilson wrote: > > Quoting Kenneth Graunke (2019-03-26 05:52:10) > > > On Monday, March 25, 2019 3:58:59 AM PDT Chris Wilson wrote: > > > > iris currently uses two distinct GEM contexts to have distinct logical > > > > HW contexts for the compute and render pipelines. However, using two > > > > distinct GEM contexts implies that they are distinct timelines, yet as > > > > they are a single GL context that implies they belong to a single > > > > timeline from the client perspective. Currently, fences are occasionally > > > > inserted to order the two timelines. Using 2 GEM contexts, also implies > > > > that we keep 2 ppGTT for identical buffer state. If we can create a > > > > single GEM context, with the right capabilities, we can have a single > > > > VM, a single timeline, but 2 logical HW contexts for the 2 pipelines. > > > > > > > > This is allowed through the new context interface that allows VM to be > > > > shared, timelines to be specified, and for the logical contexts to be > > > > constructed as the user desires. > > > > > > > > Cc: Joonas Lahtinen > > > > Cc: Kenneth Graunke > > > > --- > > > > src/gallium/drivers/iris/iris_batch.c | 16 ++- > > > > src/gallium/drivers/iris/iris_batch.h | 5 +-- > > > > src/gallium/drivers/iris/iris_context.c | 56 - > > > > 3 files changed, 60 insertions(+), 17 deletions(-) > > > > > > Hi Chris, > > > > > > I don't think that I want the single timeline option. It seems like > > > we've been moving away from implicit sync for a long time, and the > > > explicit sync code we have is pretty straightforward and seems to do > > > the trick. Jason and I also chatted briefly, and we don't necessarily > > > want to a strict submission-order between render/compute. > > > > I disagree if you think this means more implicit sync. It is setting up > > the GEM context to an exact match of the GL context, by _explicit_ > > control of the timeline. Then the fences you do export from inside the > > GL context do not need to be faked to be a composite of the pair of > > contexts. You still have explicit fences, and you have explicit control > > over the definition of their timeline. > > With regard to multiple GL contexts, yes, everything remains explicit. > But having 2-3 separate timelines within a GL context allows us to > reorder work behind GL's back, which is all the rage these days for > performance. Tilers do it all the time. Position-only bucketing may > require it. I'd really like to start treating render and compute as > distinct asynchronous queues. At the very least, experimenting with > that and not tying my hands to a particular behavior. That's a reasonable argument. If you want to try and keep the GL semantics intact while playing with ordering underneath, have fun! The only problem I forsee if there is any observable through which the pipelines can determine their ordering / concurrency (sampling a common buffer or clock) that might construe a violation. > There may be some use for single timeline, though. Attaching images as > compute shader inputs may require CCS/HiZ resolves, which have to happen > on the RCS. Right now, I do those on IRIS_BATCH_RENDER, which mean that > it backs up behind any queued render work. Ideally, I'd do those on a > third context, which could be tied to the compute timeline, so the > resolves and the compute job can both execute ahead of queued rendering, > but still back to back. I have an inkling that timelines should be first class for userspace to control exactly. But I have not seen anything close to a use case to justify that (yet). And by the time a usecase should arise, we will probably be onto the next shiny. That's the problem with cloudy crystal balls. > > > Separating the VMA from the context state image seems like absolutely > > > the right thing to do - as you said, they're separate in hardware, > > > and no real reason to tie it together. I would be in favor of new > > > uABI for that. > > > > > > I don't think there will be much overhead reduction from sharing the > > > VMA here though. It's very plausible that the compositor might want > > > to run between render and compute batches, at which point we end up > > > doing page directory loads anyway. I have also heard rumors about bit > > > 47 becoming magical at some point which may prohibit us from sharing... > > > > Yeah, but that doesn't actually affect the context setup, just how you > > decide to use it in end. And by that point, you'll be forced into using > > this new uABI anyway or something entirely different :-p > > Looking into this a bit more, I think we're actually OK. I thought I > might need to have distinct addresses for render and compute - at which > point nearly every address would differ in terms of bit 47 - but it > looks like the correct answer is "just never use that bit". *shrug*
Re: [Intel-gfx] [PATCH 2/3] iris: Create a composite context for both compute and render pipelines
On Tuesday, March 26, 2019 12:16:20 AM PDT Chris Wilson wrote: > Quoting Kenneth Graunke (2019-03-26 05:52:10) > > On Monday, March 25, 2019 3:58:59 AM PDT Chris Wilson wrote: > > > iris currently uses two distinct GEM contexts to have distinct logical > > > HW contexts for the compute and render pipelines. However, using two > > > distinct GEM contexts implies that they are distinct timelines, yet as > > > they are a single GL context that implies they belong to a single > > > timeline from the client perspective. Currently, fences are occasionally > > > inserted to order the two timelines. Using 2 GEM contexts, also implies > > > that we keep 2 ppGTT for identical buffer state. If we can create a > > > single GEM context, with the right capabilities, we can have a single > > > VM, a single timeline, but 2 logical HW contexts for the 2 pipelines. > > > > > > This is allowed through the new context interface that allows VM to be > > > shared, timelines to be specified, and for the logical contexts to be > > > constructed as the user desires. > > > > > > Cc: Joonas Lahtinen > > > Cc: Kenneth Graunke > > > --- > > > src/gallium/drivers/iris/iris_batch.c | 16 ++- > > > src/gallium/drivers/iris/iris_batch.h | 5 +-- > > > src/gallium/drivers/iris/iris_context.c | 56 - > > > 3 files changed, 60 insertions(+), 17 deletions(-) > > > > Hi Chris, > > > > I don't think that I want the single timeline option. It seems like > > we've been moving away from implicit sync for a long time, and the > > explicit sync code we have is pretty straightforward and seems to do > > the trick. Jason and I also chatted briefly, and we don't necessarily > > want to a strict submission-order between render/compute. > > I disagree if you think this means more implicit sync. It is setting up > the GEM context to an exact match of the GL context, by _explicit_ > control of the timeline. Then the fences you do export from inside the > GL context do not need to be faked to be a composite of the pair of > contexts. You still have explicit fences, and you have explicit control > over the definition of their timeline. With regard to multiple GL contexts, yes, everything remains explicit. But having 2-3 separate timelines within a GL context allows us to reorder work behind GL's back, which is all the rage these days for performance. Tilers do it all the time. Position-only bucketing may require it. I'd really like to start treating render and compute as distinct asynchronous queues. At the very least, experimenting with that and not tying my hands to a particular behavior. There may be some use for single timeline, though. Attaching images as compute shader inputs may require CCS/HiZ resolves, which have to happen on the RCS. Right now, I do those on IRIS_BATCH_RENDER, which mean that it backs up behind any queued render work. Ideally, I'd do those on a third context, which could be tied to the compute timeline, so the resolves and the compute job can both execute ahead of queued rendering, but still back to back. > > Separating the VMA from the context state image seems like absolutely > > the right thing to do - as you said, they're separate in hardware, > > and no real reason to tie it together. I would be in favor of new > > uABI for that. > > > > I don't think there will be much overhead reduction from sharing the > > VMA here though. It's very plausible that the compositor might want > > to run between render and compute batches, at which point we end up > > doing page directory loads anyway. I have also heard rumors about bit > > 47 becoming magical at some point which may prohibit us from sharing... > > Yeah, but that doesn't actually affect the context setup, just how you > decide to use it in end. And by that point, you'll be forced into using > this new uABI anyway or something entirely different :-p Looking into this a bit more, I think we're actually OK. I thought I might need to have distinct addresses for render and compute - at which point nearly every address would differ in terms of bit 47 - but it looks like the correct answer is "just never use that bit". *shrug* > > Context cloning seems OK, but I'm always pretty hesitant to add new > > uABI unless it's strictly necessary. In this case, we can do the same > > thing with a little bit of userspace code, so I'm not sure it's worth > > adding that... > > Actually you cannot do the same without some of the new uABI either, > since previously you did not have all the parameters exposed. What isn't exposed? We set up everything the first time, why can't we do it again? > > I would love to see an iris patch to use the new > > I915_CONTEXT_PARAM_RECOVERABLE option without the other dependencies. > > https://gitlab.freedesktop.org/ickle/mesa/commit/84d9cb1d8d98a50dcceea19ccbc3836b15cf73ae > -Chris signature.asc Description: This is a digitally signed message part.
[Intel-gfx] [PATCH v2] drm/i915: Update size upon return from GEM_CREATE
Since GEM_CREATE is trying to outsmart the user by rounding up unaligned objects, we used to update the size returned to userspace. This update seems to have been lost throughout the history. v2: Use round_up(), reorder locals (Chris) References: ff72145badb8 ("drm: dumb scanout create/mmap for intel/radeon (v3)") Signed-off-by: Michał Winiarski Cc: Chris Wilson Cc: Janusz Krzysztofik Cc: Joonas Lahtinen Reviewed-by: Chris Wilson --- drivers/gpu/drm/i915/i915_gem.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index f6cdd5fb9deb..e506e43cfade 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -622,14 +622,15 @@ i915_gem_phys_pwrite(struct drm_i915_gem_object *obj, static int i915_gem_create(struct drm_file *file, struct drm_i915_private *dev_priv, - u64 size, + u64 *size_p, u32 *handle_p) { struct drm_i915_gem_object *obj; - int ret; u32 handle; + u64 size; + int ret; - size = roundup(size, PAGE_SIZE); + size = round_up(*size_p, PAGE_SIZE); if (size == 0) return -EINVAL; @@ -645,6 +646,7 @@ i915_gem_create(struct drm_file *file, return ret; *handle_p = handle; + *size_p = obj->base.size; return 0; } @@ -657,7 +659,7 @@ i915_gem_dumb_create(struct drm_file *file, args->pitch = ALIGN(args->width * DIV_ROUND_UP(args->bpp, 8), 64); args->size = args->pitch * args->height; return i915_gem_create(file, to_i915(dev), - args->size, >handle); + >size, >handle); } static bool gpu_write_needs_clflush(struct drm_i915_gem_object *obj) @@ -682,7 +684,7 @@ i915_gem_create_ioctl(struct drm_device *dev, void *data, i915_gem_flush_free_objects(dev_priv); return i915_gem_create(file, dev_priv, - args->size, >handle); + >size, >handle); } static inline enum fb_op_origin -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.IGT: success for more uncore rework
== Series Details == Series: more uncore rework URL : https://patchwork.freedesktop.org/series/58550/ State : success == Summary == CI Bug Log - changes from CI_DRM_5814_full -> Patchwork_12596_full Summary --- **SUCCESS** No regressions found. Known issues Here are the changes found in Patchwork_12596_full that come from known issues: ### IGT changes ### Issues hit * igt@i915_pm_rpm@gem-mmap-gtt: - shard-skl: PASS -> INCOMPLETE [fdo#107807] * igt@i915_pm_rpm@i2c: - shard-iclb: PASS -> DMESG-WARN [fdo#109982] * igt@kms_busy@extended-modeset-hang-newfb-render-b: - shard-skl: NOTRUN -> DMESG-WARN [fdo#110222] * igt@kms_busy@extended-pageflip-hang-newfb-render-e: - shard-iclb: NOTRUN -> SKIP [fdo#109278] +1 * igt@kms_chamelium@hdmi-crc-argb1555: - shard-iclb: NOTRUN -> SKIP [fdo#109284] * igt@kms_cursor_crc@cursor-256x256-sliding: - shard-glk: PASS -> FAIL [fdo#103232] +2 * igt@kms_fbcon_fbt@fbc: - shard-iclb: PASS -> DMESG-WARN [fdo#109593] * igt@kms_flip@2x-flip-vs-expired-vblank-interruptible: - shard-glk: PASS -> FAIL [fdo#105363] +1 * igt@kms_frontbuffer_tracking@fbc-1p-primscrn-pri-indfb-draw-mmap-cpu: - shard-iclb: PASS -> FAIL [fdo#103167] +10 * igt@kms_frontbuffer_tracking@fbc-2p-indfb-fliptrack: - shard-iclb: NOTRUN -> SKIP [fdo#109280] +5 * igt@kms_frontbuffer_tracking@psr-1p-primscrn-pri-indfb-draw-mmap-cpu: - shard-iclb: PASS -> FAIL [fdo#109247] +12 * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-e: - shard-skl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +6 * igt@kms_plane_alpha_blend@pipe-c-constant-alpha-min: - shard-skl: PASS -> FAIL [fdo#108145] * igt@kms_plane_scaling@2x-scaler-multi-pipe: - shard-iclb: NOTRUN -> SKIP [fdo#109274] / [fdo#109278] * igt@kms_plane_scaling@pipe-b-scaler-with-pixel-format: - shard-glk: PASS -> SKIP [fdo#109271] / [fdo#109278] * igt@kms_psr2_su@frontbuffer: - shard-iclb: PASS -> SKIP [fdo#109642] * igt@kms_psr@psr2_basic: - shard-iclb: NOTRUN -> SKIP [fdo#109441] * igt@kms_psr@psr2_sprite_plane_move: - shard-iclb: PASS -> SKIP [fdo#109441] +1 * igt@kms_rotation_crc@multiplane-rotation-cropping-bottom: - shard-kbl: PASS -> DMESG-FAIL [fdo#105763] * igt@kms_vblank@pipe-a-ts-continuation-modeset-rpm: - shard-apl: PASS -> FAIL [fdo#104894] +1 * igt@perf@blocking: - shard-iclb: PASS -> FAIL [fdo#108587] +1 * igt@perf@short-reads: - shard-kbl: PASS -> FAIL [fdo#103183] * igt@perf_pmu@busy-accuracy-50-vcs1: - shard-skl: NOTRUN -> SKIP [fdo#109271] +46 * igt@runner@aborted: - shard-iclb: NOTRUN -> FAIL [fdo#109593] Possible fixes * igt@gem_mmap_gtt@forked-big-copy-odd: - shard-iclb: TIMEOUT [fdo#109673] -> PASS * igt@gem_partial_pwrite_pread@writes-after-reads-uncached: - shard-iclb: INCOMPLETE -> PASS * igt@kms_busy@extended-modeset-hang-newfb-with-reset-render-b: - shard-iclb: DMESG-WARN [fdo#110222] -> PASS * igt@kms_busy@extended-modeset-hang-oldfb-with-reset-render-a: - shard-snb: SKIP [fdo#109271] / [fdo#109278] -> PASS * igt@kms_draw_crc@draw-method-xrgb-render-xtiled: - shard-snb: SKIP [fdo#109271] -> PASS +1 * igt@kms_fbcon_fbt@fbc-suspend: - shard-skl: INCOMPLETE [fdo#104108] -> PASS * igt@kms_flip@flip-vs-expired-vblank: - shard-skl: FAIL [fdo#105363] -> PASS * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-shrfb-draw-pwrite: - shard-iclb: FAIL [fdo#103167] -> PASS +5 * igt@kms_frontbuffer_tracking@psr-1p-primscrn-spr-indfb-draw-pwrite: - shard-iclb: FAIL [fdo#109247] -> PASS +1 * {igt@kms_plane@pixel-format-pipe-b-planes}: - shard-glk: SKIP [fdo#109271] -> PASS * igt@kms_plane_scaling@pipe-a-scaler-with-clipping-clamping: - shard-glk: SKIP [fdo#109271] / [fdo#109278] -> PASS * igt@kms_psr2_su@page_flip: - shard-iclb: SKIP [fdo#109642] -> PASS * igt@kms_psr@psr2_cursor_plane_onoff: - shard-iclb: SKIP [fdo#109441] -> PASS +3 * igt@kms_setmode@basic: - shard-apl: FAIL [fdo#99912] -> PASS * igt@kms_vblank@pipe-c-ts-continuation-suspend: - shard-iclb: FAIL [fdo#104894] -> PASS Warnings * igt@kms_cursor_crc@cursor-64x64-suspend: - shard-apl: FAIL [fdo#103191] / [fdo#103232] -> DMESG-FAIL [fdo#103232] {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167
Re: [Intel-gfx] [PATCH] drm/i915: Update size upon return from GEM_CREATE
Quoting Michał Winiarski (2019-03-26 16:33:45) > Since GEM_CREATE is trying to outsmart the user by rounding up unaligned > objects, we used to update the size returned to userspace. > This update seems to have been lost throughout the history. > > References: ff72145badb8 ("drm: dumb scanout create/mmap for intel/radeon > (v3)") > Signed-off-by: Michał Winiarski > Cc: Chris Wilson > Cc: Janusz Krzysztofik > Cc: Joonas Lahtinen > --- > drivers/gpu/drm/i915/i915_gem.c | 11 +++ > 1 file changed, 7 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c > index f6cdd5fb9deb..77b82cb81a6c 100644 > --- a/drivers/gpu/drm/i915/i915_gem.c > +++ b/drivers/gpu/drm/i915/i915_gem.c > @@ -622,14 +622,15 @@ i915_gem_phys_pwrite(struct drm_i915_gem_object *obj, > static int > i915_gem_create(struct drm_file *file, > struct drm_i915_private *dev_priv, > - u64 size, > + u64 *size_p, > u32 *handle_p) > { > struct drm_i915_gem_object *obj; > int ret; > + u64 size; > u32 handle; > > - size = roundup(size, PAGE_SIZE); > + size = roundup(*size_p, PAGE_SIZE); You could have snuck in a round_up() and reordered the locals. > if (size == 0) > return -EINVAL; > > @@ -645,6 +646,8 @@ i915_gem_create(struct drm_file *file, > return ret; > > *handle_p = handle; > + *size_p = obj->base.size; No need for whitespace between the out params and return. Without the break, it reinforces that they are all part of the return imo. Sneak in a round_up, and have Reviewed-by: Chris Wilson -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH] drm/i915: Update size upon return from GEM_CREATE
Since GEM_CREATE is trying to outsmart the user by rounding up unaligned objects, we used to update the size returned to userspace. This update seems to have been lost throughout the history. References: ff72145badb8 ("drm: dumb scanout create/mmap for intel/radeon (v3)") Signed-off-by: Michał Winiarski Cc: Chris Wilson Cc: Janusz Krzysztofik Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/i915_gem.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index f6cdd5fb9deb..77b82cb81a6c 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -622,14 +622,15 @@ i915_gem_phys_pwrite(struct drm_i915_gem_object *obj, static int i915_gem_create(struct drm_file *file, struct drm_i915_private *dev_priv, - u64 size, + u64 *size_p, u32 *handle_p) { struct drm_i915_gem_object *obj; int ret; + u64 size; u32 handle; - size = roundup(size, PAGE_SIZE); + size = roundup(*size_p, PAGE_SIZE); if (size == 0) return -EINVAL; @@ -645,6 +646,8 @@ i915_gem_create(struct drm_file *file, return ret; *handle_p = handle; + *size_p = obj->base.size; + return 0; } @@ -657,7 +660,7 @@ i915_gem_dumb_create(struct drm_file *file, args->pitch = ALIGN(args->width * DIV_ROUND_UP(args->bpp, 8), 64); args->size = args->pitch * args->height; return i915_gem_create(file, to_i915(dev), - args->size, >handle); + >size, >handle); } static bool gpu_write_needs_clflush(struct drm_i915_gem_object *obj) @@ -682,7 +685,7 @@ i915_gem_create_ioctl(struct drm_device *dev, void *data, i915_gem_flush_free_objects(dev_priv); return i915_gem_create(file, dev_priv, - args->size, >handle); + >size, >handle); } static inline enum fb_op_origin -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.BAT: success for Device id consolidation
== Series Details == Series: Device id consolidation URL : https://patchwork.freedesktop.org/series/58561/ State : success == Summary == CI Bug Log - changes from CI_DRM_5817 -> Patchwork_12599 Summary --- **SUCCESS** No regressions found. External URL: https://patchwork.freedesktop.org/api/1.0/series/58561/revisions/1/mbox/ Known issues Here are the changes found in Patchwork_12599 that come from known issues: ### IGT changes ### Issues hit * igt@i915_selftest@live_contexts: - fi-skl-gvtdvm: PASS -> DMESG-FAIL [fdo#110235 ] * igt@kms_busy@basic-flip-c: - fi-blb-e6850: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] * igt@kms_frontbuffer_tracking@basic: - fi-byt-clapper: PASS -> FAIL [fdo#103167] * igt@kms_pipe_crc_basic@hang-read-crc-pipe-c: - fi-blb-e6850: NOTRUN -> SKIP [fdo#109271] +48 * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence: - fi-byt-clapper: PASS -> FAIL [fdo#103191] / [fdo#107362] * igt@prime_vgem@basic-fence-flip: - fi-gdg-551: PASS -> FAIL [fdo#103182] +1 * igt@runner@aborted: - fi-apl-guc: NOTRUN -> FAIL [fdo#108622] / [fdo#109720] Possible fixes * igt@gem_exec_suspend@basic-s3: - fi-icl-u3: FAIL [fdo#103375] -> PASS - fi-blb-e6850: INCOMPLETE [fdo#107718] -> PASS * igt@kms_frontbuffer_tracking@basic: - fi-icl-u3: FAIL [fdo#103167] -> PASS * igt@kms_pipe_crc_basic@hang-read-crc-pipe-a: - fi-byt-clapper: FAIL [fdo#103191] / [fdo#107362] -> PASS [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167 [fdo#103182]: https://bugs.freedesktop.org/show_bug.cgi?id=103182 [fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191 [fdo#103375]: https://bugs.freedesktop.org/show_bug.cgi?id=103375 [fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362 [fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718 [fdo#108622]: https://bugs.freedesktop.org/show_bug.cgi?id=108622 [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#109278]: https://bugs.freedesktop.org/show_bug.cgi?id=109278 [fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720 [fdo#110235 ]: https://bugs.freedesktop.org/show_bug.cgi?id=110235 Participating hosts (46 -> 39) -- Missing(7): fi-kbl-soraka fi-hsw-4770r fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-bdw-samus Build changes - * Linux: CI_DRM_5817 -> Patchwork_12599 CI_DRM_5817: 07abdbc9d99bcd754fc906237057369fe0399f93 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_4904: b9cfd64009ca2536f7a997deabf34d88f2757511 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_12599: b5342d54426e4ebbb07d29e27a50fdf85dfe7351 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == b5342d54426e drm/i915: Introduce concept of a sub-platform 40559f6a2295 drm/i915: Split some PCI ids into separate groups 1a9cbf3aa2a4 drm/i915: Remove redundant device id from IS_IRONLAKE_M macro caf40a504a05 drm/i915: Split Pineview device info into desktop and mobile == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12599/ ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 1/2] drm/i915: Do not enable FEC without DSC
On Tue, Mar 26, 2019 at 09:00:27AM -0700, Manasi Navare wrote: > On Tue, Mar 26, 2019 at 04:49:02PM +0200, Ville Syrjala wrote: > > From: Ville Syrjälä > > > > Currently we enable FEC even when DSC is no used. While that is > > theoretically valid supposedly there isn't much of a benefit from > > this. But more importantly we do not account for the FEC link > > bandwidth overhead (2.4%) in the non-DSC link bandwidth computations. > > So the code may think we have enough bandwidth when we in fact > > do not. > > > > Cc: Anusha Srivatsa > > Cc: Manasi Navare > > Fixes: 240999cf339f ("i915/dp/fec: Add fec_enable to the crtc state.") > > Signed-off-by: Ville Syrjälä > > --- > > drivers/gpu/drm/i915/intel_dp.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/intel_dp.c > > b/drivers/gpu/drm/i915/intel_dp.c > > index 326de12c3f44..bbf678561509 100644 > > --- a/drivers/gpu/drm/i915/intel_dp.c > > +++ b/drivers/gpu/drm/i915/intel_dp.c > > @@ -1925,6 +1925,9 @@ static int intel_dp_dsc_compute_config(struct > > intel_dp *intel_dp, > > int pipe_bpp; > > int ret; > > > > + pipe_config->fec_enable = !intel_dp_is_edp(intel_dp) && > > + intel_dp_supports_fec(intel_dp, pipe_config); > > + > > We could still not enable DSC after this point since it has more checks in > this > function. Even though in that case we would fail the encoder config so wouldnt > matter if we have enabled FEC or not, but its less intutive. > IMHO, the ideal place to set the fec enable is in > intel_dp_compute_link_config() > after the all to dsc_compute_config and set it only if > pipe_config->dsc_params.compression_enable That would require changing intel_dp_supports_dsc() which I decided wasn't worth the hassle. > > Manasi > > > if (!intel_dp_supports_dsc(intel_dp, pipe_config)) > > return -EINVAL; > > > > @@ -2168,9 +2171,6 @@ intel_dp_compute_config(struct intel_encoder *encoder, > > if (adjusted_mode->flags & DRM_MODE_FLAG_DBLCLK) > > return -EINVAL; > > > > - pipe_config->fec_enable = !intel_dp_is_edp(intel_dp) && > > - intel_dp_supports_fec(intel_dp, pipe_config); > > - > > ret = intel_dp_compute_link_config(encoder, pipe_config, conn_state); > > if (ret < 0) > > return ret; > > -- > > 2.19.2 > > > > ___ > > Intel-gfx mailing list > > Intel-gfx@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx -- Ville Syrjälä Intel ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.SPARSE: warning for Device id consolidation
== Series Details == Series: Device id consolidation URL : https://patchwork.freedesktop.org/series/58561/ State : warning == Summary == $ dim sparse origin/drm-tip Sparse version: v0.5.2 Commit: drm/i915: Split Pineview device info into desktop and mobile -drivers/gpu/drm/i915/selftests/../i915_drv.h:3597:16: warning: expression using sizeof(void) +drivers/gpu/drm/i915/selftests/../i915_drv.h:3595:16: warning: expression using sizeof(void) Commit: drm/i915: Remove redundant device id from IS_IRONLAKE_M macro -drivers/gpu/drm/i915/selftests/../i915_drv.h:3595:16: warning: expression using sizeof(void) +drivers/gpu/drm/i915/selftests/../i915_drv.h:3598:16: warning: expression using sizeof(void) Commit: drm/i915: Split some PCI ids into separate groups Okay! Commit: drm/i915: Introduce concept of a sub-platform -drivers/gpu/drm/i915/i915_gpu_error.c:900:23: warning: expression using sizeof(void) -drivers/gpu/drm/i915/i915_gpu_error.c:900:23: warning: expression using sizeof(void) +drivers/gpu/drm/i915/i915_gpu_error.c:900:23: warning: expression using sizeof(void) +drivers/gpu/drm/i915/i915_gpu_error.c:900:23: warning: expression using sizeof(void) -drivers/gpu/drm/i915/selftests/../i915_drv.h:3598:16: warning: expression using sizeof(void) +drivers/gpu/drm/i915/selftests/../i915_drv.h:3648:16: warning: expression using sizeof(void) ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 2/2] drm/i915: Clean up DSC vs. not bpp handling
On Tue, Mar 26, 2019 at 04:49:03PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > No point in duplicating all this code when we can just > use a variable top hold the output bpp (the only thing > that differs between the two branches). > > Cc: Anusha Srivatsa > Cc: Manasi Navare > Signed-off-by: Ville Syrjälä This clean up looks good, thank you for catching this and cleaning it up. Reviewed-by: Manasi Navare Manasi > --- > drivers/gpu/drm/i915/intel_dp.c | 27 --- > 1 file changed, 12 insertions(+), 15 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c > index bbf678561509..b26007a32318 100644 > --- a/drivers/gpu/drm/i915/intel_dp.c > +++ b/drivers/gpu/drm/i915/intel_dp.c > @@ -2126,7 +2126,7 @@ intel_dp_compute_config(struct intel_encoder *encoder, > to_intel_digital_connector_state(conn_state); > bool constant_n = drm_dp_has_quirk(_dp->desc, > DP_DPCD_QUIRK_CONSTANT_N); > - int ret; > + int ret, output_bpp; > > if (HAS_PCH_SPLIT(dev_priv) && !HAS_DDI(dev_priv) && port != PORT_A) > pipe_config->has_pch_encoder = true; > @@ -2190,25 +2190,22 @@ intel_dp_compute_config(struct intel_encoder *encoder, > intel_conn_state->broadcast_rgb == > INTEL_BROADCAST_RGB_LIMITED; > } > > - if (!pipe_config->dsc_params.compression_enable) > - intel_link_compute_m_n(pipe_config->pipe_bpp, > -pipe_config->lane_count, > -adjusted_mode->crtc_clock, > -pipe_config->port_clock, > -_config->dp_m_n, > -constant_n); > + if (pipe_config->dsc_params.compression_enable) > + output_bpp = pipe_config->dsc_params.compressed_bpp; > else > - intel_link_compute_m_n(pipe_config->dsc_params.compressed_bpp, > -pipe_config->lane_count, > -adjusted_mode->crtc_clock, > -pipe_config->port_clock, > -_config->dp_m_n, > -constant_n); > + output_bpp = pipe_config->pipe_bpp; > + > + intel_link_compute_m_n(output_bpp, > +pipe_config->lane_count, > +adjusted_mode->crtc_clock, > +pipe_config->port_clock, > +_config->dp_m_n, > +constant_n); > > if (intel_connector->panel.downclock_mode != NULL && > dev_priv->drrs.type == SEAMLESS_DRRS_SUPPORT) { > pipe_config->has_drrs = true; > - intel_link_compute_m_n(pipe_config->pipe_bpp, > + intel_link_compute_m_n(output_bpp, > pipe_config->lane_count, > > intel_connector->panel.downclock_mode->clock, > pipe_config->port_clock, > -- > 2.19.2 > > ___ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Device id consolidation
== Series Details == Series: Device id consolidation URL : https://patchwork.freedesktop.org/series/58561/ State : warning == Summary == $ dim checkpatch origin/drm-tip caf40a504a05 drm/i915: Split Pineview device info into desktop and mobile 1a9cbf3aa2a4 drm/i915: Remove redundant device id from IS_IRONLAKE_M macro -:44: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev_priv' - possible side-effects? #44: FILE: drivers/gpu/drm/i915/i915_drv.h:2321: +#define IS_IRONLAKE_M(dev_priv) \ + (IS_PLATFORM(dev_priv, INTEL_IRONLAKE) && IS_MOBILE(dev_priv)) total: 0 errors, 0 warnings, 1 checks, 25 lines checked 40559f6a2295 drm/i915: Split some PCI ids into separate groups -:34: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses #34: FILE: include/drm/i915_pciids.h:171: +#define INTEL_HSW_ULT_GT1_IDS(info) \ + INTEL_VGA_DEVICE(0x0A02, info), /* ULT GT1 desktop */ \ + INTEL_VGA_DEVICE(0x0A0A, info), /* ULT GT1 server */ \ + INTEL_VGA_DEVICE(0x0A0B, info), /* ULT GT1 reserved */ \ + INTEL_VGA_DEVICE(0x0A06, info) /* ULT GT1 mobile */ -:34: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'info' - possible side-effects? #34: FILE: include/drm/i915_pciids.h:171: +#define INTEL_HSW_ULT_GT1_IDS(info) \ + INTEL_VGA_DEVICE(0x0A02, info), /* ULT GT1 desktop */ \ + INTEL_VGA_DEVICE(0x0A0A, info), /* ULT GT1 server */ \ + INTEL_VGA_DEVICE(0x0A0B, info), /* ULT GT1 reserved */ \ + INTEL_VGA_DEVICE(0x0A06, info) /* ULT GT1 mobile */ -:66: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses #66: FILE: include/drm/i915_pciids.h:199: +#define INTEL_HSW_ULT_GT2_IDS(info) \ + INTEL_VGA_DEVICE(0x0A12, info), /* ULT GT2 desktop */ \ + INTEL_VGA_DEVICE(0x0A1A, info), /* ULT GT2 server */ \ + INTEL_VGA_DEVICE(0x0A1B, info), /* ULT GT2 reserved */ \ + INTEL_VGA_DEVICE(0x0A16, info) /* ULT GT2 mobile */ -:66: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'info' - possible side-effects? #66: FILE: include/drm/i915_pciids.h:199: +#define INTEL_HSW_ULT_GT2_IDS(info) \ + INTEL_VGA_DEVICE(0x0A12, info), /* ULT GT2 desktop */ \ + INTEL_VGA_DEVICE(0x0A1A, info), /* ULT GT2 server */ \ + INTEL_VGA_DEVICE(0x0A1B, info), /* ULT GT2 reserved */ \ + INTEL_VGA_DEVICE(0x0A16, info) /* ULT GT2 mobile */ -:99: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses #99: FILE: include/drm/i915_pciids.h:228: +#define INTEL_HSW_ULT_GT3_IDS(info) \ + INTEL_VGA_DEVICE(0x0A22, info), /* ULT GT3 desktop */ \ + INTEL_VGA_DEVICE(0x0A2A, info), /* ULT GT3 server */ \ + INTEL_VGA_DEVICE(0x0A2B, info), /* ULT GT3 reserved */ \ + INTEL_VGA_DEVICE(0x0A26, info), /* ULT GT3 mobile */ \ + INTEL_VGA_DEVICE(0x0A2E, info) /* ULT GT3 reserved */ -:99: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'info' - possible side-effects? #99: FILE: include/drm/i915_pciids.h:228: +#define INTEL_HSW_ULT_GT3_IDS(info) \ + INTEL_VGA_DEVICE(0x0A22, info), /* ULT GT3 desktop */ \ + INTEL_VGA_DEVICE(0x0A2A, info), /* ULT GT3 server */ \ + INTEL_VGA_DEVICE(0x0A2B, info), /* ULT GT3 reserved */ \ + INTEL_VGA_DEVICE(0x0A26, info), /* ULT GT3 mobile */ \ + INTEL_VGA_DEVICE(0x0A2E, info) /* ULT GT3 reserved */ -:134: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses #134: FILE: include/drm/i915_pciids.h:265: +#define INTEL_BDW_ULT_GT1_IDS(info) \ INTEL_VGA_DEVICE(0x1606, info), /* GT1 ULT */ \ + INTEL_VGA_DEVICE(0x160B, info) /* GT1 Iris */ -:134: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'info' - possible side-effects? #134: FILE: include/drm/i915_pciids.h:265: +#define INTEL_BDW_ULT_GT1_IDS(info) \ INTEL_VGA_DEVICE(0x1606, info), /* GT1 ULT */ \ + INTEL_VGA_DEVICE(0x160B, info) /* GT1 Iris */ -:143: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses #143: FILE: include/drm/i915_pciids.h:272: +#define INTEL_BDW_GT1_IDS(info) \ + INTEL_BDW_ULT_GT1_IDS(info), \ + INTEL_BDW_ULX_GT1_IDS(info), \ + INTEL_VGA_DEVICE(0x1602, info), /* GT1 ULT */ \ INTEL_VGA_DEVICE(0x160A, info), /* GT1 Server */ \ INTEL_VGA_DEVICE(0x160D, info) /* GT1 Workstation */ -:143: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'info' - possible side-effects? #143: FILE: include/drm/i915_pciids.h:272: +#define INTEL_BDW_GT1_IDS(info) \ + INTEL_BDW_ULT_GT1_IDS(info), \ + INTEL_BDW_ULX_GT1_IDS(info), \ + INTEL_VGA_DEVICE(0x1602, info), /* GT1 ULT */ \ INTEL_VGA_DEVICE(0x160A, info), /* GT1 Server */ \ INTEL_VGA_DEVICE(0x160D, info) /* GT1 Workstation */ -:152: ERROR:COMPLEX_MACRO: Macros with complex values should be enclosed in parentheses #152: FILE: include/drm/i915_pciids.h:279: +#define INTEL_BDW_ULT_GT2_IDS(info) \ INTEL_VGA_DEVICE(0x1616, info), /* GT2 ULT */ \ +
Re: [Intel-gfx] [PATCH 1/2] drm/i915: Do not enable FEC without DSC
On Tue, Mar 26, 2019 at 04:49:02PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > Currently we enable FEC even when DSC is no used. While that is > theoretically valid supposedly there isn't much of a benefit from > this. But more importantly we do not account for the FEC link > bandwidth overhead (2.4%) in the non-DSC link bandwidth computations. > So the code may think we have enough bandwidth when we in fact > do not. > > Cc: Anusha Srivatsa > Cc: Manasi Navare > Fixes: 240999cf339f ("i915/dp/fec: Add fec_enable to the crtc state.") > Signed-off-by: Ville Syrjälä > --- > drivers/gpu/drm/i915/intel_dp.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c > index 326de12c3f44..bbf678561509 100644 > --- a/drivers/gpu/drm/i915/intel_dp.c > +++ b/drivers/gpu/drm/i915/intel_dp.c > @@ -1925,6 +1925,9 @@ static int intel_dp_dsc_compute_config(struct intel_dp > *intel_dp, > int pipe_bpp; > int ret; > > + pipe_config->fec_enable = !intel_dp_is_edp(intel_dp) && > + intel_dp_supports_fec(intel_dp, pipe_config); > + We could still not enable DSC after this point since it has more checks in this function. Even though in that case we would fail the encoder config so wouldnt matter if we have enabled FEC or not, but its less intutive. IMHO, the ideal place to set the fec enable is in intel_dp_compute_link_config() after the all to dsc_compute_config and set it only if pipe_config->dsc_params.compression_enable Manasi > if (!intel_dp_supports_dsc(intel_dp, pipe_config)) > return -EINVAL; > > @@ -2168,9 +2171,6 @@ intel_dp_compute_config(struct intel_encoder *encoder, > if (adjusted_mode->flags & DRM_MODE_FLAG_DBLCLK) > return -EINVAL; > > - pipe_config->fec_enable = !intel_dp_is_edp(intel_dp) && > - intel_dp_supports_fec(intel_dp, pipe_config); > - > ret = intel_dp_compute_link_config(encoder, pipe_config, conn_state); > if (ret < 0) > return ret; > -- > 2.19.2 > > ___ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: stop storing the media fuse (rev2)
== Series Details == Series: drm/i915: stop storing the media fuse (rev2) URL : https://patchwork.freedesktop.org/series/58387/ State : failure == Summary == CI Bug Log - changes from CI_DRM_5814_full -> Patchwork_12595_full Summary --- **FAILURE** Serious unknown changes coming with Patchwork_12595_full absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_12595_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. Possible new issues --- Here are the unknown changes that may have been introduced in Patchwork_12595_full: ### IGT changes ### Possible regressions * igt@i915_pm_rpm@i2c: - shard-iclb: PASS -> DMESG-FAIL Warnings * igt@kms_dp_dsc@basic-dsc-enable-edp: - shard-iclb: SKIP [fdo#109349] -> FAIL Known issues Here are the changes found in Patchwork_12595_full that come from known issues: ### IGT changes ### Issues hit * igt@gem_exec_schedule@preempt-contexts-bsd1: - shard-iclb: NOTRUN -> SKIP [fdo#109276] +1 * igt@gem_tiled_pread_pwrite: - shard-iclb: PASS -> TIMEOUT [fdo#109673] * igt@i915_pm_rpm@dpms-mode-unset-lpsp: - shard-skl: PASS -> INCOMPLETE [fdo#107807] +2 * igt@i915_suspend@fence-restore-untiled: - shard-skl: PASS -> INCOMPLETE [fdo#104108] / [fdo#107773] * igt@kms_busy@extended-modeset-hang-newfb-render-b: - shard-skl: NOTRUN -> DMESG-WARN [fdo#110222] * igt@kms_busy@extended-pageflip-hang-newfb-render-f: - shard-apl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] * igt@kms_color@pipe-c-ctm-max: - shard-iclb: NOTRUN -> FAIL [fdo#108147] * igt@kms_cursor_crc@cursor-128x128-suspend: - shard-apl: PASS -> FAIL [fdo#103191] / [fdo#103232] * igt@kms_cursor_crc@cursor-256x256-sliding: - shard-glk: PASS -> FAIL [fdo#103232] +2 * igt@kms_cursor_crc@cursor-512x170-onscreen: - shard-iclb: NOTRUN -> SKIP [fdo#109279] * igt@kms_cursor_legacy@2x-flip-vs-cursor-legacy: - shard-apl: NOTRUN -> SKIP [fdo#109271] * igt@kms_cursor_legacy@cursora-vs-flipb-atomic-transitions-varying-size: - shard-iclb: NOTRUN -> SKIP [fdo#109274] +1 * igt@kms_draw_crc@draw-method-rgb565-mmap-cpu-untiled: - shard-skl: NOTRUN -> FAIL [fdo#103184] * igt@kms_flip@2x-plain-flip-ts-check: - shard-glk: PASS -> INCOMPLETE [fdo#103359] / [k.org#198133] * igt@kms_flip@dpms-vs-vblank-race-interruptible: - shard-apl: PASS -> FAIL [fdo#103060] * igt@kms_flip@flip-vs-suspend-interruptible: - shard-snb: PASS -> DMESG-WARN [fdo#102365] * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-blt: - shard-iclb: PASS -> FAIL [fdo#103167] +2 * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-render: - shard-iclb: NOTRUN -> FAIL [fdo#103167] * igt@kms_frontbuffer_tracking@psr-2p-primscrn-spr-indfb-draw-mmap-gtt: - shard-iclb: NOTRUN -> SKIP [fdo#109280] +3 * igt@kms_frontbuffer_tracking@psr-rgb101010-draw-blt: - shard-iclb: PASS -> FAIL [fdo#109247] +15 * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-e: - shard-skl: NOTRUN -> SKIP [fdo#109271] / [fdo#109278] +1 * igt@kms_plane_alpha_blend@pipe-a-coverage-7efc: - shard-skl: NOTRUN -> FAIL [fdo#107815] / [fdo#108145] * igt@kms_plane_alpha_blend@pipe-c-coverage-7efc: - shard-skl: PASS -> FAIL [fdo#107815] * igt@kms_psr2_su@frontbuffer: - shard-iclb: PASS -> SKIP [fdo#109642] * igt@kms_psr@psr2_sprite_plane_move: - shard-iclb: PASS -> SKIP [fdo#109441] +2 * igt@kms_psr@sprite_plane_onoff: - shard-iclb: PASS -> FAIL [fdo#107383] / [fdo#110215] +2 * igt@kms_rotation_crc@multiplane-rotation: - shard-kbl: PASS -> INCOMPLETE [fdo#103665] * igt@kms_vblank@pipe-a-ts-continuation-suspend: - shard-iclb: PASS -> FAIL [fdo#104894] * igt@perf_pmu@busy-accuracy-50-vcs1: - shard-skl: NOTRUN -> SKIP [fdo#109271] +20 Possible fixes * igt@gem_mmap_gtt@forked-big-copy-odd: - shard-iclb: TIMEOUT [fdo#109673] -> PASS * igt@gem_ppgtt@blt-vs-render-ctx0: - shard-iclb: INCOMPLETE [fdo#109801] -> PASS * igt@i915_pm_rpm@legacy-planes-dpms: - shard-iclb: INCOMPLETE [fdo#108840] / [fdo#109369] -> PASS * igt@kms_busy@extended-modeset-hang-oldfb-with-reset-render-a: - shard-snb: SKIP [fdo#109271] / [fdo#109278] -> PASS * igt@kms_cursor_crc@cursor-256x256-suspend: - shard-skl: INCOMPLETE [fdo#104108] -> PASS *
Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 17/24] i915: Add gem_ctx_clone
Quoting Tvrtko Ursulin (2019-03-26 15:44:35) > > On 22/03/2019 09:21, Chris Wilson wrote: > > +static void clone_vm(int i915) > > +{ > > + struct drm_i915_gem_context_create_ext_setparam set = { > > + { .name = I915_CONTEXT_CREATE_EXT_SETPARAM }, > > + { .param = I915_CONTEXT_PARAM_VM }, > > + }; > > + struct drm_i915_gem_context_create_ext_clone ext = { > > + { .name = I915_CONTEXT_CREATE_EXT_CLONE }, > > + .flags = I915_CONTEXT_CLONE_VM, > > + }; > > + struct drm_i915_gem_context_create_ext create = { > > + .flags = I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS, > > + .extensions = to_user_pointer(), > > + }; > > + uint32_t vm_id[2]; > > + int expected; > > + > > + igt_require(__gem_context_set_param(i915, ) == -ENOENT); > > + > > + set.param.ctx_id = gem_context_create(i915); > > + gem_context_get_param(i915, ); > > + vm_id[0] = set.param.value; > > + gem_context_destroy(i915, set.param.ctx_id); > > Do you have in the VM ioctl IGT, or the ctx get/set VM, a subtest that > verifies VM survives context destroy, if it was exported before that? It > would need one I think. > > But in this particular one, what is the reason you create one VM > indirectly via context create which is immediately destroyed? Exactly to > test the above mentioned? It was precisely that to check that we could keep a VM from an earlier context. But honestly it was because I had forgotten about gem_vm_create() at that point and had to go and write another bunch of tests. > > + set.param.ctx_id = 0; > > + > > + vm_id[1] = gem_vm_create(i915); And then I was supposed to check we got similar results using explict allocation. > > + for (int pass = 0; pass < 2; pass++) { /* cloning default, then child > > */ > > + igt_debug("Cloning %d\n", ext.clone_id); > > + igt_assert_eq(__create_ext(i915, ), 0); > > + > > + set.param.ctx_id = ext.clone_id; > > + gem_context_get_param(i915, ); > > + expected = set.param.value; > > + > > + set.param.ctx_id = create.ctx_id; > > + gem_context_get_param(i915, ); > > + > > + igt_assert_eq_u64(set.param.param, I915_CONTEXT_PARAM_VM); > > + igt_assert_eq((int)set.param.value, expected); > > + > > + gem_context_destroy(i915, create.ctx_id); > > + > > + expected = set.param.value = vm_id[0]; > > + set.param.ctx_id = ext.clone_id; > > + gem_context_set_param(i915, ); > > + > > + igt_assert_eq(__create_ext(i915, ), 0); > > + > > + set.param.ctx_id = create.ctx_id; > > + gem_context_get_param(i915, ); > > + > > + igt_assert_eq_u64(set.param.param, I915_CONTEXT_PARAM_VM); > > + igt_assert_eq((int)set.param.value, expected); > > + > > + gem_context_destroy(i915, create.ctx_id); > > + ext.clone_id = gem_context_create(i915); > > + } > > vm_id[1] is unused. Yeah... -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 17/24] i915: Add gem_ctx_clone
Quoting Tvrtko Ursulin (2019-03-26 15:44:35) > > On 22/03/2019 09:21, Chris Wilson wrote: > > +static void clone_engines(int i915) > > +{ > > + struct drm_i915_gem_context_create_ext_setparam set = { > > + { .name = I915_CONTEXT_CREATE_EXT_SETPARAM }, > > + { .param = I915_CONTEXT_PARAM_ENGINES }, > > Hm I don't remember seeing the engine map test in the series to this > point. Where is it? "Are we nearly there yet?" Almost. It's hard to tell what order to put these in as I use context cloning for the gem_ctx_engine tests as well. You could say each subtest in a separate patch so they all flow in some well defined order, I'm just trying to make sure things work :) -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 17/24] i915: Add gem_ctx_clone
On 22/03/2019 09:21, Chris Wilson wrote: Exercise cloning contexts, an extension of merely creating one. Signed-off-by: Chris Wilson --- tests/Makefile.sources | 1 + tests/i915/gem_ctx_clone.c | 421 + tests/meson.build | 1 + 3 files changed, 423 insertions(+) create mode 100644 tests/i915/gem_ctx_clone.c diff --git a/tests/Makefile.sources b/tests/Makefile.sources index 809b25612..12f4bbd75 100644 --- a/tests/Makefile.sources +++ b/tests/Makefile.sources @@ -21,6 +21,7 @@ TESTS_progs = \ drm_import_export \ drm_mm \ drm_read \ + i915/gem_ctx_clone \ i915/gem_vm_create \ kms_3d \ kms_addfb_basic \ diff --git a/tests/i915/gem_ctx_clone.c b/tests/i915/gem_ctx_clone.c new file mode 100644 index 0..7d83c6350 --- /dev/null +++ b/tests/i915/gem_ctx_clone.c @@ -0,0 +1,421 @@ +/* + * Copyright © 2019 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +#include "igt.h" +#include "i915/gem_vm.h" +#include "i915_drm.h" + +static int __create_ext(int i915, struct drm_i915_gem_context_create_ext *arg) +{ + int err; + + err = 0; + if (igt_ioctl(i915, DRM_IOCTL_I915_GEM_CONTEXT_CREATE_EXT, arg)) + err = -errno; + + errno = 0; + return err; +} + +static bool has_ctx_clone(int i915) +{ + struct drm_i915_gem_context_create_ext_clone ext = { + { .name = I915_CONTEXT_CREATE_EXT_CLONE }, + .clone_id = -1, + }; + struct drm_i915_gem_context_create_ext create = { + .flags = I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS, + .extensions = to_user_pointer(), + }; + return __create_ext(i915, ) == -ENOENT; +} + +static void invalid_clone(int i915) +{ + struct drm_i915_gem_context_create_ext_clone ext = { + { .name = I915_CONTEXT_CREATE_EXT_CLONE }, + }; + struct drm_i915_gem_context_create_ext create = { + .flags = I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS, + .extensions = to_user_pointer(), + }; + + igt_assert_eq(__create_ext(i915, ), 0); + gem_context_destroy(i915, create.ctx_id); + + ext.flags = -1; /* Hopefully we won't run out of flags */ + igt_assert_eq(__create_ext(i915, ), -EINVAL); + ext.flags = 0; + + ext.base.next_extension = -1; + igt_assert_eq(__create_ext(i915, ), -EFAULT); + ext.base.next_extension = to_user_pointer(); + igt_assert_eq(__create_ext(i915, ), -E2BIG); + ext.base.next_extension = 0; + + ext.clone_id = -1; + igt_assert_eq(__create_ext(i915, ), -ENOENT); + ext.clone_id = 0; +} + +static void clone_flags(int i915) +{ + struct drm_i915_gem_context_create_ext_setparam set = { + { .name = I915_CONTEXT_CREATE_EXT_SETPARAM }, + { .param = I915_CONTEXT_PARAM_RECOVERABLE }, + }; + struct drm_i915_gem_context_create_ext_clone ext = { + { .name = I915_CONTEXT_CREATE_EXT_CLONE }, + .flags = I915_CONTEXT_CLONE_FLAGS, + }; + struct drm_i915_gem_context_create_ext create = { + .flags = I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS, + .extensions = to_user_pointer(), + }; + int expected; + + set.param.value = 1; /* default is recoverable */ + igt_require(__gem_context_set_param(i915, ) == 0); + + for (int pass = 0; pass < 2; pass++) { /* cloning default, then child */ + igt_debug("Cloning %d\n", ext.clone_id); + igt_assert_eq(__create_ext(i915, ), 0); + + set.param.ctx_id = ext.clone_id; + gem_context_get_param(i915, ); + expected = set.param.value; + + set.param.ctx_id = create.ctx_id; + gem_context_get_param(i915, );
[Intel-gfx] [PATCH] drm/i915: Only reset the pinned kernel contexts on resume
On resume, we know that the only pinned contexts in danger of seeing corruption are the kernel context, and so we do not need to walk the list of all GEM contexts as we tracked them on each engine. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_drv.h| 1 - drivers/gpu/drm/i915/i915_gem.c| 9 ++-- drivers/gpu/drm/i915/intel_context_types.h | 1 + drivers/gpu/drm/i915/intel_engine_cs.c | 18 drivers/gpu/drm/i915/intel_lrc.c | 49 +++--- drivers/gpu/drm/i915/intel_lrc.h | 1 - drivers/gpu/drm/i915/intel_ringbuffer.c| 17 drivers/gpu/drm/i915/intel_ringbuffer.h| 3 +- 8 files changed, 54 insertions(+), 45 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 380198628d83..d9eab8591135 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -1994,7 +1994,6 @@ struct drm_i915_private { /* Abstract the submission mechanism (legacy ringbuffer or execlists) away */ struct { - void (*resume)(struct drm_i915_private *); void (*cleanup_engine)(struct intel_engine_cs *engine); struct i915_gt_timelines { diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index f6cdd5fb9deb..ba8ccda8648f 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -4492,7 +4492,7 @@ void i915_gem_resume(struct drm_i915_private *i915) * guarantee that the context image is complete. So let's just reset * it and start again. */ - i915->gt.resume(i915); + intel_engines_resume(i915); if (i915_gem_init_hw(i915)) goto err_wedged; @@ -4832,13 +4832,10 @@ int i915_gem_init(struct drm_i915_private *dev_priv) dev_priv->mm.unordered_timeline = dma_fence_context_alloc(1); - if (HAS_LOGICAL_RING_CONTEXTS(dev_priv)) { - dev_priv->gt.resume = intel_lr_context_resume; + if (HAS_LOGICAL_RING_CONTEXTS(dev_priv)) dev_priv->gt.cleanup_engine = intel_logical_ring_cleanup; - } else { - dev_priv->gt.resume = intel_legacy_submission_resume; + else dev_priv->gt.cleanup_engine = intel_engine_cleanup; - } i915_timelines_init(dev_priv); diff --git a/drivers/gpu/drm/i915/intel_context_types.h b/drivers/gpu/drm/i915/intel_context_types.h index 624729a35875..68b4ca1611e0 100644 --- a/drivers/gpu/drm/i915/intel_context_types.h +++ b/drivers/gpu/drm/i915/intel_context_types.h @@ -24,6 +24,7 @@ struct intel_context_ops { int (*pin)(struct intel_context *ce); void (*unpin)(struct intel_context *ce); + void (*reset)(struct intel_context *ce); void (*destroy)(struct kref *kref); }; diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c index c5b417327132..b20aea509146 100644 --- a/drivers/gpu/drm/i915/intel_engine_cs.c +++ b/drivers/gpu/drm/i915/intel_engine_cs.c @@ -756,6 +756,24 @@ int intel_engine_init_common(struct intel_engine_cs *engine) return ret; } +void intel_engines_resume(struct drm_i915_private *i915) +{ + struct intel_engine_cs *engine; + enum intel_engine_id id; + + /* +* After resume, we may need to poke into the pinned kernel +* contexts to paper over any damage caused by the sudden suspend. +* Only the kernel contexts should remain pinned over suspend, +* allowing us to fixup the user contexts on their first pin. +*/ + for_each_engine(engine, i915, id) { + struct intel_context *ce = engine->kernel_context; + + ce->ops->reset(ce); + } +} + /** * intel_engines_cleanup_common - cleans up the engine state created by *the common initiailizers. diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index 66bc3cd4e166..b812c96d6ed0 100644 --- a/drivers/gpu/drm/i915/intel_lrc.c +++ b/drivers/gpu/drm/i915/intel_lrc.c @@ -1379,9 +1379,33 @@ static int execlists_context_pin(struct intel_context *ce) return __execlists_context_pin(ce, ce->engine); } +static void execlists_context_reset(struct intel_context *ce) +{ + /* +* Because we emit WA_TAIL_DWORDS there may be a disparity +* between our bookkeeping in ce->ring->head and ce->ring->tail and +* that stored in context. As we only write new commands from +* ce->ring->tail onwards, everything before that is junk. If the GPU +* starts reading from its RING_HEAD from the context, it may try to +* execute that junk and die. +* +* The contexts that are stilled pinned on resume belong to the +* kernel, and are local to each engine. All other contexts will +* have their head/tail sanitized upon pinning before
Re: [Intel-gfx] [PATCH] drm/i915/selftests: Fix an IS_ERR() vs NULL check
On Tue, Mar 26, 2019 at 02:53:49PM +, Chris Wilson wrote: > Quoting Mika Kuoppala (2019-03-26 09:30:57) > > Dan Carpenter writes: > > > > > The live_context() function returns error pointers. It never returns > > > NULL. > > > > > > Fixes: 9c1477e83e62 ("drm/i915/selftests: Exercise adding requests to a > > > full GGTT") > > > Signed-off-by: Dan Carpenter > > > > Reviewed-by: Mika Kuoppala > > > > i915_request.c has another :) > > Having found it, you could have typed up the patch :-p > Smatch didn't warn about that one because we didn't dereference it right away... I should make a check which complains about the condition instead of the dereference. regards, dan carpenter ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/fbdev: Make skip_vt_switch the default
On Wed, Nov 28, 2018 at 8:17 AM Maarten Lankhorst wrote: > > Op 27-11-18 om 18:34 schreef Daniel Vetter: > > KMS drivers really should all be able to restore their display state > > on resume without fbcon helping out. So make this the default. > > > > Since I'm not entirely foolish, make it only a default, which drivers > > can still override. That way when the inevitable regression report > > happens I can fix things up with a one-liner plus FIXME comment that > > someone should fix up the suspend/resume code in that driver. > > > > But at least all new drivers won't be broken by accident as soon as > > you turn off fbcon because "suspend/resume worked when I tested it". > > > > v2: Keep this for radeon because of > > > > commit 18c437caa5b18a235dd65cec224eab54bebcee65 > > Author: Alex Deucher > > Date: Tue Nov 14 17:19:29 2017 -0500 > > > > Revert "drm/radeon: dont switch vt on suspend" > > > > Thanks to Michel Dänzer for pointing this one out. > > Maybe just reload the gamma lut on resume for radeon, instead of relying on > fbcon? > > Otherwise patch looks sane, would be nice if radeon was fixed instead of > worked around. > > Reviewed-by: Maarten Lankhorst Noticed this old patch, finally gotten around to merging it. Thanks everyone for reviewing. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx