Angus Wang
80c5f69b94
drm/amd/display: Fix RGB MPO underflow with multiple displays
...
[WHY]
With RGB MPO enabled, playing a video with multiple displays connected
results in underflow when closing the video window
[HOW]
Reverted the old change to fix this problem, which prevented pipe splits
for multiple display configurations and caused high MCLK speeds during
idle. Added a two step call to dc_update_planes_and_stream, first time
with pipe split disabled and the second time with pipe split enabled,
which fixed the underflow issue
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com >
Acked-by: Anson Jacob <Anson.Jacob@amd.com >
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com >
Signed-off-by: Angus Wang <angus.wang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-11-17 16:58:06 -05:00
Charlene Liu
1f6c9ab06f
drm/amd/display: remove dmcub_support cap dependency
...
[why]
matching the dmcub_support with all other dcn version.
Reviewed-by: Sung joon Kim <Sungjoon.Kim@amd.com >
Reviewed-by: Martin Leung <Martin.Leung@amd.com >
Acked-by: Anson Jacob <Anson.Jacob@amd.com >
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com >
Signed-off-by: Charlene Liu <Charlene.Liu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-11-17 16:58:05 -05:00
Mikita Lipski
f0d0c39149
drm/amd/display: Pass panel inst to a PSR command
...
[why]
PSR set power command wasn't setting panel instance
and command version which caused both streams
to overwrite the same PSR state.
[how]
Pass panel instance to the set power command function
and to DMUB and set command version enum
Reviewed-by: Anthony Koo <Anthony.Koo@amd.com >
Acked-by: Anson Jacob <Anson.Jacob@amd.com >
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com >
Signed-off-by: Mikita Lipski <mikita.lipski@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-11-17 16:58:05 -05:00
Leo (Hanghong) Ma
ebd1e71969
drm/amd/display: Add helper for blanking all dp displays
...
[Why & How]
1. The code to blank all dp display have been called many times,
so add helpers in dc_link to make it more concise.
2. Add some check to fix the dmesg errors at boot and resume from S3
on dcn3.1 during DQE's promotion test.
Reviewed-by: Alvin Lee <alvin.lee2@amd.com >
Reviewed-by: Wesley Chalmers <Wesley.Chalmers@amd.com >
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com >
Acked-by: Anson Jacob <Anson.Jacob@amd.com >
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com >
Signed-off-by: Leo (Hanghong) Ma <hanghong.ma@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-11-17 16:58:05 -05:00
Ye Guojin
b97788e504
drm/amd/display: remove unnecessary conditional operators
...
Since the variables named is_end_of_payload and hpd_status are already
bool type, the ?: conditional operator is unnecessary any more.
Clean them up here.
Reported-by: Zeal Robot <zealci@zte.com.cn >
Reviewed-by: Simon Ser <contact@emersion.fr >
Signed-off-by: Ye Guojin <ye.guojin@zte.com.cn >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-11-17 16:58:04 -05:00
Nirmoy Das
26db557e35
drm/amdgpu: return early on error while setting bar0 memtype
...
We set WC memtype for aper_base but don't check return value
of arch_io_reserve_memtype_wc(). Be more defensive and return
early on error.
Signed-off-by: Nirmoy Das <nirmoy.das@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-11-17 16:58:04 -05:00
Nirmoy Das
d5a28852e8
drm/amdgpu: remove unnecessary checks
...
amdgpu_ttm_backend_bind() only needed for TTM_PL_TT
and AMDGPU_PL_PREEMPT.
Signed-off-by: Nirmoy Das <nirmoy.das@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-11-17 16:58:04 -05:00
Felix Kuehling
b5f5738480
drm/amdkfd: Add sysfs bitfields and enums to uAPI
...
These bits are de-facto part of the uAPI, so declare them in a uAPI header.
The corresponding bit-fields and enums in user mode are defined in
https://github.com/RadeonOpenCompute/ROCT-Thunk-Interface/blob/master/include/hsakmttypes.h
HSA_CAP_... -> HSA_CAPABILITY
HSA_MEM_HEAP_TYPE_... -> HSA_HEAPTYPE
HSA_MEM_FLAGS_... -> HSA_MEMORYPROPERTY
HSA_CACHE_TYPE_... -> HsaCacheType
HSA_IOLINK_TYPE_... -> HSA_IOLINKTYPE
HSA_IOLINK_FLAGS_... -> HSA_LINKPROPERTY
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com >
Reviewed-by: Jonathan Kim <jonathan.kim@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-11-17 16:58:03 -05:00
Evan Quan
087451f372
drm/amdgpu: use generic fb helpers instead of setting up AMD own's.
...
With the shadow buffer support from generic framebuffer emulation, it's
possible now to have runpm kicked when no update for console.
Signed-off-by: Evan Quan <evan.quan@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-11-17 16:58:03 -05:00
Graham Sider
b5d1d755c1
drm/amdkfd: remove kgd_dev declaration and initialization
...
Completes removal of kgd_dev. Direct references to amdgpu_device objects
should now be used instead.
Signed-off-by: Graham Sider <Graham.Sider@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-11-17 16:58:03 -05:00
Graham Sider
56c5977eae
drm/amdkfd: replace/remove remaining kgd_dev references
...
Remove get_amdgpu_device and other remaining kgd_dev references aside
from declaration/kfd struct entry and initialization.
Signed-off-by: Graham Sider <Graham.Sider@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-11-17 16:58:02 -05:00
Graham Sider
dff63da93e
drm/amdkfd: replace kgd_dev in gpuvm amdgpu_amdkfd funcs
...
Modified definitions:
- amdgpu_amdkfd_gpuvm_acquire_process_vm
- amdgpu_amdkfd_gpuvm_release_process_vm
- amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu
- amdgpu_amdkfd_gpuvm_free_memory_of_gpu
- amdgpu_amdkfd_gpuvm_map_memory_to_gpu
- amdgpu_amdkfd_gpuvm_unmap_memory_from_gpu
- amdgpu_amdkfd_gpuvm_sync_memory
- amdgpu_amdkfd_gpuvm_map_gtt_bo_to_kernel
- amdgpu_amdkfd_gpuvm_unmap_gtt_bo_from_kernel
- amdgpu_amdkfd_gpuvm_get_vm_fault_info
- amdgpu_amdkfd_gpuvm_import_dmabuf
- amdgpu_amdkfd_get_tile_config
Removed:
- get_amdgpu_device
Signed-off-by: Graham Sider <Graham.Sider@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-11-17 16:58:02 -05:00
Graham Sider
574c4183ef
drm/amdkfd: replace kgd_dev in get amdgpu_amdkfd funcs
...
Modified definitions:
- amdgpu_amdkfd_get_fw_version
- amdgpu_amdkfd_get_local_mem_info
- amdgpu_amdkfd_get_gpu_clock_counter
- amdgpu_amdkfd_get_max_engine_clock_in_mhz
- amdgpu_amdkfd_get_cu_info
- amdgpu_amdkfd_get_dmabuf_info
- amdgpu_amdkfd_get_vram_usage
- amdgpu_amdkfd_get_hive_id
- amdgpu_amdkfd_get_unique_id
- amdgpu_amdkfd_get_mmio_remap_phys_addr
- amdgpu_amdkfd_get_num_gws
- amdgpu_amdkfd_get_asic_rev_id
- amdgpu_amdkfd_get_noretry
- amdgpu_amdkfd_get_xgmi_hops_count
- amdgpu_amdkfd_get_xgmi_bandwidth_mbytes
- amdgpu_amdkfd_get_pcie_bandwidth_mbytes
Also replaces kfd_device_by_kgd with kfd_device_by_adev, now
searching via adev rather than kgd.
Signed-off-by: Graham Sider <Graham.Sider@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-11-17 16:58:02 -05:00
Graham Sider
6bfc7c7e17
drm/amdkfd: replace kgd_dev in various amgpu_amdkfd funcs
...
Modified definitions:
- amdgpu_amdkfd_submit_ib
- amdgpu_amdkfd_set_compute_idle
- amdgpu_amdkfd_have_atomics_support
- amdgpu_amdkfd_flush_gpu_tlb_pasid
- amdgpu_amdkfd_flush_gpu_tlb_pasid
- amdgpu_amdkfd_gpu_reset
- amdgpu_amdkfd_alloc_gtt_mem
- amdgpu_amdkfd_free_gtt_mem
- amdgpu_amdkfd_alloc_gws
- amdgpu_amdkfd_free_gws
- amdgpu_amdkfd_ras_poison_consumption_handler
Signed-off-by: Graham Sider <Graham.Sider@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-11-17 16:58:01 -05:00
Graham Sider
3356c38dc1
drm/amdkfd: replace kgd_dev in various kfd2kgd funcs
...
Modified definitions:
- program_sh_mem_settings
- set_pasid_vmid_mapping
- init_interrupts
- address_watch_disable
- address_watch_execute
- wave_control_execute
- address_watch_get_offset
- get_atc_vmid_pasid_mapping_info
- set_scratch_backing_va
- set_vm_context_page_table_base
- read_vmid_from_vmfault_reg
- get_cu_occupancy
- program_trap_handler_settings
Signed-off-by: Graham Sider <Graham.Sider@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-11-17 16:58:01 -05:00
Graham Sider
420185fdad
drm/amdkfd: replace kgd_dev in hqd/mqd kfd2kgd funcs
...
Modified definitions:
- hqd_load
- hiq_mqd_load
- hqd_sdma_load
- hqd_dump
- hqd_sdma_dump
- hqd_is_occupied
- hqd_destroy
- hqd_sdma_is_occupied
- hqd_sdma_destroy
Signed-off-by: Graham Sider <Graham.Sider@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-11-17 16:58:01 -05:00
Graham Sider
c531a58bb6
drm/amdkfd: replace kgd_dev in static gfx v10_3 funcs
...
Static funcs in amdgpu_amdkfd_gfx_v10_3.c now using amdgpu_device.
Signed-off-by: Graham Sider <Graham.Sider@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-11-17 16:58:00 -05:00
Graham Sider
4056b03377
drm/amdkfd: replace kgd_dev in static gfx v10 funcs
...
Static funcs in amdgpu_amdkfd_gfx_v10.c now using amdgpu_device.
Signed-off-by: Graham Sider <Graham.Sider@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-11-17 16:58:00 -05:00
Graham Sider
9a17c9b79b
drm/amdkfd: replace kgd_dev in static gfx v9 funcs
...
Static funcs in amdgpu_amdkfd_gfx_v9.c now using amdgpu_device.
Signed-off-by: Graham Sider <Graham.Sider@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-11-17 16:58:00 -05:00
Graham Sider
1cca608742
drm/amdkfd: replace kgd_dev in static gfx v8 funcs
...
Static funcs in amdgpu_amdkfd_gfx_v8.c now using amdgpu_device.
Signed-off-by: Graham Sider <Graham.Sider@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-11-17 16:57:59 -05:00
Graham Sider
9365fbf3d7
drm/amdkfd: replace kgd_dev in static gfx v7 funcs
...
Static funcs in amdgpu_amdkfd_gfx_v7.c now using amdgpu_device.
Signed-off-by: Graham Sider <Graham.Sider@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-11-17 16:57:59 -05:00
Graham Sider
c6c5744638
drm/amdkfd: add amdgpu_device entry to kfd_dev
...
Patch series to remove kgd_dev struct and replace all instances with
amdgpu_device objects.
amdgpu_device needs to be declared in kgd_kfd_interface.h to be visible
to kfd2kgd_calls.
Signed-off-by: Graham Sider <Graham.Sider@amd.com >
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2021-11-17 16:57:59 -05:00
Imre Deak
a59308a5fb
drm/i915: Fix fastsets on TypeC ports following a non-blocking modeset
...
After a non-blocking modeset on a TypeC port's CRTC - possibly blocked
later in drm_atomic_helper_wait_for_dependencies() - a fastset on the
same CRTC may copy the state of CRTC before this gets updated to reflect
the up-to-date DP-alt vs. TBT-alt TypeC mode DPLL used for the CRTC. In
this case after the first (non-blocking) commit completes enabling the
DPLL required for the up-to-date TypeC mode the following fastset will
update the CRTC state pointing to the wrong DPLL. A subsequent disabling
modeset will try to disable the wrong PLL, triggering a state checker
WARN (and leaving the DPLL which is actually used active for good).
Fix the above race by copying the DPLL state for fastset CRTCs from the
old CRTC state at the point where it's guaranteed to be up-to-date
already. This could be handled in the encoder's update_prepare() hook as
well, but that's a bigger change, which is better done as a follow-up.
v2: Copy dpll_hw_state as well. (Ville)
Testcase: igt/kms_busy/extended-modeset-hang-newfb-with-reset
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/4308
Cc: Ville Syrjala <ville.syrjala@linux.intel.com >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Reviewed-by: Mika Kahola <mika.kahola@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20211115181121.156197-1-imre.deak@intel.com
2021-11-17 18:54:16 +02:00
Kieran Bingham
1e66f04c14
gpu: drm: panel-edp: Fix edp_panel_entry documentation
...
The edp_panel_entry members 'delay' and 'name' are documented, but
without the correct syntax for kernel doc.
This generates the following warnings:
drivers/gpu/drm/panel/panel-edp.c:204: warning: Function parameter or member 'delay' not described in 'edp_panel_entry'
drivers/gpu/drm/panel/panel-edp.c:204: warning: Function parameter or member 'name' not described in 'edp_panel_entry'
Fix them accordingly.
Fixes: 5540cf8f3e ("drm/panel-edp: Implement generic "edp-panel"s probed by EDID")
Signed-off-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20211117163239.529781-1-kieran.bingham+renesas@ideasonboard.com
2021-11-17 08:46:21 -08:00
yangcong
aa70a0996b
drm/bridge: parade-ps8640: Fix additional suspend/resume at bootup
...
Through log and waveform, we can see that there will be additional
suspend/resume when booting. This timing does not meet the ps8640 spec.
It seems that the delay of 500ms does not satisfied drm_panel_get_modes.
I increased it to 900ms and it seems that this problem can be solved.
To be safe, I'd just round up to a full 1000.
Signed-off-by: yangcong <yangcong5@huaqin.corp-partner.google.com >
Reviewed-by: Stephen Boyd <swboyd@chromium.org >
Signed-off-by: Douglas Anderson <dianders@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20211112084302.2447931-1-yangcong5@huaqin.corp-partner.google.com
2021-11-17 08:45:28 -08:00
Dan Carpenter
fe69a2dd88
drm/i915/guc: fix NULL vs IS_ERR() checking
...
The intel_engine_create_virtual() function does not return NULL. It
returns error pointers.
Fixes: e5e32171a2 ("drm/i915/guc: Connect UAPI to GuC multi-lrc interface")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20211116114916.GB11936@kili
2021-11-17 10:41:23 -05:00
Dan Carpenter
8b2abf777d
drm/i915/guc: fix NULL vs IS_ERR() checking
...
The intel_engine_create_virtual() function does not return NULL. It
returns error pointers.
Fixes: e5e32171a2 ("drm/i915/guc: Connect UAPI to GuC multi-lrc interface")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: John Harrison <John.C.Harrison@Intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20211116114916.GB11936@kili
(cherry picked from commit fc12b70d12 )
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2021-11-17 08:46:55 -05:00
Vandita Kulkarni
d33233d878
drm/i915/dsi/xelpd: Fix the bit mask for wakeup GB
...
v2: Fix the typo, move out the hardcoding from
macro(Jani, Ville)
Fixes: f87c46c431 ("drm/i915/dsi/xelpd: Add WA to program LP to HS wakeup guardband")
Signed-off-by: Vandita Kulkarni <vandita.kulkarni@intel.com >
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20211019151435.20477-2-vandita.kulkarni@intel.com
(cherry picked from commit 6f07707fa0 )
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2021-11-17 08:46:47 -05:00
Vandita Kulkarni
f15863b277
Revert "drm/i915/tgl/dsi: Gate the ddi clocks after pll mapping"
...
This reverts commit 991d9557b0 ("drm/i915/tgl/dsi: Gate the ddi clocks
after pll mapping"). The Bspec was updated recently with the pll ungate
sequence similar to that of icl dsi enable sequence. Hence reverting.
Bspec: 49187
Fixes: 991d9557b0 ("drm/i915/tgl/dsi: Gate the ddi clocks after pll mapping")
Cc: <stable@vger.kernel.org > # v5.4+
Signed-off-by: Vandita Kulkarni <vandita.kulkarni@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20211109120428.15211-1-vandita.kulkarni@intel.com
(cherry picked from commit 4579509ef1 )
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
2021-11-17 08:46:40 -05:00
Christian König
fa78e367a2
drm/amdgpu: stop getting excl fence separately
...
Just grab all fences for the display flip in one go.
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20211028132630.2330-2-christian.koenig@amd.com
2021-11-17 14:32:27 +01:00
Christian König
2cbb8d4d67
drm/i915: use new iterator in i915_gem_object_wait_reservation
...
Simplifying the code a bit.
Signed-off-by: Christian König <christian.koenig@amd.com >
[mlankhorst: Handle timeout = 0 correctly, use new i915_request_wait_timeout.]
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Acked-by: Daniel Vetter <daniel@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20211116102431.198905-7-christian.koenig@amd.com
2021-11-17 14:26:24 +01:00
Maarten Lankhorst
7e2e69ed46
drm/i915: Fix i915_request fence wait semantics
...
The i915_request fence wait behaves differently for timeout = 0
compared to expected dma-fence behavior.
i915 behavior:
- Unsignaled: -ETIME
- Signaled: 0 (= timeout)
Expected:
- Unsignaled: 0
- Signaled: 1
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Acked-by: Daniel Vetter <daniel@ffwll.ch >
Acked-by: Christian König <christian.koenig@amd.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20211116102431.198905-6-christian.koenig@amd.com
Signed-off-by: Christian König <christian.koenig@amd.com >
2021-11-17 14:26:19 +01:00
Christian König
5e9ddbdcf7
drm/i915: use new cursor in intel_prepare_plane_fb v2
...
Simplifying the code a bit.
v2: rebased
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Daniel Vetter <daniel@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20211116102431.198905-5-christian.koenig@amd.com
2021-11-17 14:24:37 +01:00
Christian König
1b5bdf071e
drm/i915: use the new iterator in i915_sw_fence_await_reservation v3
...
Simplifying the code a bit.
v2: use dma_resv_for_each_fence instead, according to Tvrtko the lock is
held here anyway.
v3: back to using dma_resv_for_each_fence_unlocked.
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Daniel Vetter <daniel@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20211116102431.198905-4-christian.koenig@amd.com
2021-11-17 14:24:15 +01:00
Christian König
73495209f6
drm/i915: use new iterator in i915_gem_object_wait_priority
...
Simplifying the code a bit.
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Daniel Vetter <daniel@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20211116102431.198905-3-christian.koenig@amd.com
2021-11-17 14:23:39 +01:00
Christian König
912ff2ebd6
drm/i915: use the new iterator in i915_gem_busy_ioctl v2
...
This makes the function much simpler since the complex
retry logic is now handled else where.
Signed-off-by: Christian König <christian.koenig@amd.com >
Acked-by: Daniel Vetter <daniel@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20211116102431.198905-2-christian.koenig@amd.com
2021-11-17 14:23:09 +01:00
Jani Nikula
b8d65b8a5a
drm/i915/driver: add i915_driver_ prefix to functions
...
Add the i915_driver_ prefix to the switcheroo functions in
i915_driver.[ch].
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20211111101304.13094-3-jani.nikula@intel.com
2021-11-17 11:47:55 +02:00
Jani Nikula
4588d7eb3b
drm/i915/driver: rename driver to i915_drm_driver
...
As a name, "driver" is too generic and short to be easily located in a
file this size. Rename it to i915_drm_driver.
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20211111101304.13094-2-jani.nikula@intel.com
2021-11-17 11:47:47 +02:00
Jani Nikula
58471f6384
drm/i915/driver: rename i915_drv.c to i915_driver.c
...
This is more about trimming i915_drv.h than the renamed
i915_driver.[ch]. Split out i915_driver.[ch] out of i915_drv.h as a
feasible thing to do.
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20211111101304.13094-1-jani.nikula@intel.com
2021-11-17 11:46:58 +02:00
Rob Clark
963d0b3569
drm/scheduler: fix drm_sched_job_add_implicit_dependencies harder
...
drm_sched_job_add_dependency() could drop the last ref, so we need to do
the dma_fence_get() first.
Cc: Christian König <christian.koenig@amd.com >
Fixes: 9c2ba26535 ("drm/scheduler: use new iterator in drm_sched_job_add_implicit_dependencies v2")
Signed-off-by: Rob Clark <robdclark@chromium.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20211116155545.473311-1-robdclark@gmail.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Christian König <christian.koenig@amd.com >
Tested-by: Amit Pundir <amit.pundir@linaro.org >
Signed-off-by: Christian König <christian.koenig@amd.com >
2021-11-17 08:21:03 +01:00
Dan Carpenter
fc12b70d12
drm/i915/guc: fix NULL vs IS_ERR() checking
...
The intel_engine_create_virtual() function does not return NULL. It
returns error pointers.
Fixes: e5e32171a2 ("drm/i915/guc: Connect UAPI to GuC multi-lrc interface")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: John Harrison <John.C.Harrison@Intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20211116114916.GB11936@kili
2021-11-16 12:07:48 -08:00
Tilak Tangudu
1a085e2341
drm/i915: Disable D3Cold in s2idle and runtime pm
...
s2idle and runtime pm puts the pci gfx device in D3Hot, ACPI runtime
monitors the pci tree,if it sees complete tree as D3Hot,it transitions
the device to D3Cold.But i915 do not have D3Cold support in S2idle or in
runtime pm. so disabling D3cold in above flows and its FIXME.
Added pci D3Cold enable/disable in s2idle and runtime suspend/resume
flows.
Signed-off-by: Tilak Tangudu <tilak.tangudu@intel.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20211115154054.3220476-1-tilak.tangudu@intel.com
2021-11-16 09:39:33 -05:00
Tvrtko Ursulin
9a7fc95271
drm/i915: Skip error capture when wedged on init
...
Trying to capture uninitialised engines when we wedged on init ends in
tears. Skip that together with uC capture, since failure to initialise the
latter can actually be one of the reasons for wedging on init.
v2:
* Use i915_disable_error_state when wedging on init/fini.
v3:
* Handle mock tests.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Reviewed-by: Matthew Auld <matthew.auld@intel.com > # v1
Link: https://patchwork.freedesktop.org/patch/msgid/20211111130634.266098-1-tvrtko.ursulin@linux.intel.com
2021-11-16 10:36:08 +00:00
Christian König
4eaf02d607
drm/scheduler: fix drm_sched_job_add_implicit_dependencies
...
Trivial fix since we now need to grab a reference to the fence we have
added. Previously the dma_resv function where doing that for us.
Signed-off-by: Christian König <christian.koenig@amd.com >
Fixes: 9c2ba26535 ("drm/scheduler: use new iterator in drm_sched_job_add_implicit_dependencies v2")
Link: https://patchwork.freedesktop.org/patch/msgid/20211019112706.27769-1-christian.koenig@amd.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Reported-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com >
References: https://lore.kernel.org/dri-devel/2023306.UmlnhvANQh@archbook/
Tested-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com >
Tested-by: Yassine Oudjana <y.oudjana@protonmail.com >
2021-11-16 10:00:58 +01:00
Maxime Ripard
467dd91e2f
Merge drm/drm-fixes into drm-misc-fixes
...
We need -rc1 to address a breakage in drm/scheduler affecting panfrost.
Signed-off-by: Maxime Ripard <maxime@cerno.tech >
2021-11-16 08:51:39 +01:00
Yongqiang Niu
01365f549c
drm/mediatek: Add support for Mediatek SoC MT8192
...
Add support for Mediatek SoC MT8192
Signed-off-by: Yongqiang Niu <yongqiang.niu@mediatek.com >
Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org >
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org >
2021-11-16 07:29:48 +08:00
Yongqiang Niu
f4cca88efd
drm/mediatek: Add component RDMA4
...
This patch add component RDMA4
Signed-off-by: Yongqiang Niu <yongqiang.niu@mediatek.com >
Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org >
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org >
2021-11-16 07:25:31 +08:00
Yongqiang Niu
8c9f215a31
drm/mediatek: Add component POSTMASK
...
This patch add component POSTMASK.
Signed-off-by: Yongqiang Niu <yongqiang.niu@mediatek.com >
Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org >
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org >
2021-11-16 07:23:08 +08:00
Yongqiang Niu
787a7a871c
drm/mediatek: Add component OVL_2L2
...
This patch add component OVL_2L2
Signed-off-by: Yongqiang Niu <yongqiang.niu@mediatek.com >
Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org >
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org >
2021-11-16 07:20:03 +08:00
Matt Roper
fac73543ff
drm/i915: Don't read query SSEU for non-existent slice 0 on old platforms
...
Pre-HSW platforms don't use the gt SSEU structures; this means that
calling intel_sseu_get_subslices() on slice 0 for these platforms will
trip a GEM_BUG_ON(slice >= sseu->max_slices) warning.
Let's move the DSS lookup for a DG2 workaround into a helper function
that will only get called after we've already decided that we're on a
DG2 platform.
Fixes: 645cc0b9d9 ("drm/i915/dg2: Add initial gt/ctx/engine workarounds")
Signed-off-by: Matt Roper <matthew.d.roper@intel.com >
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20211112160107.1593906-1-matthew.d.roper@intel.com
2021-11-15 10:51:20 -08:00