Re: [PATCH v2 2/5] drm/msm/dp: Modify prototype of encoder based API

2021-08-26 Thread Stephen Boyd
Quoting Bjorn Andersson (2021-08-25 16:42:30) > Functions in the DisplayPort code that relates to individual instances > (encoders) are passed both the struct msm_dp and the struct drm_encoder. But > in a situation where multiple DP instances would exist this means that > the caller need to resolve

Re: [PATCH v2 3/5] drm/msm/dp: Support up to 3 DP controllers

2021-08-26 Thread Stephen Boyd
Quoting Bjorn Andersson (2021-08-25 16:42:31) > Based on the removal of the g_dp_display and the movement of the > priv->dp lookup into the DP code it's now possible to have multiple > DP instances. > > In line with the other controllers in the MSM driver, introduce a > per-compatible list of base

Re: [PATCH v2 5/5] drm/msm/dp: Add sc8180x DP controllers

2021-08-26 Thread Stephen Boyd
Quoting Bjorn Andersson (2021-08-25 16:42:33) > The sc8180x has 2 DP and 1 eDP controllers, add support for these to the > DP driver. > > Signed-off-by: Bjorn Andersson > --- Reviewed-by: Stephen Boyd

[PATCH] drm/i915/gem: Fix the mman selftest

2021-08-26 Thread Thomas Hellström
Using the I915_MMAP_TYPE_FIXED mmap type requires the TTM backend, so for that mmap type, use __i915_gem_object_create_user() instead of i915_gem_object_create_internal(), as we really want to tests objects mmap-able by user-space. This also means that the out-of-space error happens at object crea

Re: [GIT PULL] drm-misc + drm-intel: Add support for out-of-band hotplug notification

2021-08-26 Thread Maxime Ripard
On Wed, Aug 25, 2021 at 04:03:43PM +, Vivi, Rodrigo wrote: > On Tue, 2021-08-24 at 18:48 +0200, Hans de Goede wrote: > > Hi, > > > > On 8/24/21 10:45 AM, Jani Nikula wrote: > > > On Fri, 20 Aug 2021, Hans de Goede wrote: > > > > Hello drm-misc and drm-intel maintainers, > > > > > > > > My "A

Re: [PATCH v2] drm/panfrost: Use upper/lower_32_bits helpers

2021-08-26 Thread Steven Price
On 25/08/2021 16:33, Alyssa Rosenzweig wrote: > Use upper_32_bits/lower_32_bits helpers instead of open-coding them. > This is easier to scan quickly compared to bitwise manipulation, and it > is pleasingly symmetric. I noticed this when debugging lock_region, > which had a particularly "creative"

Re: [PATCH 1/5] drm/vmwgfx: unbind in vmw_ttm_unpopulate

2021-08-26 Thread Daniel Vetter
On Mon, Aug 23, 2021 at 01:15:20PM +0200, Thomas Hellström wrote: > On Mon, 2021-08-23 at 13:05 +0200, Christian König wrote: > > Adding Thomas on CC as well. > > > > Just a gentle ping. I think the patch set makes sense now. > > > > Regards, > > Christian. > > > > Am 28.07.21 um 15:05 schrieb C

Re: [PATCH 21/33] drm/i915/guc: Connect reset modparam updates to GuC policy flags

2021-08-26 Thread Jani Nikula
On Mon, 26 Jul 2021, Matthew Brost wrote: > From: John Harrison > > Changing the reset module parameter has no effect on a running GuC. > The corresponding entry in the ADS must be updated and then the GuC > informed via a Host2GuC message. > > The new debugfs interface to module parameters allow

Re: [PATCH 1/2] dma-buf: nuke DMA_FENCE_TRACE macros v2

2021-08-26 Thread Daniel Vetter
On Tue, Aug 24, 2021 at 10:12:24AM +0200, Christian König wrote: > Just a gentle ping. Daniel any more comments on this? Still haven't seen a patch set to nuke the sw_sync igt tests. Otherwise this is just going to cause fails and reboots in our ci (we reboot on taints). > I'm not sure if the sec

Re: [PATCH v3 2/8] drm/bridge: Document the probe issue with MIPI-DSI bridges

2021-08-26 Thread Maxime Ripard
Hi Andrzej, On Mon, Aug 23, 2021 at 06:32:11PM +0200, Andrzej Hajda wrote: > Hi Maxime, > > On 23.08.2021 10:47, Maxime Ripard wrote: > > > Interactions between bridges, panels, MIPI-DSI host and the component > > framework are not trivial and can lead to probing issues when > > implementing a d

Re: [PATCH v2] Revert "drm/scheduler: Avoid accessing freed bad job."

2021-08-26 Thread Daniel Vetter
On Fri, Aug 20, 2021 at 09:20:42AM +0200, Christian König wrote: > No, that perfectly works for me. > > The problem we used to have with this approach was that we potentially have > multiple timeouts at the same time. > > But when we serialize the timeout handling by using a single workqueue as >

[PULL] drm-intel-next-fixes

2021-08-26 Thread Jani Nikula
Hi Dave & Daniel - Some pretty straightforward fixes for the merge window. drm-intel-next-fixes-2021-08-26: drm/i915 fixes for v5.15-rc1: - Disable underrun recovery with eDP MSO panels on ADL-P - Use designated initializers for init/exit table - Fix some error pointer usages BR, Jani. The fo

Re: [PATCH v2] Revert "drm/scheduler: Avoid accessing freed bad job."

2021-08-26 Thread Daniel Vetter
On Thu, Aug 19, 2021 at 11:25:09AM -0400, Andrey Grodzovsky wrote: > > On 2021-08-19 5:30 a.m., Daniel Vetter wrote: > > On Wed, Aug 18, 2021 at 10:51:00AM -0400, Andrey Grodzovsky wrote: > > > On 2021-08-18 10:42 a.m., Daniel Vetter wrote: > > > > On Wed, Aug 18, 2021 at 10:36:32AM -0400, Andrey

[PATCH] MAINTAINERS: Add dri-devel for component.[hc]

2021-08-26 Thread Daniel Vetter
dri-devel is the main user, and somehow there's been the assumption that component stuff is unmaintained. References: https://lore.kernel.org/dri-devel/CAAEAJfDWOzCJxZFNtxeT7Cvr2pWbYrfz-YnA81sVNs-rM=8...@mail.gmail.com/ Cc: Ezequiel Garcia Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Signed-

Re: [PATCH v5, 00/15] Using component framework to support multi hardware decode

2021-08-26 Thread Daniel Vetter
On Sun, Aug 22, 2021 at 02:57:15PM -0300, Ezequiel Garcia wrote: > On Sun, 22 Aug 2021 at 13:50, Daniel Vetter wrote: > > > > On Wed, Aug 18, 2021 at 4:12 PM Ezequiel Garcia > > wrote: > > > > > > +danvet > > > > > > Hi, > > > > > > On Tue, 10 Aug 2021 at 23:58, Yunfei Dong > > > wrote: > > > >

Re: [PATCH 2/2] drm/i915/debugfs: hook up ttm_resource_manager_debug

2021-08-26 Thread Daniel Vetter
On Thu, Aug 19, 2021 at 09:32:20AM +0200, Thomas Hellström wrote: > On Wed, 2021-08-18 at 15:58 +0100, Matthew Auld wrote: > > This should give a more complete view of the various bits of internal > > resource manager state, for device local-memory. > > > > Signed-off-by: Matthew Auld > > Cc: Tho

Re: [PATCH v2 5/5] drm: omap: remove obsolete selection of OMAP2_DSS in config DRM_OMAP

2021-08-26 Thread Daniel Vetter
On Thu, Aug 19, 2021 at 01:22:53PM +0200, Lukas Bulwahn wrote: > Commit 55b68fb856b5 ("drm/omap: squash omapdrm sub-modules into one") > removes the config OMAP2_DSS in ./drivers/gpu/drm/omapdrm/dss/Kconfig, > while moving the other configs into./drivers/gpu/drm/omapdrm/Kconfig, but > misses to rem

Re: [PATCH 1/2] drm/probe-helper: Create a HPD IRQ event helper for a single connector

2021-08-26 Thread Daniel Vetter
On Thu, Aug 19, 2021 at 03:44:53PM +0200, Maxime Ripard wrote: > The drm_helper_hpd_irq_event() function is iterating over all the > connectors when an hotplug event is detected. > > During that iteration, it will call each connector detect function and > figure out if its status changed. > > Fin

Re: [PATCH] drm: remove zxdrm driver

2021-08-26 Thread Daniel Vetter
On Mon, Aug 23, 2021 at 01:51:30PM -0500, Rob Herring wrote: > On Sat, 21 Aug 2021 11:13:57 +0800, Zenghui Yu wrote: > > The zte zx platform had been removed in commit 89d4f98ae90d ("ARM: remove > > zte zx platform"), so this driver is no longer needed. > > > > Cc: Arnd Bergmann > > Cc: Jun Nie

Re: [Intel-gfx] [PATCH 08/27] drm/i915/selftests: Add a cancel request selftest that triggers a reset

2021-08-26 Thread Tvrtko Ursulin
On 26/08/2021 04:23, Matthew Brost wrote: Add a cancel request selftest that results in an engine reset to cancel the request as it is non-preemptable. Also insert a NOP request after the cancelled request and confirm that it completely successfully. Which patch fixes a problem this exposes i

[PATCH] drm/msm: Improve drm/sched point of no return rules

2021-08-26 Thread Daniel Vetter
Originally drm_sched_job_init was the point of no return, after which drivers really should submit a job. I've split that up, which allows us to fix this issue pretty easily. Only thing we have to take care of is to not skip to error paths after that. Other drivers do this the same for out-fence a

Re: [PATCH 2/2] drm/i915/debugfs: hook up ttm_resource_manager_debug

2021-08-26 Thread Thomas Hellström
On Thu, 2021-08-26 at 11:16 +0200, Daniel Vetter wrote: > On Thu, Aug 19, 2021 at 09:32:20AM +0200, Thomas Hellström wrote: > > On Wed, 2021-08-18 at 15:58 +0100, Matthew Auld wrote: > > > This should give a more complete view of the various bits of > > > internal > > > resource manager state, for

Re: [PATCH v8 1/7] drm: fix null ptr dereference in drm_master_release

2021-08-26 Thread Daniel Vetter
On Thu, Aug 26, 2021 at 10:01:16AM +0800, Desmond Cheong Zhi Xi wrote: > drm_master_release can be called on a drm_file without a master, which > results in a null ptr dereference of file_priv->master->magic_map. The > three cases are: > > 1. Error path in drm_open_helper > drm_open(): > drm

Re: [PATCH v8 2/7] drm: convert drm_device.master_mutex into a rwsem

2021-08-26 Thread Daniel Vetter
On Thu, Aug 26, 2021 at 10:01:17AM +0800, Desmond Cheong Zhi Xi wrote: > drm_device.master_mutex currently protects the following: > - drm_device.master > - drm_file.master > - drm_file.was_master > - drm_file.is_master > - drm_master.unique > - drm_master.unique_len > - drm_master.magic_map > > T

Re: [PATCH v8 3/7] drm: lock drm_global_mutex earlier in the ioctl handler

2021-08-26 Thread Daniel Vetter
On Thu, Aug 26, 2021 at 10:01:18AM +0800, Desmond Cheong Zhi Xi wrote: > In a future patch, a read lock on drm_device.master_rwsem is > held in the ioctl handler before the check for ioctl > permissions. However, this inverts the lock hierarchy of > drm_global_mutex --> master_rwsem. > > To avoid

Re: [PATCH 2/2] drm/i915/debugfs: hook up ttm_resource_manager_debug

2021-08-26 Thread Thomas Hellström
On Thu, 2021-08-26 at 11:51 +0200, Thomas Hellström wrote: > On Thu, 2021-08-26 at 11:16 +0200, Daniel Vetter wrote: > > On Thu, Aug 19, 2021 at 09:32:20AM +0200, Thomas Hellström wrote: > > > On Wed, 2021-08-18 at 15:58 +0100, Matthew Auld wrote: > > > > This should give a more complete view of th

Re: [PATCH 2/2] drm/i915/debugfs: hook up ttm_resource_manager_debug

2021-08-26 Thread Daniel Vetter
On Thu, Aug 26, 2021 at 11:51:44AM +0200, Thomas Hellström wrote: > On Thu, 2021-08-26 at 11:16 +0200, Daniel Vetter wrote: > > On Thu, Aug 19, 2021 at 09:32:20AM +0200, Thomas Hellström wrote: > > > On Wed, 2021-08-18 at 15:58 +0100, Matthew Auld wrote: > > > > This should give a more complete vie

Re: [PATCH] drm/sched: fix the bug of time out calculation(v3)

2021-08-26 Thread Christian König
Am 26.08.21 um 06:55 schrieb Monk Liu: issue: in cleanup_job the cancle_delayed_work will cancel a TO timer even the its corresponding job is still running. Yeah, that makes a lot more sense. fix: do not cancel the timer in cleanup_job, instead do the cancelling only when the heading job is

Re: [PATCH 1/5] drm/vmwgfx: unbind in vmw_ttm_unpopulate

2021-08-26 Thread Christian König
Am 26.08.21 um 10:49 schrieb Daniel Vetter: On Mon, Aug 23, 2021 at 01:15:20PM +0200, Thomas Hellström wrote: On Mon, 2021-08-23 at 13:05 +0200, Christian König wrote: Adding Thomas on CC as well. Just a gentle ping. I think the patch set makes sense now. Regards, Christian. Am 28.07.21 u

Re: [PATCH 2/2] drm/i915/debugfs: hook up ttm_resource_manager_debug

2021-08-26 Thread Daniel Vetter
On Thu, Aug 26, 2021 at 12:03:29PM +0200, Daniel Vetter wrote: > On Thu, Aug 26, 2021 at 11:51:44AM +0200, Thomas Hellström wrote: > > On Thu, 2021-08-26 at 11:16 +0200, Daniel Vetter wrote: > > > On Thu, Aug 19, 2021 at 09:32:20AM +0200, Thomas Hellström wrote: > > > > On Wed, 2021-08-18 at 15:58

[PATCH v2] drm/i915/gt: Register the migrate contexts with their engines

2021-08-26 Thread Thomas Hellström
Pinned contexts, like the migrate contexts need reset after resume since their context image may have been lost. Also the GuC needs to register pinned contexts. Add a list to struct intel_engine_cs where we add all pinned contexts on creation, and traverse that list at resume time to reset the pin

[PATCH] drm/i915: Be more gentle when exiting non-persistent contexts

2021-08-26 Thread Tvrtko Ursulin
From: Tvrtko Ursulin When a non-persistent context exits we currently mark it as banned in order to trigger fast termination of any outstanding GPU jobs it may have left running. In doing so we apply a very strict 1ms limit in which the left over job has to preempt before we issues an engine res

Re: [PATCH] MAINTAINERS: Add dri-devel for component.[hc]

2021-08-26 Thread Greg Kroah-Hartman
On Thu, Aug 26, 2021 at 11:13:43AM +0200, Daniel Vetter wrote: > dri-devel is the main user, and somehow there's been the assumption > that component stuff is unmaintained. > > References: > https://lore.kernel.org/dri-devel/CAAEAJfDWOzCJxZFNtxeT7Cvr2pWbYrfz-YnA81sVNs-rM=8...@mail.gmail.com/ > Cc

Re: [Intel-gfx] [PATCH 2/4] drm/dp: use more of the extended receiver cap

2021-08-26 Thread Jani Nikula
On Wed, 25 Aug 2021, Jani Nikula wrote: > On Thu, 19 Aug 2021, Ville Syrjälä wrote: >> On Fri, Aug 13, 2021 at 01:43:20PM +0300, Jani Nikula wrote: >>> Extend the use of extended receiver cap at 0x2200 to cover >>> MAIN_LINK_CHANNEL_CODING_CAP in 0x2206, in case an implementation hides >>> the DP

Re: [Intel-gfx] [PATCH 24/33] drm/i915/guc: Implement banned contexts for GuC submission

2021-08-26 Thread Tvrtko Ursulin
On 26/08/2021 04:49, Matthew Brost wrote: On Wed, Aug 25, 2021 at 11:39:10AM +0100, Tvrtko Ursulin wrote: On 27/07/2021 01:23, Matthew Brost wrote: When using GuC submission, if a context gets banned disable scheduling and mark all inflight requests as complete. Cc: John Harrison Signed-of

Re: [GIT PULL] drm-misc + drm-intel: Add support for out-of-band hotplug notification

2021-08-26 Thread Vivi, Rodrigo
On Thu, 2021-08-26 at 10:23 +0200, Maxime Ripard wrote: > On Wed, Aug 25, 2021 at 04:03:43PM +, Vivi, Rodrigo wrote: > > On Tue, 2021-08-24 at 18:48 +0200, Hans de Goede wrote: > > > Hi, > > > > > > On 8/24/21 10:45 AM, Jani Nikula wrote: > > > > On Fri, 20 Aug 2021, Hans de Goede wrote: > >

Re: [PATCH v8 1/7] drm: fix null ptr dereference in drm_master_release

2021-08-26 Thread Desmond Cheong Zhi Xi
On 26/8/21 5:53 pm, Daniel Vetter wrote: On Thu, Aug 26, 2021 at 10:01:16AM +0800, Desmond Cheong Zhi Xi wrote: drm_master_release can be called on a drm_file without a master, which results in a null ptr dereference of file_priv->master->magic_map. The three cases are: 1. Error path in drm_ope

Re: [PATCH 8/8] drm/etnaviv: add missing MMU context put when reaping MMU mapping

2021-08-26 Thread Christian Gmeiner
Am Fr., 20. Aug. 2021 um 22:18 Uhr schrieb Lucas Stach : > > When we forcefully evict a mapping from the the address space and thus the > MMU context, the MMU context is leaked, as the mapping no longer points to > it, so it doesn't get freed when the GEM object is destroyed. Add the > mssing conte

Re: [PATCH 2/3] drm/etnaviv: fix dma configuration of the virtual device

2021-08-26 Thread Michael Walle
Am 2021-08-26 14:14, schrieb Russell King (Oracle): On Thu, Aug 26, 2021 at 02:10:05PM +0200, Michael Walle wrote: + pdev->dev.coherent_dma_mask = DMA_BIT_MASK(40); + pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask; Please use dma_coerce_mask_and_coherent() here instead. It wil

[PATCH 1/3] drm/etnaviv: use PLATFORM_DEVID_NONE

2021-08-26 Thread Michael Walle
There is already a macro for the magic value. Use it. Signed-off-by: Michael Walle --- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/etnaviv/etnaviv_drv.c b/drivers/gpu/drm/etnaviv/etnaviv_drv.c index 7dcc6392792d..2509

[PATCH 0/3] drm/etnaviv: IOMMU related fixes

2021-08-26 Thread Michael Walle
This patch series fixes usage of the etnaviv driver with GPUs behind a IOMMU. It was tested on a NXP LS1028A SoC. Together with Lucas' MMU patches [1] there are not more (GPU internal) MMU nor (system) IOMMU faults on the LS1028A. [1] https://lists.freedesktop.org/archives/etnaviv/2021-August/0036

[PATCH 2/3] drm/etnaviv: fix dma configuration of the virtual device

2021-08-26 Thread Michael Walle
The DMA configuration of the virtual device is inherited from the first actual etnaviv device. Unfortunately, this doesn't work with an IOMMU: [5.191008] Failed to set up IOMMU for device (null); retaining platform DMA ops This is because there is no associated iommu_group with the device. T

[PATCH 3/3] drm/etnaviv: use a 32 bit mask as coherent DMA mask

2021-08-26 Thread Michael Walle
The STLB and the first command buffer (which is used to set up the TLBs) has a 32 bit size restriction in hardware. There seems to be no way to specify addresses larger than 32 bit. Keep it simple and restict the addresses to the lower 4 GiB range for all coherent DMA memory allocations. Signed-of

Re: [PATCH 3/3] drm/etnaviv: use a 32 bit mask as coherent DMA mask

2021-08-26 Thread Michael Walle
Am 2021-08-26 14:19, schrieb Russell King (Oracle): On Thu, Aug 26, 2021 at 02:10:06PM +0200, Michael Walle wrote: - pdev->dev.coherent_dma_mask = DMA_BIT_MASK(40); - pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask; + /* +* PTA and MTLB can have 40 bit base addresses,

Re: [PATCH 2/3] drm/etnaviv: fix dma configuration of the virtual device

2021-08-26 Thread Russell King (Oracle)
On Thu, Aug 26, 2021 at 02:10:05PM +0200, Michael Walle wrote: > + pdev->dev.coherent_dma_mask = DMA_BIT_MASK(40); > + pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask; Please use dma_coerce_mask_and_coherent() here instead. -- RMK's Patch system: https://www.armlinux.org.uk/developer/p

Re: [PATCH 3/3] drm/etnaviv: use a 32 bit mask as coherent DMA mask

2021-08-26 Thread Russell King (Oracle)
On Thu, Aug 26, 2021 at 02:10:06PM +0200, Michael Walle wrote: > - pdev->dev.coherent_dma_mask = DMA_BIT_MASK(40); > - pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask; > + /* > + * PTA and MTLB can have 40 bit base addresses, but > + * unfortunately, an entry in the MTLB can

RE: [PATCH] drm/sched: fix the bug of time out calculation(v3)

2021-08-26 Thread Liu, Monk
[AMD Official Use Only] >>I'm not sure if the work_tdr is initialized when a maximum timeout is >>specified. Please double check. Ok, will do >>BTW: Can we please drop the "tdr" naming from the scheduler? That is just a >>timeout functionality and not related to recovery in any way. We even do

Re: [PATCH] drm/sched: fix the bug of time out calculation(v3)

2021-08-26 Thread Christian König
Am 26.08.21 um 13:55 schrieb Liu, Monk: [AMD Official Use Only] I'm not sure if the work_tdr is initialized when a maximum timeout is specified. Please double check. Ok, will do BTW: Can we please drop the "tdr" naming from the scheduler? That is just a timeout functionality and not relate

Re: [PATCH 3/3] drm/etnaviv: use a 32 bit mask as coherent DMA mask

2021-08-26 Thread Michael Walle
Am 2021-08-26 14:10, schrieb Michael Walle: The STLB and the first command buffer (which is used to set up the TLBs) has a 32 bit size restriction in hardware. There seems to be no way to specify addresses larger than 32 bit. Keep it simple and restict the addresses to the lower 4 GiB range for

Re: [Intel-gfx] [PATCH v2] drm/i915/gt: Register the migrate contexts with their engines

2021-08-26 Thread Daniel Vetter
On Thu, Aug 26, 2021 at 12:45:14PM +0200, Thomas Hellström wrote: > Pinned contexts, like the migrate contexts need reset after resume > since their context image may have been lost. Also the GuC needs to > register pinned contexts. > > Add a list to struct intel_engine_cs where we add all pinned

Re: [PATCH] drm/sched: fix the bug of time out calculation(v3)

2021-08-26 Thread Daniel Vetter
On Thu, Aug 26, 2021 at 02:37:40PM +0200, Christian König wrote: > Am 26.08.21 um 13:55 schrieb Liu, Monk: > > [AMD Official Use Only] > > > > > > I'm not sure if the work_tdr is initialized when a maximum timeout is > > > > specified. Please double check. > > Ok, will do > > > > > > BTW: Can we

Re: [PATCH 1/5] drm/vmwgfx: unbind in vmw_ttm_unpopulate

2021-08-26 Thread Daniel Vetter
On Thu, Aug 26, 2021 at 12:11:04PM +0200, Christian König wrote: > > > Am 26.08.21 um 10:49 schrieb Daniel Vetter: > > On Mon, Aug 23, 2021 at 01:15:20PM +0200, Thomas Hellström wrote: > > > On Mon, 2021-08-23 at 13:05 +0200, Christian König wrote: > > > > Adding Thomas on CC as well. > > > > >

Re: [Intel-gfx] [PATCH v8 1/7] drm: fix null ptr dereference in drm_master_release

2021-08-26 Thread Daniel Vetter
On Thu, Aug 26, 2021 at 07:53:58PM +0800, Desmond Cheong Zhi Xi wrote: > On 26/8/21 5:53 pm, Daniel Vetter wrote: > > On Thu, Aug 26, 2021 at 10:01:16AM +0800, Desmond Cheong Zhi Xi wrote: > > > drm_master_release can be called on a drm_file without a master, which > > > results in a null ptr deref

Re: [PATCH v8 4/7] drm: avoid races with modesetting rights

2021-08-26 Thread Daniel Vetter
On Thu, Aug 26, 2021 at 10:01:19AM +0800, Desmond Cheong Zhi Xi wrote: > In drm_client_modeset.c and drm_fb_helper.c, > drm_master_internal_{acquire,release} are used to avoid races with DRM > userspace. These functions hold onto drm_device.master_rwsem while > committing, and bail if there's alrea

Re: [PATCH 1/3] drm/etnaviv: use PLATFORM_DEVID_NONE

2021-08-26 Thread Christian Gmeiner
Am Do., 26. Aug. 2021 um 14:10 Uhr schrieb Michael Walle : > > There is already a macro for the magic value. Use it. > > Signed-off-by: Michael Walle Reviewed-by: Christian Gmeiner I will wait for v2 for the rest of the changes to review. > --- > drivers/gpu/drm/etnaviv/etnaviv_drv.c | 2 +- >

Re: [PATCH v2] drm/i915/gt: Register the migrate contexts with their engines

2021-08-26 Thread Tvrtko Ursulin
On 26/08/2021 11:45, Thomas Hellström wrote: Pinned contexts, like the migrate contexts need reset after resume since their context image may have been lost. Also the GuC needs to register pinned contexts. So kernel context can get corrupt because we park the GPU with it active. Blitter cont

Re: [PATCH v8 5/7] drm: avoid circular locks in drm_mode_object_find

2021-08-26 Thread Daniel Vetter
On Thu, Aug 26, 2021 at 10:01:20AM +0800, Desmond Cheong Zhi Xi wrote: > __drm_mode_object_find checks if the given drm file holds the required > lease on a object by calling _drm_lease_held. _drm_lease_held in turn > uses drm_file_get_master to access drm_file.master. > > However, in a future pat

Re: [PATCH v8 7/7] drm: remove drm_file.master_lookup_lock

2021-08-26 Thread Daniel Vetter
On Thu, Aug 26, 2021 at 10:01:22AM +0800, Desmond Cheong Zhi Xi wrote: > Previously, master_lookup_lock was introduced in > commit 0b0860a3cf5e ("drm: serialize drm_file.master with a new > spinlock") to serialize accesses to drm_file.master. This then allowed > us to write drm_file_get_master in c

Re: [v3 2/2] dt-bindngs: display: panel: Add BOE tv110c9m-ll3 panel bindings

2021-08-26 Thread Rob Herring
On Thu, 26 Aug 2021 19:03:11 +0800, yangcong wrote: > Add documentation for boe tv110c9m-ll3 panel. > > Signed-off-by: yangcong > --- > .../display/panel/boe,tv110c9m-ll3.yaml | 81 +++ > 1 file changed, 81 insertions(+) > create mode 100644 > Documentation/devicetree/bin

Re: [PATCH 1/2] mm/vmscan: add sync_shrinkers function v2

2021-08-26 Thread Daniel Vetter
On Fri, Aug 20, 2021 at 02:05:27PM +0200, Christian König wrote: > From: Christian König > > While unplugging a device the TTM shrinker implementation > needs a barrier to make sure that all concurrent shrink > operations are done and no other CPU is referring to a > device specific pool any more

Re: [PATCH 1/2] mm/vmscan: add sync_shrinkers function v2

2021-08-26 Thread Daniel Vetter
On Thu, Aug 26, 2021 at 03:27:30PM +0200, Daniel Vetter wrote: > On Fri, Aug 20, 2021 at 02:05:27PM +0200, Christian König wrote: > > From: Christian König > > > > While unplugging a device the TTM shrinker implementation > > needs a barrier to make sure that all concurrent shrink > > operations

Re: [PATCH v2] drm/i915/gt: Register the migrate contexts with their engines

2021-08-26 Thread Thomas Hellström
On Thu, 2021-08-26 at 14:04 +0100, Tvrtko Ursulin wrote: > > On 26/08/2021 11:45, Thomas Hellström wrote: > > Pinned contexts, like the migrate contexts need reset after resume > > since their context image may have been lost. Also the GuC needs to > > register pinned contexts. > > So kernel cont

Re: [PATCH] drm/i915: Be more gentle when exiting non-persistent contexts

2021-08-26 Thread Daniel Vetter
On Thu, Aug 26, 2021 at 11:52:14AM +0100, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin > > When a non-persistent context exits we currently mark it as banned in > order to trigger fast termination of any outstanding GPU jobs it may have > left running. > > In doing so we apply a very strict 1ms

Re: [PATCH 3/4] drm/amdgpu: drm/amdgpu: Handle IOMMU enabled case

2021-08-26 Thread Andrey Grodzovsky
Ping Andrey On 2021-08-25 11:36 a.m., Andrey Grodzovsky wrote: On 2021-08-25 2:43 a.m., Christian König wrote: Am 24.08.21 um 23:01 schrieb Andrey Grodzovsky: Handle all DMA IOMMU group related dependencies before the group is removed and we try to access it after free. Signed-off-by: And

Re: [Intel-gfx] [PATCH v2] drm/i915/gt: Register the migrate contexts with their engines

2021-08-26 Thread Thomas Hellström
On Thu, 2021-08-26 at 14:44 +0200, Daniel Vetter wrote: > On Thu, Aug 26, 2021 at 12:45:14PM +0200, Thomas Hellström wrote: > > Pinned contexts, like the migrate contexts need reset after resume > > since their context image may have been lost. Also the GuC needs to > > register pinned contexts. >

Re: [PATCH] drm/sched: fix the bug of time out calculation(v3)

2021-08-26 Thread Andrey Grodzovsky
On 2021-08-26 12:55 a.m., Monk Liu wrote: issue: in cleanup_job the cancle_delayed_work will cancel a TO timer even the its corresponding job is still running. fix: do not cancel the timer in cleanup_job, instead do the cancelling only when the heading job is signaled, and if there is a "next"

Re: [Intel-gfx] [PATCH 08/27] drm/i915/selftests: Add a cancel request selftest that triggers a reset

2021-08-26 Thread Matthew Brost
On Thu, Aug 26, 2021 at 10:32:54AM +0100, Tvrtko Ursulin wrote: > > On 26/08/2021 04:23, Matthew Brost wrote: > > Add a cancel request selftest that results in an engine reset to cancel > > the request as it is non-preemptable. Also insert a NOP request after > > the cancelled request and confirm

Re: [Intel-gfx] [PATCH 24/33] drm/i915/guc: Implement banned contexts for GuC submission

2021-08-26 Thread Matthew Brost
On Thu, Aug 26, 2021 at 12:27:31PM +0100, Tvrtko Ursulin wrote: > > On 26/08/2021 04:49, Matthew Brost wrote: > > On Wed, Aug 25, 2021 at 11:39:10AM +0100, Tvrtko Ursulin wrote: > > > > > > On 27/07/2021 01:23, Matthew Brost wrote: > > > > When using GuC submission, if a context gets banned disab

Re: [PATCH 3/4] drm/amdgpu: drm/amdgpu: Handle IOMMU enabled case

2021-08-26 Thread Christian König
Am 26.08.21 um 15:43 schrieb Andrey Grodzovsky: Ping Andrey On 2021-08-25 11:36 a.m., Andrey Grodzovsky wrote: On 2021-08-25 2:43 a.m., Christian König wrote: Am 24.08.21 um 23:01 schrieb Andrey Grodzovsky: Handle all DMA IOMMU group related dependencies before the group is removed and we

Re: [PATCH 1/2] mm/vmscan: add sync_shrinkers function v2

2021-08-26 Thread Christian König
Am 26.08.21 um 15:28 schrieb Daniel Vetter: On Thu, Aug 26, 2021 at 03:27:30PM +0200, Daniel Vetter wrote: On Fri, Aug 20, 2021 at 02:05:27PM +0200, Christian König wrote: From: Christian König While unplugging a device the TTM shrinker implementation needs a barrier to make sure that all con

Re: [Intel-gfx] [PATCH v2] drm/i915/gt: Register the migrate contexts with their engines

2021-08-26 Thread Daniel Vetter
On Thu, Aug 26, 2021 at 03:59:30PM +0200, Thomas Hellström wrote: > On Thu, 2021-08-26 at 14:44 +0200, Daniel Vetter wrote: > > On Thu, Aug 26, 2021 at 12:45:14PM +0200, Thomas Hellström wrote: > > > Pinned contexts, like the migrate contexts need reset after resume > > > since their context image

Re: [PATCH 2/3] drm/etnaviv: fix dma configuration of the virtual device

2021-08-26 Thread Robin Murphy
On 2021-08-26 13:10, Michael Walle wrote: The DMA configuration of the virtual device is inherited from the first actual etnaviv device. Unfortunately, this doesn't work with an IOMMU: [5.191008] Failed to set up IOMMU for device (null); retaining platform DMA ops This is because there is

Re: [PATCH 2/3] drm/etnaviv: fix dma configuration of the virtual device

2021-08-26 Thread Lucas Stach
Am Donnerstag, dem 26.08.2021 um 16:00 +0100 schrieb Robin Murphy: > On 2021-08-26 13:10, Michael Walle wrote: > > The DMA configuration of the virtual device is inherited from the first > > actual etnaviv device. Unfortunately, this doesn't work with an IOMMU: > > > > [5.191008] Failed to set

Re: [PATCH 1/2] mm/vmscan: add sync_shrinkers function v2

2021-08-26 Thread Daniel Vetter
On Thu, Aug 26, 2021 at 04:58:06PM +0200, Christian König wrote: > Am 26.08.21 um 15:28 schrieb Daniel Vetter: > > On Thu, Aug 26, 2021 at 03:27:30PM +0200, Daniel Vetter wrote: > > > On Fri, Aug 20, 2021 at 02:05:27PM +0200, Christian König wrote: > > > > From: Christian König > > > > > > > > Wh

Re: [PATCH] drm/msm: Improve drm/sched point of no return rules

2021-08-26 Thread Rob Clark
On Thu, Aug 26, 2021 at 2:33 AM Daniel Vetter wrote: > > Originally drm_sched_job_init was the point of no return, after which > drivers really should submit a job. I've split that up, which allows > us to fix this issue pretty easily. > > Only thing we have to take care of is to not skip to error

Re: [PATCH v5 12/20] drm/msm: Use scheduler dependency handling

2021-08-26 Thread Rob Clark
On Thu, Aug 5, 2021 at 3:47 AM Daniel Vetter wrote: > > drm_sched_job_init is already at the right place, so this boils down > to deleting code. > > Signed-off-by: Daniel Vetter > Cc: Rob Clark > Cc: Sean Paul > Cc: Sumit Semwal > Cc: "Christian König" > Cc: linux-arm-...@vger.kernel.org > Cc

Re: [PATCH v5 16/20] drm/msm: Don't break exclusive fence ordering

2021-08-26 Thread Rob Clark
On Thu, Aug 5, 2021 at 3:47 AM Daniel Vetter wrote: > > There's only one exclusive slot, and we must not break the ordering. > > Adding a new exclusive fence drops all previous fences from the > dma_resv. To avoid violating the signalling order we err on the side of > over-synchronizing by waiting

Re: [Intel-gfx] [PATCH 16/27] drm/i915: Allocate error capture in nowait context

2021-08-26 Thread Daniel Vetter
On Wed, Aug 25, 2021 at 08:23:16PM -0700, Matthew Brost wrote: > Error captures can now be done in a work queue processing G2H messages. > These messages need to be completely done being processed in the reset > path, to avoid races in the missing G2H cleanup, which create a > dependency on memory

Re: [Intel-gfx] [PATCH 16/27] drm/i915: Allocate error capture in nowait context

2021-08-26 Thread Matthew Brost
On Wed, Aug 25, 2021 at 08:23:16PM -0700, Matthew Brost wrote: > Error captures can now be done in a work queue processing G2H messages. > These messages need to be completely done being processed in the reset > path, to avoid races in the missing G2H cleanup, which create a > dependency on memory

Re: [PATCH v2 3/5] drm/msm/dp: Support up to 3 DP controllers

2021-08-26 Thread Bjorn Andersson
On Thu 26 Aug 00:13 PDT 2021, Stephen Boyd wrote: > Quoting Bjorn Andersson (2021-08-25 16:42:31) > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c > > b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c [..] > > @@ -203,8 +204,8 @@ static int dpu_kms_debugfs_init(struct msm_kms *kms, > > st

Re: [v2 0/2] Add driver for BOE tv110c9m-ll3 panel

2021-08-26 Thread Doug Anderson
Hi, On Mon, Aug 23, 2021 at 6:41 PM yangcong wrote: > > Hi Sam, > This driver support boe tv1110c9m-ll3 and inx hj110iz-01a panel.The IC chip > is used NT36523, which is a new IC. > > 1: panel-boe-tv101wum-nl6.c driver cannot meet the timing requirements of the > current two panel. > > 2: The

Re: [v3 1/2] drm/panel: support for BOE tv1110c9m-ll3 wuxga dsi video mode panel

2021-08-26 Thread Doug Anderson
Hi, On Thu, Aug 26, 2021 at 4:03 AM yangcong wrote: > > Add driver for BOE tv110c9m-ll3 panel is a 10.95" 1200x2000 panel. > > Signed-off-by: yangcong > --- > drivers/gpu/drm/panel/Kconfig | 10 + > drivers/gpu/drm/panel/Makefile |1 + > drivers/gpu/drm/panel/pane

[PATCH v2 0/4] Various fixes to pass libdrm hotunplug tests

2021-08-26 Thread Andrey Grodzovsky
Bunch of fixes to enable passing hotplug tests i previosly added here[1] with latest code. Once accepted I will enable the tests on libdrm side. [1] - https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/172 v2: Dropping VCE patch since relevant function already fixed in latest code. Moving

[PATCH v2 1/4] drm/ttm: Create pinned list

2021-08-26 Thread Andrey Grodzovsky
This list will be used to capture all non VRAM BOs not on LRU so when device is hot unplugged we can iterate the list and unmap DMA mappings before device is removed. v2: Reanme function to ttm_bo_move_to_pinned Keep deleting BOs from LRU in the new function if they have no resource struct assign

[PATCH v2 3/4] drm/amdgpu: drm/amdgpu: Handle IOMMU enabled case

2021-08-26 Thread Andrey Grodzovsky
Handle all DMA IOMMU group related dependencies before the group is removed and we try to access it after free. v2: Move the actul handling function to TTM Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drive

Re: [PATCH v3] drm/i915/dp: Use max params for panels < eDP 1.4

2021-08-26 Thread Rodrigo Vivi
On Fri, Aug 20, 2021 at 08:26:14PM +0300, Ville Syrjälä wrote: > On Fri, Aug 20, 2021 at 03:52:59PM +0800, Kai-Heng Feng wrote: > > Users reported that after commit 2bbd6dba84d4 ("drm/i915: Try to use > > fast+narrow link on eDP again and fall back to the old max strategy on > > failure"), the scre

[PATCH v2 4/4] drm/amdgpu: Add a UAPI flag for hot plug/unplug

2021-08-26 Thread Andrey Grodzovsky
To support libdrm tests. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index 6400259a7c4b..c2fdf67ff551 100644 -

[PULL] drm-intel-fixes

2021-08-26 Thread Rodrigo Vivi
Hi Dave and Daniel, I also had other 2 display patches, but I decided to keep them out for now because CI_DIF_604 returned a bunch of link training errors on TGL when compared to CI_DIF_603 which is based on drm/drm-fixes. Those patches are: d7f213c131ad ("drm/i915/dp: Use max params for panels <

[PATCH v2 2/4] drm/ttm: Clear all DMA mappings on demand

2021-08-26 Thread Andrey Grodzovsky
Used by drivers supporting hot unplug to handle all DMA IOMMU group related dependencies before the group is removed during device removal and we try to access it after free when last device pointer from user space is dropped. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/ttm/ttm_device.c

Re: [PATCH v2 3/5] drm/msm/dp: Support up to 3 DP controllers

2021-08-26 Thread Stephen Boyd
Quoting Bjorn Andersson (2021-08-26 09:57:18) > On Thu 26 Aug 00:13 PDT 2021, Stephen Boyd wrote: > > Quoting Bjorn Andersson (2021-08-25 16:42:31) > > > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c > > > b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c > [..] > > > @@ -203,8 +204,8 @@ st

Re: [PATCH v2] drm/bridge: parade-ps8640: Reorg the macros

2021-08-26 Thread Doug Anderson
Hi, On Tue, Aug 24, 2021 at 6:12 PM Philip Chen wrote: > > Reorg the macros as follows: > (1) Group the registers on the same page together. > (2) Group the register and its bit operation together while indenting > the macros of the bit operation with one space. > > Also fix a misnomer for the nu

Re: drm: simpledrm: fbdev emulation error with CONFIG_DRM_SIMPLEDRM enabled

2021-08-26 Thread Thomas Zimmermann
Hi Amanoel Am 25.08.21 um 21:12 schrieb Amanoel Dawod: No problem, managed to boot directly into a text terminal and grabbed DRM related dmesg log. Hopefully it's what you're looking for :) Find it attached please. Thanks, this was helpful. The failure is shown at [3.263394] [drm:0xfff

RE: [PATCH linux-next] : add put_device() after of_find_device_by_node()

2021-08-26 Thread Chrisanthus, Anitha
Hi Jing, > -Original Message- > From: Chrisanthus, Anitha > Sent: Monday, August 23, 2021 4:25 PM > To: jing yangyang > Cc: Dea, Edmund J ; David Airlie ; > Daniel Vetter ; dri-devel@lists.freedesktop.org; linux- > ker...@vger.kernel.org; jing yangyang ; Zeal > Robot > Subject: RE: [PATC

Re: [BUG - BISECTED] display not detected anymore

2021-08-26 Thread Heiko Carstens
Hi Ville, > > > ef79d62b5ce5 ("drm/i915: Encapsulate dbuf state handling harder") > > > > > > With that commit the display is not detected anymore, one commit > > > before that it still works. So this one seems to be broken. > > > > > > Ville, Stanislav, any idea how to fix this? > > > > > > co

Re: [PATCH] MAINTAINERS: Add dri-devel for component.[hc]

2021-08-26 Thread Daniel Vetter
On Thu, Aug 26, 2021 at 12:56:26PM +0200, Greg Kroah-Hartman wrote: > On Thu, Aug 26, 2021 at 11:13:43AM +0200, Daniel Vetter wrote: > > dri-devel is the main user, and somehow there's been the assumption > > that component stuff is unmaintained. > > > > References: > > https://lore.kernel.org/dr

Re: [Intel-gfx] [PATCH 2/4] drm/dp: use more of the extended receiver cap

2021-08-26 Thread Lyude Paul
On Thu, 2021-08-26 at 14:11 +0300, Jani Nikula wrote: > On Wed, 25 Aug 2021, Jani Nikula wrote: > > On Thu, 19 Aug 2021, Ville Syrjälä wrote: > > > On Fri, Aug 13, 2021 at 01:43:20PM +0300, Jani Nikula wrote: > > > > Extend the use of extended receiver cap at 0x2200 to cover > > > > MAIN_LINK_CHA

Re: [PATCH v2] drm/amd/pm: And destination bounds checking to struct copy

2021-08-26 Thread Alex Deucher
On Wed, Aug 25, 2021 at 12:20 PM Kees Cook wrote: > > In preparation for FORTIFY_SOURCE performing compile-time and run-time > field bounds checking for memcpy(), memmove(), and memset(), avoid > intentionally writing across neighboring fields. > > The "Board Parameters" members of the structs: >

Re: [PATCH] drm/sched: fix the bug of time out calculation(v3)

2021-08-26 Thread Andrey Grodzovsky
Attached quick patch for per job TTL calculation to make more precises next timer expiration. It's on top of the patch in this thread. Let me know if this makes sense. Andrey On 2021-08-26 10:03 a.m., Andrey Grodzovsky wrote: On 2021-08-26 12:55 a.m., Monk Liu wrote: issue: in cleanup_job t

Re: [PATCH 2/3] drm/etnaviv: fix dma configuration of the virtual device

2021-08-26 Thread Robin Murphy
On 2021-08-26 16:17, Lucas Stach wrote: Am Donnerstag, dem 26.08.2021 um 16:00 +0100 schrieb Robin Murphy: On 2021-08-26 13:10, Michael Walle wrote: The DMA configuration of the virtual device is inherited from the first actual etnaviv device. Unfortunately, this doesn't work with an IOMMU: [

Re: [PATCH linux-next] drm:dcn31: fix boolreturn.cocci warnings

2021-08-26 Thread Alex Deucher
Applied. Thanks! Alex On Tue, Aug 24, 2021 at 1:52 AM CGEL wrote: > > From: Jing Yangyang > > ./drivers/gpu/drm/amd/display/dc/dcn31/dcn31_panel_cntl.c:112:9-10:WARNING: > return of 0/1 in function 'dcn31_is_panel_backlight_on' > with return type bool > > ./drivers/gpu/drm/amd/display/dc/dcn31

  1   2   >