Re: [PATCH] drm/bridge: Centralize error message when bridge attach fails

2021-04-14 Thread Tomi Valkeinen
On 15/04/2021 04:47, Laurent Pinchart wrote: Being informed of a failure to attach a bridge is useful, and many drivers prints an error message in that case. Move the message to drm_bridge_attach() to avoid code duplication. Suggested-by: Stephen Boyd Signed-off-by: Laurent Pinchart ---

Re: [PATCH v4 2/3] drm/msm: add support to take dpu snapshot

2021-04-14 Thread Rob Clark
On Wed, Apr 14, 2021 at 5:16 PM Dmitry Baryshkov wrote: > > On 15/04/2021 02:11, Abhinav Kumar wrote: > > Add the msm_disp_snapshot module which adds supports to dump dpu > > registers and capture the drm atomic state which can be used in > > case of error conditions. > > > > changes in v4: > >

[PATCH v2 3/3] drm/amdgpu: Remove verify_access shortcut for KFD BOs

2021-04-14 Thread Felix Kuehling
This shortcut is no longer needed with access managed properly by KFD. Signed-off-by: Felix Kuehling Reviewed-by: Philip Yang --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

[PATCH v2 2/3] drm/amdkfd: Allow access for mmapping KFD BOs

2021-04-14 Thread Felix Kuehling
DRM render node file handles are used for CPU mapping of BOs using mmap by the Thunk. It uses the DRM render node of the GPU where the BO was allocated. DRM allows mmap access automatically when it creates a GEM handle for a BO. KFD BOs don't have GEM handles, so KFD needs to manage access

[PATCH v2 1/3] drm/amdkfd: Use drm_priv to pass VM from KFD to amdgpu

2021-04-14 Thread Felix Kuehling
amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu needs the drm_priv to allow mmap to access the BO through the corresponding file descriptor. The VM can also be extracted from drm_priv, so drm_priv can replace the vm parameter in the kfd2kgd interface. Signed-off-by: Felix Kuehling ---

Re: [PATCH v3 01/12] drm/bridge: Fix the stop condition of drm_bridge_chain_pre_enable()

2021-04-14 Thread Laurent Pinchart
Hi Doug, On Wed, Apr 14, 2021 at 06:19:13PM -0700, Doug Anderson wrote: > On Sun, Apr 4, 2021 at 5:50 PM Laurent Pinchart wrote: > > On Fri, Apr 02, 2021 at 03:28:35PM -0700, Douglas Anderson wrote: > > > The drm_bridge_chain_pre_enable() is not the proper opposite of > > >

[PATCH] drm/bridge: Centralize error message when bridge attach fails

2021-04-14 Thread Laurent Pinchart
Being informed of a failure to attach a bridge is useful, and many drivers prints an error message in that case. Move the message to drm_bridge_attach() to avoid code duplication. Suggested-by: Stephen Boyd Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c

Re: [PATCH v3 12/12] drm/panel: panel-simple: Use runtime pm to avoid excessive unprepare / prepare

2021-04-14 Thread Laurent Pinchart
Hi Doug, On Wed, Apr 14, 2021 at 06:22:57PM -0700, Doug Anderson wrote: > On Wed, Apr 14, 2021 at 5:58 PM Laurent Pinchart wrote: > > On Fri, Apr 02, 2021 at 03:28:46PM -0700, Douglas Anderson wrote: > > > Unpreparing and re-preparing a panel can be a really heavy > > > operation. Panels

[PATCH 33/34] drm/amdkfd: Add SVM API support capability bits

2021-04-14 Thread Felix Kuehling
From: Philip Yang SVMAPISupported property added to HSA_CAPABILITY, the value match HSA_CAPABILITY defined in Thunk spec: SVMAPISupported: it will not be supported on older kernels that don't have HMM or on systems with GFXv8 or older GPUs without support for 48-bit virtual addresses.

[PATCH 30/34] drm/amdkfd: refine migration policy with xnack on

2021-04-14 Thread Felix Kuehling
With xnack on, GPU vm fault handler decide the best restore location, then migrate range to the best restore location and update GPU mapping to recover the GPU vm fault. Signed-off-by: Philip Yang Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling ---

[PATCH 32/34] drm/amdkfd: multiple gpu migrate vram to vram

2021-04-14 Thread Felix Kuehling
If prefetch range to gpu with acutal location is another gpu, or GPU retry fault restore pages to migrate the range with acutal location is gpu, then migrate from one gpu to another gpu. Use system memory as bridge because sdma engine may not able to access another gpu vram, use sdma of source

[PATCH 34/34] drm/amdkfd: Add CONFIG_HSA_AMD_SVM

2021-04-14 Thread Felix Kuehling
Control whether to build SVM support into amdgpu with a Kconfig option. This makes it easier to disable it in production kernels if this new feature causes problems in production environments. Use "depends on" instead of "select" for DEVICE_PRIVATE, as is recommended for visible options.

[PATCH 29/34] drm/amdgpu: add svm_bo eviction to enable_signal cb

2021-04-14 Thread Felix Kuehling
From: Alex Sierra Add to amdgpu_amdkfd_fence.enable_signal callback, support for svm_bo fence eviction. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c | 11 --- 1 file changed, 8

[PATCH 31/34] drm/amdkfd: add svm range validate timestamp

2021-04-14 Thread Felix Kuehling
With xnack on, add validate timestamp in order to handle GPU vm fault from multiple GPUs. If GPU retry fault need migrate the range to the best restore location, use range validate timestamp to record system timestamp after range is restored to update GPU page table. Because multiple pages of

[PATCH 25/34] drm/amdkfd: add svm_bo reference for eviction fence

2021-04-14 Thread Felix Kuehling
From: Alex Sierra [why] As part of the SVM functionality, the eviction mechanism used for SVM_BOs is different. This mechanism uses one eviction fence per prange, instead of one fence per kfd_process. [how] A svm_bo reference to amdgpu_amdkfd_fence to allow differentiate between SVM_BO or

[PATCH 26/34] drm/amdgpu: add param bit flag to create SVM BOs

2021-04-14 Thread Felix Kuehling
From: Alex Sierra Add CREATE_SVM_BO define bit for SVM BOs. Another define flag was moved to concentrate these KFD type flags in one include file. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 7

[PATCH 22/34] drm/amdgpu: enable 48-bit IH timestamp counter

2021-04-14 Thread Felix Kuehling
From: Alex Sierra By default this timestamp is 32 bit counter. It gets overflowed in around 10 minutes. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Philip Yang --- drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH 27/34] drm/amdkfd: add svm_bo eviction mechanism support

2021-04-14 Thread Felix Kuehling
svm_bo eviction mechanism is different from regular BOs. Every SVM_BO created contains one eviction fence and one worker item for eviction process. SVM_BOs can be attached to one or more pranges. For SVM_BO eviction mechanism, TTM will start to call enable_signal callback for every SVM_BO until

[PATCH 20/34] drm/amdkfd: HMM migrate vram to ram

2021-04-14 Thread Felix Kuehling
If CPU page fault happens, HMM pgmap_ops callback migrate_to_ram start migrate memory from vram to ram in steps: 1. migrate_vma_pages get vram pages, and notify HMM to invalidate the pages, HMM interval notifier callback evict process queues 2. Allocate system memory pages 3. Use svm copy memory

[PATCH 28/34] drm/amdgpu: svm bo enable_signal call condition

2021-04-14 Thread Felix Kuehling
From: Alex Sierra [why] To support svm bo eviction mechanism. [how] If the BO crated has AMDGPU_AMDKFD_CREATE_SVM_BO flag set, enable_signal callback will be called inside amdgpu_evict_flags. This also causes gutting of the BO by removing all placements, so that TTM won't actually do an

[PATCH 21/34] drm/amdkfd: invalidate tables on page retry fault

2021-04-14 Thread Felix Kuehling
GPU page tables are invalidated by unmapping prange directly at the mmu notifier, when page fault retry is enabled through amdgpu_noretry global parameter. The restore page table is performed at the page fault handler. If xnack is on, we update GPU mappings after migration to avoid unnecessary

[PATCH 02/34] drm/amdkfd: add svm ioctl API

2021-04-14 Thread Felix Kuehling
From: Philip Yang Add svm (shared virtual memory) ioctl data structure and API definition. The svm ioctl API is designed to be extensible in the future. All operations are provided by a single IOCTL to preserve ioctl number space. The arguments structure ends with a variable size array of

[PATCH 10/34] drm/amdkfd: map svm range to GPUs

2021-04-14 Thread Felix Kuehling
Use amdgpu_vm_bo_update_mapping to update GPU page table to map or unmap svm range system memory pages address to GPUs. Signed-off-by: Philip Yang Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 473

[PATCH 12/34] drm/amdgpu: Enable retry faults unconditionally on Aldebaran

2021-04-14 Thread Felix Kuehling
This is needed to allow per-process XNACK mode selection in the SQ when booting with XNACK off by default. Signed-off-by: Felix Kuehling Reviewed-by: Philip Yang Tested-by: Alex Sierra --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 8 ++--

[PATCH 23/34] drm/amdkfd: page table restore through svm API

2021-04-14 Thread Felix Kuehling
Page table restore implementation in SVM API. This is called from the fault handler at amdgpu_vm. To update page tables through the page fault retry IH. Signed-off-by: Alex Sierra Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling ---

[PATCH 24/34] drm/amdkfd: SVM API call to restore page tables

2021-04-14 Thread Felix Kuehling
From: Alex Sierra Use SVM API to restore page tables when retry fault and compute context are enabled. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 20 +++- 1 file changed, 15 insertions(+),

[PATCH 17/34] drm/amdkfd: support xgmi same hive mapping

2021-04-14 Thread Felix Kuehling
From: Philip Yang amdgpu_gmc_get_vm_pte use bo_va->is_xgmi same hive information to set pte flags to update GPU mapping. Add local structure variable bo_va, and update bo_va.is_xgmi, pass it to mapping->bo_va while mapping to GPU. Assuming xgmi pstate is hi after boot. Signed-off-by: Philip

[PATCH 18/34] drm/amdkfd: copy memory through gart table

2021-04-14 Thread Felix Kuehling
From: Philip Yang Use sdma linear copy to migrate data between ram and vram. The sdma linear copy command uses kernel buffer function queue to access system memory through gart table. Use reserved gart table window 0 to map system page address, and vram page address is direct mapping. Use the

[PATCH 16/34] drm/amdkfd: validate vram svm range from TTM

2021-04-14 Thread Felix Kuehling
If svm range perfetch location is not zero, use TTM to alloc amdgpu_bo vram nodes to validate svm range, then map vram nodes to GPUs. Use offset to sub allocate from the same amdgpu_bo to handle overlap vram range while adding new range or unmapping range. svm_bo has ref count to trace the

[PATCH 09/34] drm/amdgpu: export vm update mapping interface

2021-04-14 Thread Felix Kuehling
From: Philip Yang It will be used by kfd to map svm range to GPU, because svm range does not have amdgpu_bo and bo_va, cannot use amdgpu_bo_update interface, use amdgpu vm update interface directly. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling ---

[PATCH 19/34] drm/amdkfd: HMM migrate ram to vram

2021-04-14 Thread Felix Kuehling
Register svm range with same address and size but perferred_location is changed from CPU to GPU or from GPU to CPU, trigger migration the svm range from ram to vram or from vram to ram. If svm range prefetch location is GPU with flags KFD_IOCTL_SVM_FLAG_HOST_ACCESS, validate the svm range on ram

[PATCH 13/34] drm/amdkfd: add xnack enabled flag to kfd_process

2021-04-14 Thread Felix Kuehling
From: Alex Sierra XNACK mode controls the SQ RETRY_DISABLE setting that determines, whether recoverable page faults can be supported on GFXv9 hardware. Only on Aldebaran we can support different processes running with different XNACK modes. On older chips all processes must use the same

[PATCH 15/34] drm/amdkfd: register HMM device private zone

2021-04-14 Thread Felix Kuehling
From: Philip Yang Register vram memory as MEMORY_DEVICE_PRIVATE type resource, to allocate vram backing pages for page migration. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/Kconfig | 2 +

[PATCH 11/34] drm/amdkfd: svm range eviction and restore

2021-04-14 Thread Felix Kuehling
HMM interval notifier callback notify CPU page table will be updated, stop process queues if the updated address belongs to svm range registered in process svms objects tree. Scheduled restore work to update GPU page table using new pages address in the updated svm range. The restore worker

[PATCH 14/34] drm/amdkfd: add ioctl to configure and query xnack retries

2021-04-14 Thread Felix Kuehling
From: Alex Sierra Xnack retries are used for page fault recovery. Some AMD chip families support continuously retry while page table entries are invalid. The driver must handle the page fault interrupt and fill in a valid entry for the GPU to continue. This ioctl allows to enable/disable XNACK

[PATCH 06/34] drm/amdkfd: support larger svm range allocation

2021-04-14 Thread Felix Kuehling
From: Philip Yang For larger range allocation, if hmm_range_fault return -EBUSY, set retry timeout based on 1 second for every 512MB, this is safe timeout value. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c |

[PATCH 08/34] drm/amdkfd: deregister svm range

2021-04-14 Thread Felix Kuehling
From: Philip Yang When application explicitly call unmap or unmap from mmput when application exit, driver will receive MMU_NOTIFY_UNMAP event to remove svm range from process svms object tree and list first, unmap from GPUs (in the following patch). Split the svm ranges to handle partial

[PATCH 04/34] drm/amdkfd: add svm ioctl GET_ATTR op

2021-04-14 Thread Felix Kuehling
From: Philip Yang Get the intersection of attributes over all memory in the given range Signed-off-by: Philip Yang Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 164 +++ 1 file

[PATCH 05/34] drm/amdgpu: add common HMM get pages function

2021-04-14 Thread Felix Kuehling
From: Philip Yang Move the HMM get pages function from amdgpu_ttm and to amdgpu_mn. This common function will be used by new svm APIs. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c | 83

[PATCH 03/34] drm/amdkfd: register svm range

2021-04-14 Thread Felix Kuehling
From: Philip Yang svm range structure stores the range start address, size, attributes, flags, prefetch location and gpu bitmap which indicates which GPU this range maps to. Same virtual address is shared by CPU and GPUs. Process has svm range list which uses both interval tree and list to

[PATCH 07/34] drm/amdkfd: validate svm range system memory

2021-04-14 Thread Felix Kuehling
From: Philip Yang Use HMM to get system memory pages address, which will be used to map to GPUs or migrate to vram. Signed-off-by: Philip Yang Reviewed-by: Felix Kuehling Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_svm.c | 116 ++-

[PATCH 01/34] drm/amdkfd: helper to convert gpu id and idx

2021-04-14 Thread Felix Kuehling
From: Alex Sierra svm range uses gpu bitmap to store which GPU svm range maps to. Application pass driver gpu id to specify GPU, the helper is needed to convert gpu id to gpu bitmap idx. Access through kfd_process_device pointers array from kfd_process. Signed-off-by: Alex Sierra Reviewed-by:

[PATCH 00/34] Add HMM-based SVM memory manager to KFD v5

2021-04-14 Thread Felix Kuehling
Updates since v4: - Rebased on upstream. - Added SPDX license headers and updated copyright on added files - Disabled XNACK on GFXv10 and later GPUs that don't support shader preemption on fault - Updated PTE flags for Aldebaran This series and the corresponding ROCm Thunk and KFDTest changes

Re: [PATCH v3 12/12] drm/panel: panel-simple: Use runtime pm to avoid excessive unprepare / prepare

2021-04-14 Thread Doug Anderson
Hi, On Wed, Apr 14, 2021 at 5:58 PM Laurent Pinchart wrote: > > Hi Doug, > > Thank you for the patch. > > On Fri, Apr 02, 2021 at 03:28:46PM -0700, Douglas Anderson wrote: > > Unpreparing and re-preparing a panel can be a really heavy > > operation. Panels datasheets often specify something on

Re: [PATCH v3 01/12] drm/bridge: Fix the stop condition of drm_bridge_chain_pre_enable()

2021-04-14 Thread Doug Anderson
Hi, On Sun, Apr 4, 2021 at 5:50 PM Laurent Pinchart wrote: > > Hi Doug, > > Thank you for the patch. > > On Fri, Apr 02, 2021 at 03:28:35PM -0700, Douglas Anderson wrote: > > The drm_bridge_chain_pre_enable() is not the proper opposite of > > drm_bridge_chain_post_disable(). It continues along

Re: [PATCH v2 11/14] drm/bridge: ti-sn65dsi86: Power things properly for reading the EDID

2021-04-14 Thread Doug Anderson
Hi, On Tue, Apr 6, 2021 at 9:52 AM Andrzej Hajda wrote: > > Hello again after easter, Sorry, I was out last week and I'm just getting back to this now. > I have looked little bit more at sn65* driver and its application to > have better background. > > I miss only info what panel do you have,

Re: [PATCH v4 2/3] drm/msm: add support to take dpu snapshot

2021-04-14 Thread abhinavk
Hi Dmitry Thanks for the review. On 2021-04-14 17:16, Dmitry Baryshkov wrote: On 15/04/2021 02:11, Abhinav Kumar wrote: Add the msm_disp_snapshot module which adds supports to dump dpu registers and capture the drm atomic state which can be used in case of error conditions. changes in v4:

Re: [PATCH v3 12/12] drm/panel: panel-simple: Use runtime pm to avoid excessive unprepare / prepare

2021-04-14 Thread Laurent Pinchart
Hi Doug, Thank you for the patch. On Fri, Apr 02, 2021 at 03:28:46PM -0700, Douglas Anderson wrote: > Unpreparing and re-preparing a panel can be a really heavy > operation. Panels datasheets often specify something on the order of > 500ms as the delay you should insert after turning off the

Re: [PATCH v2 11/14] drm/bridge: ti-sn65dsi86: Power things properly for reading the EDID

2021-04-14 Thread Laurent Pinchart
Hi Andrzej, On Tue, Apr 06, 2021 at 06:52:07PM +0200, Andrzej Hajda wrote: > Hello again after easter, > > I have looked little bit more at sn65* driver and its application to > have better background. > > I miss only info what panel do you have, how it is enabled/power controlled. > > W dniu

Re: [PATCH v4 2/3] drm/msm: add support to take dpu snapshot

2021-04-14 Thread Dmitry Baryshkov
On 15/04/2021 02:11, Abhinav Kumar wrote: Add the msm_disp_snapshot module which adds supports to dump dpu registers and capture the drm atomic state which can be used in case of error conditions. changes in v4: - rename dpu_dbg to msm_disp_snapshot and move it to msm/disp - start using a

Re: [PATCH] drm/virtio: Create Dumb BOs as guest Blobs (v3)

2021-04-14 Thread Gurchetan Singh
On Mon, Apr 12, 2021 at 10:36 PM Vivek Kasireddy wrote: > If support for Blob resources is available, then dumb BOs created > by the driver can be considered as guest Blobs. > > v2: Don't skip transfer and flush commands as part of plane update > as the device may have created a shared mapping.

[PATCH v4 3/3] drm/msm: add disp snapshot points across dpu driver

2021-04-14 Thread Abhinav Kumar
Add snapshot points across dpu driver to trigger dumps when critical errors are hit. changes in v4: - change the callers to use the new snapshot macro Signed-off-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 18 +++---

[PATCH v4 2/3] drm/msm: add support to take dpu snapshot

2021-04-14 Thread Abhinav Kumar
Add the msm_disp_snapshot module which adds supports to dump dpu registers and capture the drm atomic state which can be used in case of error conditions. changes in v4: - rename dpu_dbg to msm_disp_snapshot and move it to msm/disp - start using a list of blocks to store the hardware block

[PATCH v4 1/3] drm: allow drm_atomic_print_state() to accept any drm_printer

2021-04-14 Thread Abhinav Kumar
Currently drm_atomic_print_state() internally allocates and uses a drm_info printer. Allow it to accept any drm_printer type so that the API can be leveraged even for taking drm snapshot. Rename the drm_atomic_print_state() to drm_atomic_print_new_state() so that it reflects its functionality

[PATCH v4 0/3] Add devcoredump support for DPU

2021-04-14 Thread Abhinav Kumar
This series adds support to use devcoredump for DPU driver. It introduces the msm_disp_snapshot module which assists in the capturing of register dumps during error scenarios. When a display related error happens, the msm_disp_snapshot module captures all the relevant register dumps along with

Re: [PATCH v2 2/3] drm/msm/dp: initialize audio_comp when audio starts

2021-04-14 Thread Stephen Boyd
Quoting Kuogee Hsieh (2021-04-14 14:02:50) > Initialize audio_comp when audio starts and wait for audio_comp at > dp_display_disable(). This will take care of both dongle unplugged > and display off (suspend) cases. > > Changes in v2: > -- add dp_display_start_audio() > > Signed-off-by: Kuogee

Re: [PATCH v2 1/3] drm/msm/dp: check sink_count before update is_connected status

2021-04-14 Thread Stephen Boyd
Quoting Kuogee Hsieh (2021-04-14 14:02:34) > Link status is different from display connected status in the case > of something like an Apple dongle where the type-c plug can be > connected, and therefore the link is connected, but no sink is > connected until an HDMI cable is plugged into the

Re: [PATCH v2 3/3] drm/msm/dp: check main link status before start aux read

2021-04-14 Thread Stephen Boyd
Quoting Kuogee Hsieh (2021-04-13 16:11:44) > Make sure main link is in connection state before start aux > read/write operation to avoid unnecessary long delay due to > main link had been unplugged. > > Signed-off-by: Kuogee Hsieh > --- > drivers/gpu/drm/msm/dp/dp_aux.c | 5 + >

[PATCH v2 2/3] drm/msm/dp: initialize audio_comp when audio starts

2021-04-14 Thread Kuogee Hsieh
Initialize audio_comp when audio starts and wait for audio_comp at dp_display_disable(). This will take care of both dongle unplugged and display off (suspend) cases. Changes in v2: -- add dp_display_start_audio() Signed-off-by: Kuogee Hsieh --- drivers/gpu/drm/msm/dp/dp_audio.c | 1 +

[PATCH v2 1/3] drm/msm/dp: check sink_count before update is_connected status

2021-04-14 Thread Kuogee Hsieh
Link status is different from display connected status in the case of something like an Apple dongle where the type-c plug can be connected, and therefore the link is connected, but no sink is connected until an HDMI cable is plugged into the dongle. The sink_count of DPCD of dongle will increase

[v1 2/3] dt-bindings: drm/bridge: ti-sn65dsi86: Document use-aux-backlight

2021-04-14 Thread Rajeev Nandan
If the panel connected to the bridge supports backlight control using DPCD registers on the DisplayPort aux channel, setting "use-aux-backlight" property in the bridge node will enable the registration of a DP aux backlight device from the bridge driver. Signed-off-by: Rajeev Nandan ---

[v1 0/3] drm: Add support for backlight control of eDP panel on ti-sn65dsi86 bridge

2021-04-14 Thread Rajeev Nandan
The backlight level of an eDP panel can be controlled through the AUX channel using DPCD registers of the panel. The capability for the Source device to adjust backlight characteristics within the panel, using the Sink device DPCD registers is indicated by the TCON_BACKLIGHT_ADJUSTMENT_CAPABLE

[v1 3/3] drm/bridge: ti-sn65dsi86: Add DisplayPort aux backlight support

2021-04-14 Thread Rajeev Nandan
Add support to control the backlight of the eDP panel connected to the ti-sn65dsi86 bridge through aux channel. Signed-off-by: Rajeev Nandan --- drivers/gpu/drm/bridge/Kconfig| 1 + drivers/gpu/drm/bridge/ti-sn65dsi86.c | 26 ++ 2 files changed, 27 insertions(+)

[v1 1/3] drm/dp: Add DisplayPort aux backlight control support

2021-04-14 Thread Rajeev Nandan
Add panel backlight control using DPCD registers on the DisplayPort aux channel. Signed-off-by: Rajeev Nandan --- drivers/gpu/drm/Kconfig| 8 ++ drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/drm_dp_aux_backlight.c | 191 +

Re: [Intel-gfx] [RFC PATCH v2] drm/doc/rfc: i915 DG1 uAPI

2021-04-14 Thread Jason Ekstrand
+mesa-dev and some Intel mesa people. On Wed, Apr 14, 2021 at 5:23 AM Daniel Vetter wrote: > > On Tue, Apr 13, 2021 at 12:47:06PM +0100, Matthew Auld wrote: > > Add an entry for the new uAPI needed for DG1. > > > > v2(Daniel): > > - include the overall upstreaming plan > > - add a note for

Re: [PATCH 03/30] drm/tegra: Don't register DP AUX channels before connectors

2021-04-14 Thread Lyude Paul
On Wed, 2021-04-14 at 18:49 +0200, Thierry Reding wrote: > On Fri, Feb 19, 2021 at 04:52:59PM -0500, Lyude Paul wrote: > > As pointed out by the documentation for drm_dp_aux_register(), > > drm_dp_aux_init() should be used in situations where the AUX channel for a > > display driver can

Re: [PATCH v2 00/18] Make vfio_mdev type safe

2021-04-14 Thread Alex Williamson
On Tue, 6 Apr 2021 16:40:23 -0300 Jason Gunthorpe wrote: > vfio_mdev has a number of different objects: mdev_parent, mdev_type and > mdev_device. > > Unfortunately the types of these have been erased in various places > throughout the API, and this makes it very hard to understand this code or

[PATCH 38/57] staging: fbtft: fb_ili9320: Remove unused variable 'ret'

2021-04-14 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/staging/fbtft/fb_ili9320.c: In function ‘read_devicecode’: drivers/staging/fbtft/fb_ili9320.c:25:6: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Cc: Greg Kroah-Hartman Cc: dri-devel@lists.freedesktop.org Cc:

[PATCH 00/57] Rid W=1 warnings from Staging

2021-04-14 Thread Lee Jones
This set is part of a larger effort attempting to clean-up W=1 kernel builds, which are currently overwhelmingly riddled with niggly little warnings. Lee Jones (57): staging: r8192U_core: Remove two unused variables 'ret' and 'reset_status' staging: android: ashmem: Supply description for

Re: [PATCH v2 2/3] drm/msm/dp: do not re initialize of audio_comp at display_disable()

2021-04-14 Thread khsieh
On 2021-04-13 20:17, Stephen Boyd wrote: Quoting Kuogee Hsieh (2021-04-13 16:11:30) At dongle unplug, dp initializes audio_comp followed by sending disconnect event notification to audio and to make sure audio had shutdown completely by wait for audio completion notification at

Re: [PATCH v3 2/3] drm: bridge: add it66121 driver

2021-04-14 Thread Paul Cercueil
Hi Neil, Le mer. 14 avril 2021 à 8:17, Neil Armstrong a écrit : Hi, Le 13/04/2021 à 22:56, Paul Cercueil a écrit : Hi Neil, I get build failures locally: drivers/gpu/drm/bridge/ite-it66121.c: In function ‘it66121_hw_reset’: drivers/gpu/drm/bridge/ite-it66121.c:242:2: error: implicit

Re: [PATCH 03/30] drm/tegra: Don't register DP AUX channels before connectors

2021-04-14 Thread Thierry Reding
On Fri, Feb 19, 2021 at 04:52:59PM -0500, Lyude Paul wrote: > As pointed out by the documentation for drm_dp_aux_register(), > drm_dp_aux_init() should be used in situations where the AUX channel for a > display driver can potentially be registered before it's respective DRM > driver. This is the

Re: [Intel-gfx] [PATCH 11/19] drm/i915: Update the helper to set correct mapping

2021-04-14 Thread Matthew Auld
On Wed, 14 Apr 2021 at 16:22, Tvrtko Ursulin wrote: > > > On 12/04/2021 10:05, Matthew Auld wrote: > > From: Venkata Sandeep Dhanalakota > > > > Determine the possible coherent map type based on object location, > > and if target has llc or if user requires an always coherent > > mapping. > > >

Re: [PATCH 2/4] drm/amdkfd: Use drm_priv to pass VM from KFD to amdgpu

2021-04-14 Thread Felix Kuehling
Am 2021-04-14 um 11:21 a.m. schrieb philip yang: > > > On 2021-04-07 7:12 p.m., Felix Kuehling wrote: >> amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu needs the drm_priv to allow mmap >> to access the BO through the corresponding file descriptor. >> >> Signed-off-by: Felix Kuehling >> --- >>

Re: [PATCH 3/4] drm/amdkfd: Allow access for mmapping KFD BOs

2021-04-14 Thread Felix Kuehling
Am 2021-04-14 um 11:37 a.m. schrieb philip yang: > > > On 2021-04-07 7:12 p.m., Felix Kuehling wrote: >> DRM allows access automatically when it creates a GEM handle for a BO. >> KFD BOs don't have GEM handles, so KFD needs to manage access manually. > > After reading drm vma manager, I understand

Re: [PATCH 4/4] drm/amdgpu: Remove verify_access shortcut for KFD BOs

2021-04-14 Thread philip yang
On 2021-04-07 7:12 p.m., Felix Kuehling wrote: This shortcut is no longer needed with access managed progerly by KFD. Reviewed-by: Philip Yang Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 7 --- 1

Re: [PATCH 3/4] drm/amdkfd: Allow access for mmapping KFD BOs

2021-04-14 Thread philip yang
On 2021-04-07 7:12 p.m., Felix Kuehling wrote: DRM allows access automatically when it creates a GEM handle for a BO. KFD BOs don't have GEM handles, so KFD needs to manage access manually. After reading drm vma manager, I understand it uses rbtree

Re: [Intel-gfx] [PATCH 19/19] drm/i915/gtt/dgfx: place the PD in LMEM

2021-04-14 Thread Tvrtko Ursulin
On 12/04/2021 10:05, Matthew Auld wrote: It's a requirement that for dgfx we place all the paging structures in device local-memory. Signed-off-by: Matthew Auld --- drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 5 - drivers/gpu/drm/i915/gt/intel_gtt.c | 27 +--

Re: [PATCH v3 2/3] drm: bridge: add it66121 driver

2021-04-14 Thread Neil Armstrong
On 14/04/2021 10:16, Laurent Pinchart wrote: > Hi Neil, > > On Wed, Apr 14, 2021 at 10:08:46AM +0200, Neil Armstrong wrote: >> On 14/04/2021 10:06, Robert Foss wrote: >>> On Wed, 14 Apr 2021 at 08:13, Neil Armstrong >>> wrote: Le 13/04/2021 à 22:21, Robert Foss a écrit : > Hey Neil &

[Bug 209345] [nouveau] unknown chipset (0f22d0a1) (nVidia Tesla K80)

2021-04-14 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=209345 --- Comment #15 from Alexander von Gluck (kallis...@unixzen.com) --- Applied my patch above to ArchLinux (5.11.13-arch1-1) and gave it a whirl. Got a little information from nouveou before the system hard locks up. nouveau :0d:00.0:

Re: [Intel-gfx] [PATCH 12/19] drm/i915/lmem: Bypass aperture when lmem is available

2021-04-14 Thread Tvrtko Ursulin
On 12/04/2021 10:05, Matthew Auld wrote: From: Anusha Srivatsa In the scenario where local memory is available, we have rely on CPU access via lmem directly instead of aperture. v2: gmch is only relevant for much older hw, therefore we can drop the has_aperture check since it should always

Re: [Intel-gfx] [PATCH 11/19] drm/i915: Update the helper to set correct mapping

2021-04-14 Thread Tvrtko Ursulin
On 12/04/2021 10:05, Matthew Auld wrote: From: Venkata Sandeep Dhanalakota Determine the possible coherent map type based on object location, and if target has llc or if user requires an always coherent mapping. Cc: Matthew Auld Cc: CQ Tang Suggested-by: Michal Wajdeczko Signed-off-by:

Re: [PATCH 2/4] drm/amdkfd: Use drm_priv to pass VM from KFD to amdgpu

2021-04-14 Thread philip yang
On 2021-04-07 7:12 p.m., Felix Kuehling wrote: amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu needs the drm_priv to allow mmap to access the BO through the corresponding file descriptor. Signed-off-by: Felix Kuehling ---

Re: [Intel-gfx] [PATCH 08/19] drm/i915: Return error value when bo not in LMEM for discrete

2021-04-14 Thread Tvrtko Ursulin
On 12/04/2021 10:05, Matthew Auld wrote: From: Mohammed Khajapasha Return EREMOTE value when frame buffer object is not backed by LMEM for discrete. If Local memory is supported by hardware the framebuffer backing gem objects should be from local memory. Signed-off-by: Mohammed Khajapasha

Re: [PATCH 1/4] drm/amdkfd: Remove legacy code not acquiring VMs

2021-04-14 Thread philip yang
On 2021-04-07 7:12 p.m., Felix Kuehling wrote: ROCm user mode has acquired VMs from DRM file descriptors for as long as it supported the upstream KFD. Legacy code to support older versions of ROCm is not needed any more. Reviewed-by: Philip Yang

Re: [PATCH 9/9] drm/amdgpu: Lock the attached dmabuf in unpopulate

2021-04-14 Thread Felix Kuehling
Am 2021-04-14 um 3:33 a.m. schrieb Christian König: > Am 14.04.21 um 08:46 schrieb Felix Kuehling: >> amdgpu_ttm_tt_unpopulate can be called during bo_destroy. The >> dmabuf->resv >> must not be held by the caller or dma_buf_detach will deadlock. This is >> probably not the right fix. I get a

[PATCH resend 9/9] drm/i915: Add privacy-screen support

2021-04-14 Thread Hans de Goede
Add support for eDP panels with a built-in privacy screen using the new drm_privacy_screen class. One thing which stands out here is the addition of these 2 lines to intel_atomic_commit_tail: for_each_new_connector_in_state(>base, connector, ...

[PATCH resend 8/9] platform/x86: thinkpad_acpi: Register a privacy-screen device

2021-04-14 Thread Hans de Goede
Register a privacy-screen device on laptops with a privacy-screen, this exports the PrivacyGuard features to user-space using a standardized vendor-agnostic sysfs interface. Note the sysfs interface is read-only. Registering a privacy-screen device with the new privacy-screen class code will also

[PATCH resend 7/9] platform/x86: thinkpad_acpi: Get privacy-screen / lcdshadow ACPI handles only once

2021-04-14 Thread Hans de Goede
Get the privacy-screen / lcdshadow ACPI handles once and cache them, instead of retrieving them every time we need them. Signed-off-by: Hans de Goede --- drivers/platform/x86/thinkpad_acpi.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git

[PATCH resend 5/9] drm/connector: Add a drm_connector privacy-screen helper functions

2021-04-14 Thread Hans de Goede
Add 2 drm_connector privacy-screen helper functions: 1. drm_connector_attach_privacy_screen_provider(), this function creates and attaches the standard privacy-screen properties and registers a generic notifier for generating sysfs-connector-status-events on external changes to the privacy-screen

[PATCH resend 6/9] platform/x86: thinkpad_acpi: Add hotkey_notify_extended_hotkey() helper

2021-04-14 Thread Hans de Goede
Factor the extended hotkey handling out of hotkey_notify_hotkey() and into a new hotkey_notify_extended_hotkey() helper. This is a preparation patch for adding support the privacy-screen hotkey toggle (which needs some special handling, it should NOT send an evdev key-event to userspace...).

[PATCH resend 4/9] drm/privacy-screen: Add notifier support

2021-04-14 Thread Hans de Goede
Add support for privacy-screen consumers to register a notifier to be notified of external (e.g. done by the hw itself on a hotkey press) state changes. Signed-off-by: Hans de Goede --- drivers/gpu/drm/drm_privacy_screen.c | 67 +++

[PATCH resend 3/9] drm/privacy-screen: Add X86 specific arch init code

2021-04-14 Thread Hans de Goede
Add X86 specific arch init code, which fills the privacy-screen lookup table by checking for various vendor specific ACPI interfaces for controlling the privacy-screen. This initial version only checks for the Lenovo Thinkpad specific ACPI methods for privacy-screen control. Signed-off-by: Hans

[PATCH resend 1/9] drm/connector: Add support for privacy-screen properties (v4)

2021-04-14 Thread Hans de Goede
From: Rajat Jain Add support for generic electronic privacy screen properties, that can be added by systems that have an integrated EPS. Changes in v2 (Hans de Goede) - Create 2 properties, "privacy-screen sw-state" and "privacy-screen hw-state", to deal with devices where the OS might be

[PATCH resend 2/9] drm: Add privacy-screen class

2021-04-14 Thread Hans de Goede
On some new laptops the LCD panel has a builtin electronic privacy-screen. We want to export this functionality as a property on the drm connector object. But often this functionality is not exposed on the GPU but on some other (ACPI) device. This commit adds a privacy-screen class allowing the

[PATCH resend 0/9] drm: Add privacy-screen class and connector properties

2021-04-14 Thread Hans de Goede
Hi All, Here is the privacy-screen related code which I last posted in August of last year. To the best of my knowledge there is consensus about / everyone is in agreement with the new userspace API (2 connector properties) this patch-set add (patch 1 of the series). The blocker the last time

[Bug 209345] [nouveau] unknown chipset (0f22d0a1) (nVidia Tesla K80)

2021-04-14 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=209345 --- Comment #14 from Ilia Mirkin (imir...@alum.mit.edu) --- Also, wow, BAR1 = 16GB?? Normally it's like 256MB. No wonder your TB setup had issues. -- You may reply to this email to add a comment. You are receiving this mail because: You are

Re: [Intel-gfx] [PATCH 06/19] drm/i915/stolen: pass the allocation flags

2021-04-14 Thread Tvrtko Ursulin
On 12/04/2021 10:05, Matthew Auld wrote: From: CQ Tang Stolen memory is always allocated as physically contiguous pages, mark the object flags as such. Signed-off-by: CQ Tang Signed-off-by: Matthew Auld --- drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 10 ++ 1 file changed, 6

Re: [Intel-gfx] [PATCH 05/19] drm/i915/stolen: enforce the min_page_size contract

2021-04-14 Thread Tvrtko Ursulin
On 12/04/2021 10:05, Matthew Auld wrote: From: CQ Tang Since stolen can now be device local-memory underneath, we should try to enforce any min_page_size restrictions when allocating pages. Signed-off-by: CQ Tang Signed-off-by: Matthew Auld --- drivers/gpu/drm/i915/gem/i915_gem_stolen.c

Re: [Intel-gfx] [PATCH 04/19] drm/i915/stolen: treat stolen local as normal local memory

2021-04-14 Thread Tvrtko Ursulin
On 12/04/2021 10:05, Matthew Auld wrote: Underneath it's the same stuff, so things like the PTE_LM bits for the GTT should just keep working as-is. Signed-off-by: Matthew Auld --- drivers/gpu/drm/i915/gem/i915_gem_lmem.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff

  1   2   >