Re: [PATCH v13 01/12] swiotlb: Refactor swiotlb init functions

2021-06-17 Thread Claire Chang
On Fri, Jun 18, 2021 at 7:30 AM Stefano Stabellini wrote: > > On Thu, 17 Jun 2021, Claire Chang wrote: > > Add a new function, swiotlb_init_io_tlb_mem, for the io_tlb_mem struct > > initialization to make the code reusable. > > > > Signed-off-by: Claire Chang > > Reviewed-by: Christoph Hellwig >

Re: [PATCH v3 1/8] ext4/xfs: add page refcount helper

2021-06-17 Thread Dave Chinner
On Thu, Jun 17, 2021 at 10:16:58AM -0500, Alex Sierra wrote: > From: Ralph Campbell > > There are several places where ZONE_DEVICE struct pages assume a reference > count == 1 means the page is idle and free. Instead of open coding this, > add a helper function to hide this detail. > > v2: > [AS

Re: [PATCH] drm/bridge: ti-sn65dsi83: Fix null pointer dereference in remove callback

2021-06-17 Thread Marek Vasut
On 6/18/21 5:06 AM, Jonathan Liu wrote: Hi Marek, Hi, Hi Jonathan, Thank you for the patch. On Thu, Jun 17, 2021 at 09:19:25PM +1000, Jonathan Liu wrote: If attach has not been called, unloading the driver can result in a null pointer dereference in mipi_dsi_detach as ctx->dsi has not been

[PATCH v2] drm/meson: fix potential NULL pointer exception in meson_drv_unbind()

2021-06-17 Thread Jiajun Cao
Fix a potential NULL pointer exception when meson_drv_unbind() attempts to operate on the driver_data priv which may be NULL. Add a null pointer check on the priv struct to avoid the NULL pointer dereference after calling dev_get_drvdata(), just like the null pointer checks done on the struct priv

Re: [PATCH] drm/bridge: ti-sn65dsi83: Fix null pointer dereference in remove callback

2021-06-17 Thread Jonathan Liu
Hi Marek, On Fri, 18 Jun 2021 at 00:14, Laurent Pinchart wrote: > > Hi Jonathan, > > Thank you for the patch. > > On Thu, Jun 17, 2021 at 09:19:25PM +1000, Jonathan Liu wrote: > > If attach has not been called, unloading the driver can result in a null > > pointer dereference in mipi_dsi_detach a

Re: [PATCH v2 2/2] drm: Protect drm_master pointers in drm_lease.c

2021-06-17 Thread Desmond Cheong Zhi Xi
On 18/6/21 1:12 am, Daniel Vetter wrote: On Tue, Jun 15, 2021 at 10:36:45AM +0800, Desmond Cheong Zhi Xi wrote: This patch ensures that the device's master mutex is acquired before accessing pointers to struct drm_master that are subsequently dereferenced. Without the mutex, the struct drm_maste

Re:Re: [PATCH] drm/auth: Move master pointer from drm_device to drm_file

2021-06-17 Thread 马强
> That sounds like a bug. drm_file->master should be always the same -> either you become a new stand-alone thing, our you get linked to the> current master.> > Or I'm completely missing what you're trying to fix here.Now I have a bug, the soft cursor disappears when switching users.debug it, the f

Re: [PATCH v2 1/2] drm: Add a locked version of drm_is_current_master

2021-06-17 Thread Desmond Cheong Zhi Xi
On 18/6/21 1:03 am, Daniel Vetter wrote: On Tue, Jun 15, 2021 at 10:36:44AM +0800, Desmond Cheong Zhi Xi wrote: While checking the master status of the DRM file in drm_is_current_master(), the device's master mutex should be held. Without the mutex, the pointer fpriv->master may be freed concurr

Re: [PULL] drm-misc-next-fixes

2021-06-17 Thread Dave Airlie
On Fri, 18 Jun 2021 at 12:26, Dave Airlie wrote: > > when I pulled this in drm-next I got these. > > were the mst fixes meant for next or fixes btw? I'm not really sure, > but either way I don't think this is a local reason it doesn't build > or did I miss something? Hi Thomas, Please resend wit

Re: [PULL] drm-misc-next-fixes

2021-06-17 Thread Lyude Paul
22:27 airlied: re: the pull, I should have pushed a fix for the compilation error today. that was something I pulled in from amd that they didn't compile check and I missed :S 22:28 airlied: 24ff3dc18b99c4b912ab1746e803ddb3be5ced4c in drm- misc/drm-misc-next-fixes sorry about this - I already ta

Re: drm/i915: __GFP_RETRY_MAYFAIL allocations in stable kernels

2021-06-17 Thread Sergey Senozhatsky
On (21/06/17 19:27), Daniel Vetter wrote: > > > > So can all allocations in gen8_init_scratch() use > > GFP_KERNEL | __GFP_RETRY_MAYFAIL | __GFP_NOWARN > > Yeah that looks all fairly broken tbh. The only thing I didn't know was > that GFP_DMA32 wasn't a full gfp mask with reclaim bits set as

Re: [PULL] drm-misc-next-fixes

2021-06-17 Thread Dave Airlie
when I pulled this in drm-next I got these. were the mst fixes meant for next or fixes btw? I'm not really sure, but either way I don't think this is a local reason it doesn't build or did I miss something? Dave. /home/airlied/devel/kernel/dim/src/drivers/gpu/drm/drm_dp_mst_topology.c: In functi

[PATCH] drm/amd/display: Remove the repeated dpp1_full_bypass declaration

2021-06-17 Thread Shaokun Zhang
Function 'dpp1_full_bypass' is declared twice, so remove the repeated declaration and unnessary blank line. Cc: Harry Wentland Cc: Leo Li Cc: Alex Deucher Signed-off-by: Shaokun Zhang --- drivers/gpu/drm/amd/display/dc/dcn10/dcn10_dpp.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/dri

[PATCH 4/8] drm/i915: Move active tracking to i915_sched_engine

2021-06-17 Thread Matthew Brost
Move active request tracking and its lock to i915_sched_engine. This lock is also the submission lock so having it in the i915_sched_engine is the correct place. v3: (Jason Ekstrand) Add kernel doc v6: Rebase Signed-off-by: Matthew Brost Reviewed-by: Daniele Ceraolo Spurio --- drivers/gpu

[PATCH 6/8] drm/i915: Add kick_backend function to i915_sched_engine

2021-06-17 Thread Matthew Brost
Not all back-ends require a kick after a scheduling update, so make the kick a call-back function that the back-end can opt-in to. Also move the current kick function from the scheduler to the execlists file as it is specific to that back-end. Signed-off-by: Matthew Brost Reviewed-by: Daniele C

[PATCH 5/8] drm/i915: Move engine->schedule to i915_sched_engine

2021-06-17 Thread Matthew Brost
The schedule function should be in the schedule object. v3: (Jason Ekstrand) Add kernel doc Signed-off-by: Matthew Brost Reviewed-by: Daniele Ceraolo Spurio --- drivers/gpu/drm/i915/gem/i915_gem_wait.c | 4 ++-- drivers/gpu/drm/i915/gt/intel_engine_cs.c| 3 --- drivers/gpu

[PATCH 3/8] drm/i915: Reset sched_engine.no_priolist immediately after dequeue

2021-06-17 Thread Matthew Brost
Rather than touching schedule state in the generic PM code, reset the priolist allocation when empty in the submission code. Add a wrapper function to do this and update the backends to call it in the correct place. v3: (Jason Ekstrand) Update patch commit message with a better description Sig

[PATCH 8/8] drm/i915: Move submission tasklet to i915_sched_engine

2021-06-17 Thread Matthew Brost
The submission tasklet operates on i915_sched_engine, thus it is the correct place for it. v3: (Jason Ekstrand) Change sched_engine->engine to a void* private data pointer Add kernel doc v4: (Daniele) Update private_data comment Set queue_priority_hint in kick_execlists v5: (CI) Rebas

[PATCH 7/8] drm/i915: Update i915_scheduler to operate on i915_sched_engine

2021-06-17 Thread Matthew Brost
Rather passing around an intel_engine_cs in the scheduling code, pass around a i915_sched_engine. v3: (Jason Ekstrand) Add READ_ONCE around rq->engine in lock_sched_engine Signed-off-by: Matthew Brost Reviewed-by: Jason Ekstrand --- .../drm/i915/gt/intel_execlists_submission.c | 11 +++--

[PATCH 1/8] drm/i915: Move priolist to new i915_sched_engine object

2021-06-17 Thread Matthew Brost
Introduce i915_sched_engine object which is lower level data structure that i915_scheduler / generic code can operate on without touching execlist specific structures. This allows additional submission backends to be added without breaking the layering. Currently the execlists backend uses 1 of the

[PATCH 2/8] drm/i915: Add i915_sched_engine_is_empty function

2021-06-17 Thread Matthew Brost
Add wrapper function around RB tree to determine if i915_sched_engine is empty. Signed-off-by: Matthew Brost Reviewed-by: Jason Ekstrand --- drivers/gpu/drm/i915/gt/intel_engine_cs.c| 2 +- drivers/gpu/drm/i915/gt/intel_execlists_submission.c | 6 +++--- drivers/gpu/drm/i915/gt/uc/i

[PATCH 0/8] Introduce i915_sched_engine object

2021-06-17 Thread Matthew Brost
As discussed in [1] we are breaking that large series into a several smaller ones. This series is stand alone patch part of step #4 which has no other dependencies or patches relevant to it. v2: (Daniel Vetter): - Split into several smaller patches - Add kernel doc for i915_sched_engine (Mat

Re: [PATCH v13 09/12] swiotlb: Add restricted DMA alloc/free support

2021-06-17 Thread Stefano Stabellini
On Thu, 17 Jun 2021, Claire Chang wrote: > Add the functions, swiotlb_{alloc,free} and is_swiotlb_for_alloc to > support the memory allocation from restricted DMA pool. > > The restricted DMA pool is preferred if available. > > Note that since coherent allocation needs remapping, one must set up

Re: [PATCH v13 06/12] swiotlb: Use is_swiotlb_force_bounce for swiotlb data bouncing

2021-06-17 Thread Stefano Stabellini
On Thu, 17 Jun 2021, Claire Chang wrote: > Propagate the swiotlb_force into io_tlb_default_mem->force_bounce and > use it to determine whether to bounce the data or not. This will be > useful later to allow for different pools. > > Signed-off-by: Claire Chang > Reviewed-by: Christoph Hellwig > T

Re: [PATCH v13 05/12] swiotlb: Update is_swiotlb_active to add a struct device argument

2021-06-17 Thread Stefano Stabellini
On Thu, 17 Jun 2021, Claire Chang wrote: > Update is_swiotlb_active to add a struct device argument. This will be > useful later to allow for different pools. > > Signed-off-by: Claire Chang > Reviewed-by: Christoph Hellwig > Tested-by: Stefano Stabellini > Tested-by: Will Deacon Acked-by: St

Re: [PATCH v13 04/12] swiotlb: Update is_swiotlb_buffer to add a struct device argument

2021-06-17 Thread Stefano Stabellini
On Thu, 17 Jun 2021, Claire Chang wrote: > Update is_swiotlb_buffer to add a struct device argument. This will be > useful later to allow for different pools. > > Signed-off-by: Claire Chang > Reviewed-by: Christoph Hellwig > Tested-by: Stefano Stabellini > Tested-by: Will Deacon Acked-by: St

Re: [PATCH v13 03/12] swiotlb: Set dev->dma_io_tlb_mem to the swiotlb pool used

2021-06-17 Thread Stefano Stabellini
On Thu, 17 Jun 2021, Claire Chang wrote: > Always have the pointer to the swiotlb pool used in struct device. This > could help simplify the code for other pools. > > Signed-off-by: Claire Chang > Reviewed-by: Christoph Hellwig > Tested-by: Stefano Stabellini > Tested-by: Will Deacon Acked-by

Re: [PATCH v13 01/12] swiotlb: Refactor swiotlb init functions

2021-06-17 Thread Stefano Stabellini
On Thu, 17 Jun 2021, Claire Chang wrote: > Add a new function, swiotlb_init_io_tlb_mem, for the io_tlb_mem struct > initialization to make the code reusable. > > Signed-off-by: Claire Chang > Reviewed-by: Christoph Hellwig > Tested-by: Stefano Stabellini > Tested-by: Will Deacon > --- > kerne

[pull] drm/msm: drm-msm-next-2021-06-17 for v5.14

2021-06-17 Thread Rob Clark
Hi Dave & Daniel, Here is msm-next for v5.14 Notable additions this time around: * devcoredump support for display errors * dpu: irq cleanup/refactor * dpu: dt bindings conversion to yaml * dsi: dt bindings conversion to yaml * mdp5: alpha/blend_mode/zpos support * mdp5: dynamic bandwidth manage

Re: [PATCH] drm/msm/dp: add logs across DP driver for ease of debugging

2021-06-17 Thread Stephen Boyd
Quoting maitreye (2021-06-16 18:08:54) > From: Maitreyee Rao > > Add trace points across the MSM DP driver to help debug > interop issues. > > Signed-off-by: Maitreyee Rao > --- > drivers/gpu/drm/msm/dp/dp_aux.c | 5 +++-- > drivers/gpu/drm/msm/dp/dp_catalog.c | 4 > drivers/gpu/drm/m

[PATCH v2 7/7] drm/msm/dpu: remove struct dpu_encoder_irq and enum dpu_intr_idx

2021-06-17 Thread Dmitry Baryshkov
Drop the wrapping structures and the enum used to index those structures in dpu_kms. Instead of them use IRQ indices and callback functions directly. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 47 +- .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h |

[PATCH v2 4/7] drm/msm/dpu: allow just single IRQ callback

2021-06-17 Thread Dmitry Baryshkov
DPU interrupts code allows multiple callbacks per interrut. In reality none of the interrupts is shared between blocks (and will probably never be). Drop support for registering multiple callbacks per interrupt to simplify interrupt handling code. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/

[PATCH v2 6/7] drm/msm/dpu: get rid of dpu_encoder_helper_(un)register_irq

2021-06-17 Thread Dmitry Baryshkov
Get rid of dpu_encoder_helper_register_irq/unregister_irq helpers, call dpu_core_register/unregister_callback directly, without surrounding them with helpers. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 64 --- .../gpu/drm/msm/disp/dpu1/dpu

[PATCH v2 5/7] drm/msm/dpu: remove extra wrappers around dpu_core_irq

2021-06-17 Thread Dmitry Baryshkov
Remove extra dpu_irq_* wrappers from dpu_kms.c, merge them directly into dpu_core_irq_* functions. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.h | 12 - .../gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c | 9 --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c

[PATCH v2 2/7] drm/msm/dpu: don't clear IRQ register twice

2021-06-17 Thread Dmitry Baryshkov
We already clear the IRQ status register before processing IRQs, so do not clear the register again. Especially do not clear the IRQ status _after_ processing the IRQ as this way we can loose the event. Signed-off-by: Dmitry Baryshkov --- .../gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c | 17

[PATCH v2 3/7] drm/msm/dpu: merge struct dpu_irq into struct dpu_hw_intr

2021-06-17 Thread Dmitry Baryshkov
As dpu_core_irq was merged into dpu_hw_intr, merge data structures too, removing the need for a separate data structure. Signed-off-by: Dmitry Baryshkov --- .../gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c | 51 +-- .../gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.h | 5 ++ drivers/gpu/

[PATCH v2 1/7] drm/msm/dpu: squash dpu_core_irq into dpu_hw_interrupts

2021-06-17 Thread Dmitry Baryshkov
With dpu_core_irq being the wrapper around dpu_hw_interrupts, there is little sense in having them separate. Squash them together to remove another layer of abstraction (hw_intr ops). Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/Makefile | 1 - drivers/gpu/drm/msm/d

[PARCH v2 0/7] drm/msm/dpu: merge dpu_core_irq into dpu_hw_interrupts

2021-06-17 Thread Dmitry Baryshkov
This patch series reworks DPU's irq handling code by merging dpu_core_irq into dpu_hw_intr, reworking/dropping irq-related helpers and wrappers, etc. Changes since v1: - Rework callbacks registration code to allow just single callback per interrupt. This removes need to do any memory allocatio

Re: [PATCH] dt-bindings: Drop redundant minItems/maxItems

2021-06-17 Thread Rob Herring
On Thu, Jun 17, 2021 at 10:06 AM Suman Anna wrote: > > Hi Rob, > > On 6/15/21 2:15 PM, Rob Herring wrote: > > If a property has an 'items' list, then a 'minItems' or 'maxItems' with the > > same size as the list is redundant and can be dropped. Note that is DT > > schema specific behavior and not

[PATCH] drm/i915/display: Do not zero past infoframes.vsc

2021-06-17 Thread Kees Cook
intel_dp_vsc_sdp_unpack() was using a memset() size (36, struct dp_sdp) larger than the destination (24, struct drm_dp_vsc_sdp), clobbering fields in struct intel_crtc_state after infoframes.vsc. Use the actual target size for the memset(). Fixes: 1b404b7dbb10 ("drm/i915/dp: Read out DP SDPs") Cc:

Re: [PATCH 4/7] drm/msm/dpu: hide struct dpu_irq_callback

2021-06-17 Thread Dmitry Baryshkov
Hello, On Thu, 17 Jun 2021 at 22:01, Bjorn Andersson wrote: > > On Thu 17 Jun 09:09 CDT 2021, Dmitry Baryshkov wrote: > > > The struct dpu_irq_callbacks looks internal to IRQ handling code. Hide > > it from the rest of the DPU driver. > > > > Signed-off-by: Dmitry Baryshkov > > --- > > drivers/

Re: [PATCH v4 1/3] dt-bindings: msm: dsi: add missing 7nm bindings

2021-06-17 Thread Rob Herring
On Thu, 17 Jun 2021 10:43:33 -0400, Jonathan Marek wrote: > These got lost when going from .txt to .yaml bindings, add them back. > > Signed-off-by: Jonathan Marek > --- > .../bindings/display/msm/dsi-phy-7nm.yaml | 66 +++ > 1 file changed, 66 insertions(+) > create mode 10

Re: [PATCH 2/2] drm/amdgpu: rework dma_resv handling v3

2021-06-17 Thread Alex Deucher
On Mon, Jun 14, 2021 at 1:45 PM Christian König wrote: > > Drop the workaround and instead implement a better solution. > > Basically we are now chaining all submissions using a dma_fence_chain > container and adding them as exclusive fence to the dma_resv object. > > This way other drivers can st

Re: [PATCH v2] drm/i915: Document the Virtual Engine uAPI

2021-06-17 Thread Tvrtko Ursulin
On 17/06/2021 18:17, Daniel Vetter wrote: On Mon, Jun 14, 2021 at 10:09:59AM +0100, Tvrtko Ursulin wrote: From: Tvrtko Ursulin A little bit of documentation covering the topics of engine discovery, context engine maps and virtual engines. It is not very detailed but supposed to be a starting

Re: [Mesa-dev] [PATCH 0/6] dma-buf: Add an API for exporting sync files (v12)

2021-06-17 Thread Daniel Vetter
On Thu, Jun 17, 2021 at 09:37:36AM +0200, Christian König wrote: > Am 16.06.21 um 20:30 schrieb Jason Ekstrand: > > On Tue, Jun 15, 2021 at 3:41 AM Christian König > > wrote: > > > Hi Jason & Daniel, > > > > > > maybe I should explain once more where the problem with this approach is > > > and wh

Re: [PATCH] dma-buf: Document DMA_BUF_IOCTL_SYNC (v3)

2021-06-17 Thread Daniel Vetter
On Thu, Jun 17, 2021 at 02:42:58PM -0500, Jason Ekstrand wrote: > This adds a new "DMA Buffer ioctls" section to the dma-buf docs and adds > documentation for DMA_BUF_IOCTL_SYNC. > > v2 (Daniel Vetter): > - Fix a couple typos > - Add commentary about synchronization with other devices > - Use i

[PATCH] dma-buf: Document DMA_BUF_IOCTL_SYNC (v3)

2021-06-17 Thread Jason Ekstrand
This adds a new "DMA Buffer ioctls" section to the dma-buf docs and adds documentation for DMA_BUF_IOCTL_SYNC. v2 (Daniel Vetter): - Fix a couple typos - Add commentary about synchronization with other devices - Use item list format for describing flags v3 (Pekka Paalanen): - Clarify stalling

[PATCH] dma-buf: Document DMA_BUF_IOCTL_SYNC (v2)

2021-06-17 Thread Jason Ekstrand
This adds a new "DMA Buffer ioctls" section to the dma-buf docs and adds documentation for DMA_BUF_IOCTL_SYNC. v2 (Daniel Vetter): - Fix a couple typos - Add commentary about synchronization with other devices - Use item list format for describing flags v2 (Pekka Paalanen): - Clarify stalling

Re: [PATCH 1/2] drm/amdgpu: unwrap fence chains in the explicit sync fence

2021-06-17 Thread Daniel Vetter
On Thu, Jun 17, 2021 at 07:30:24PM +0200, Daniel Vetter wrote: > On Thu, Jun 17, 2021 at 09:44:25AM +0200, Christian König wrote: > > Alex do want to review those so that we can close the ticket? > > Maybe I'm behind on mails, but 2nd patch still has the issues I think I'm > seeing ... Ok with te

Re: [PATCH 2/2] drm/amdgpu: rework dma_resv handling v3

2021-06-17 Thread Daniel Vetter
On Mon, Jun 14, 2021 at 07:45:36PM +0200, Christian König wrote: > Drop the workaround and instead implement a better solution. > > Basically we are now chaining all submissions using a dma_fence_chain > container and adding them as exclusive fence to the dma_resv object. > > This way other drive

Re: [PATCH 1/7] dma-buf: add some more kerneldoc to dma_resv_add_shared_fence

2021-06-17 Thread Daniel Vetter
On Wed, Jun 16, 2021 at 10:26:49AM +0200, Christian König wrote: > Explicitly document that code can't assume that shared fences > signal after the exclusive fence. > > Signed-off-by: Christian König > --- > drivers/dma-buf/dma-resv.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) >

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-17 Thread Marek Olšák
Timeline semaphore waits (polling on memory) will be unmonitored and as fast as the roundtrip to memory. Semaphore writes will be slower because the copy of those write requests will also be forwarded to the kernel. Arbitrary writes are not protected by the hw but the kernel will take action agains

Re: [PATCH][next] drm/amd/display: Fix fall-through warning for Clang

2021-06-17 Thread Harry Wentland
On 2021-06-16 4:52 p.m., Gustavo A. R. Silva wrote: > In preparation to enable -Wimplicit-fallthrough for Clang, fix > the following warning by replacing a /* fall through */ comment > with the new pseudo-keyword macro fallthrough: > > rivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.c:672:4

Re: [PATCH] drm/auth: Move master pointer from drm_device to drm_file

2021-06-17 Thread Daniel Vetter
On Thu, Jun 17, 2021 at 05:47:33PM +0800, Qiang Ma wrote: > The drm_file pointer clears to zero during multi-user switching, > so it needs to call drm_new_set_master for master pointer from drm_file. That sounds like a bug. drm_file->master should be always the same - either you become a new stand

Re: [PATCH v3 2/8] mm: remove extra ZONE_DEVICE struct page refcount

2021-06-17 Thread Ralph Campbell
On 6/17/21 8:16 AM, Alex Sierra wrote: From: Ralph Campbell ZONE_DEVICE struct pages have an extra reference count that complicates the code for put_page() and several places in the kernel that need to check the reference count to see that a page is not being used (gup, compaction, migration,

Re: [Intel-gfx] [PATCH v5 01/12] drm/i915: Reference objects on the ww object list

2021-06-17 Thread Daniel Vetter
On Thu, Jun 17, 2021 at 08:30:07AM +0200, Thomas Hellström wrote: > Since the ww transaction endpoint easily end up far out-of-scope of > the objects on the ww object list, particularly for contending lock > objects, make sure we reference objects on the list so they don't > disappear under us. >

Re: [PATCH v4] Documentation: gpu: Mention the requirements for new properties

2021-06-17 Thread Daniel Vetter
On Thu, Jun 17, 2021 at 05:38:36PM +0200, Philippe CORNU wrote: > > > On 6/16/21 4:38 PM, Maxime Ripard wrote: > > New KMS properties come with a bunch of requirements to avoid each > > driver from running their own, inconsistent, set of properties, > > eventually leading to issues like property

Re: [PATCH -next] drm/amd/display: remove unused variable 'dc'

2021-06-17 Thread Harry Wentland
On 2021-06-16 9:16 p.m., Pu Lehui wrote: > GCC reports the following warning with W=1: > > drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm_psr.c:70:13: > warning: > variable ‘dc’ set but not used [-Wunused-but-set-variable] > 70 | struct dc *dc = NULL; >| ^~

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-17 Thread Daniel Vetter
On Thu, Jun 17, 2021 at 02:28:06PM -0400, Marek Olšák wrote: > The kernel will know who should touch the implicit-sync semaphore next, and > at the same time, the copy of all write requests to the implicit-sync > semaphore will be forwarded to the kernel for monitoring and bo_wait. > > Syncobjs co

Re: [PATCH 4/7] drm/msm/dpu: hide struct dpu_irq_callback

2021-06-17 Thread Bjorn Andersson
On Thu 17 Jun 09:09 CDT 2021, Dmitry Baryshkov wrote: > The struct dpu_irq_callbacks looks internal to IRQ handling code. Hide > it from the rest of the DPU driver. > > Signed-off-by: Dmitry Baryshkov > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_core_irq.h | 18 +++--- > drivers/gpu/drm/msm/disp/

Re: [PATCH v2 1/3] drm/dp_helper: Rework the drm_dp_aux documentation

2021-06-17 Thread Daniel Vetter
On Wed, Jun 16, 2021 at 04:15:27PM +0200, Maxime Ripard wrote: > Split the existing documentation to move the comments on particular > fields next to them. > > Suggested-by: Daniel Vetter > Signed-off-by: Maxime Ripard > > --- > > Changes from v1: > - New patch On the series: Acked-by: Dan

Re: [PATCH -next] drm/amd/display: Fix gcc unused variable warning

2021-06-17 Thread Harry Wentland
On 2021-06-16 10:31 p.m., Pu Lehui wrote: > GCC reports the following warning with W=1: > > drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_link_dp.c:3635:17: > warning: > variable ‘status’ set but not used [-Wunused-but-set-variable] > 3635 | enum dc_status status = DC_ERROR_UNEXPECTED; >

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-17 Thread Marek Olšák
The kernel will know who should touch the implicit-sync semaphore next, and at the same time, the copy of all write requests to the implicit-sync semaphore will be forwarded to the kernel for monitoring and bo_wait. Syncobjs could either use the same monitored access as implicit sync or be complet

Re: [PATCH v2 2/2] drm/bridge: ti-sn65dsi86: Implement the pwm_chip

2021-06-17 Thread Bjorn Andersson
On Thu 17 Jun 11:54 CDT 2021, Uwe Kleine-K?nig wrote: > Hello Bjorn, > > On Thu, Jun 17, 2021 at 11:38:26AM -0500, Bjorn Andersson wrote: > > On Thu 17 Jun 01:24 CDT 2021, Uwe Kleine-K?nig wrote: > > > On Wed, Jun 16, 2021 at 10:22:17PM -0500, Bjorn Andersson wrote: > > > > > > +static int ti_sn_

Re: vc4_bo_create: Failed to allocate from CMA

2021-06-17 Thread Stefan Wahren
Hi Nicolas, Am 17.06.21 um 11:36 schrieb nicolas saenz julienne: > On Sat, 2021-06-12 at 17:17 +0200, Stefan Wahren wrote: >> Hi, >> >> while testing the mainline kernel (arm64, defconfig) on Raspberry Pi 3 B >> Plus with Raspberry Pi OS - 64 bit, sometimes X doesn't start into >> desktop properly

Re: [PATCH] drm/i915/gt: Fix duplicate included intel_region_lmem.h

2021-06-17 Thread Daniel Vetter
On Wed, Jun 16, 2021 at 02:01:58PM +0800, Jiapeng Chong wrote: > Clean up the following includecheck warning: > > ./drivers/gpu/drm/i915/gt/intel_region_lmem.c: intel_region_lmem.h is > included more than once. > > No functional change. > > Reported-by: Abaci Robot > Signed-off-by: Jiapeng Chon

Re: [PATCH -next] apply: use DEFINE_SPINLOCK() instead of spin_lock_init().

2021-06-17 Thread Daniel Vetter
On Tue, Jun 15, 2021 at 07:17:13PM -0800, Yu Jiahua wrote: > From: Jiahua Yu > > spinlock can be initialized automatically with DEFINE_SPINLOCK() > rather than explicitly calling spin_lock_init(). > > Signed-off-by: Jiahua Yu Stuffed into drm-misc-next. The subject looked a bit strange, so I f

Re: vc4: hdmi: audio: ASoC: error at snd_soc_dai_startup on fef00700.hdmi

2021-06-17 Thread Stefan Wahren
Hi Maxime, Am 17.06.21 um 17:25 schrieb Maxime Ripard: > Hi Stefan, > > On Sat, Jun 12, 2021 at 12:04:08PM +0200, Stefan Wahren wrote: >> Hi Maxime, >> >> Am 04.06.21 um 11:02 schrieb Maxime Ripard: >>> Hi Stefan, >>> >>> I would assume it's due to this: >>> https://git.kernel.org/pub/scm/linux/ke

Re: [PATCH] drm/i915: Remove duplicate include of intel_region_lmem.h

2021-06-17 Thread Daniel Vetter
On Tue, Jun 15, 2021 at 07:35:20PM +0800, Wan Jiabing wrote: > Fix the following checkinclude.pl warning: > drivers/gpu/drm/i915/gt/intel_region_lmem.c > 8 #include "intel_region_lmem.h" > 12 #include "intel_region_lmem.h" > > Signed-off-by: Wan Jiabing Applied to drm-intel-gt-nex

Re: [Intel-gfx] [RFC PATCH 2/2] drm/doc/rfc: i915 new parallel submission uAPI plan

2021-06-17 Thread Matthew Brost
On Thu, Jun 17, 2021 at 06:46:48PM +0200, Daniel Vetter wrote: > Sorry I'm behind on mails ... > Aren't we all. > On Fri, Jun 11, 2021 at 12:50:29PM -0700, Matthew Brost wrote: > > On Fri, Jun 04, 2021 at 07:59:05PM +0200, Daniel Vetter wrote: > > > On Wed, May 26, 2021 at 04:33:57PM -0700, Mat

Re: [PATCH] dma-buf: fix and rework dma_buf_poll

2021-06-17 Thread Daniel Vetter
On Tue, Jun 15, 2021 at 01:21:17PM +0200, Christian König wrote: > Daniel pointed me towards this function and there are multiple obvious > problems > in the implementation. > > First of all the retry loop is not working as intended. In general the retry > makes only sense if you grab the referen

Re: [PATCH 1/2] drm/amdgpu: unwrap fence chains in the explicit sync fence

2021-06-17 Thread Daniel Vetter
On Thu, Jun 17, 2021 at 09:44:25AM +0200, Christian König wrote: > Alex do want to review those so that we can close the ticket? Maybe I'm behind on mails, but 2nd patch still has the issues I think I'm seeing ... -Daniel > > Thanks, > Christian. > > Am 14.06.21 um 19:45 schrieb Christian König

Re: drm/i915: __GFP_RETRY_MAYFAIL allocations in stable kernels

2021-06-17 Thread Daniel Vetter
On Mon, Jun 14, 2021 at 09:45:37PM +0900, Sergey Senozhatsky wrote: > Hi, > > We are observing some user-space crashes (sigabort, segfaults etc.) > under moderate memory pressure (pretty far from severe pressure) which > have one thing in common - restrictive GFP mask in setup_scratch_page(). > >

Re: [PATCH] drm/i915: allow DG1 autoprobe for CONFIG_BROKEN

2021-06-17 Thread Daniel Vetter
On Wed, Jun 16, 2021 at 03:29:26PM +0100, Matthew Auld wrote: > On Mon, 14 Jun 2021 at 10:22, Matthew Auld wrote: > > > > Purely for CI so we can get some pre-merge results for DG1. This is > > especially useful for cross driver TTM changes where CI can hopefully > > catch regressions. This is sim

Re: [PATCH v2] drm/i915: Document the Virtual Engine uAPI

2021-06-17 Thread Daniel Vetter
On Mon, Jun 14, 2021 at 10:09:59AM +0100, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin > > A little bit of documentation covering the topics of engine discovery, > context engine maps and virtual engines. It is not very detailed but > supposed to be a starting point of giving a brief high level o

Re: [PATCH v2 2/2] drm: Protect drm_master pointers in drm_lease.c

2021-06-17 Thread Daniel Vetter
On Tue, Jun 15, 2021 at 10:36:45AM +0800, Desmond Cheong Zhi Xi wrote: > This patch ensures that the device's master mutex is acquired before > accessing pointers to struct drm_master that are subsequently > dereferenced. Without the mutex, the struct drm_master may be freed > concurrently by anoth

Re: [PATCH v2 1/2] drm: Add a locked version of drm_is_current_master

2021-06-17 Thread Daniel Vetter
On Tue, Jun 15, 2021 at 10:36:44AM +0800, Desmond Cheong Zhi Xi wrote: > While checking the master status of the DRM file in > drm_is_current_master(), the device's master mutex should be > held. Without the mutex, the pointer fpriv->master may be freed > concurrently by another process calling drm

Re: [Intel-gfx] [PATCH 0/2] GuC submission / DRM scheduler integration plan + new uAPI

2021-06-17 Thread Daniel Vetter
On Fri, Jun 11, 2021 at 04:40:42PM -0700, Matthew Brost wrote: > Subject and patches say it all. > > v2: Address comments, patches have details of changes > v3: Address comments, patches have details of changes > v4: Address comments, patches have details of changes > > Signed-off-by: Matthew Bro

Re: [PATCH 1/5] dma-buf: fix dma_resv_test_signaled test_all handling

2021-06-17 Thread Daniel Vetter
On Mon, Jun 14, 2021 at 07:15:44PM +0200, Christian König wrote: > Am 11.06.21 um 16:55 schrieb Daniel Vetter: > > On Fri, Jun 11, 2021 at 04:53:11PM +0200, Christian König wrote: > > > > > > Am 11.06.21 um 16:47 schrieb Daniel Vetter: > > > > On Fri, Jun 11, 2021 at 02:02:57PM +0200, Christian Kö

Re: [PATCH v2 2/2] drm/bridge: ti-sn65dsi86: Implement the pwm_chip

2021-06-17 Thread Uwe Kleine-König
Hello Bjorn, On Thu, Jun 17, 2021 at 11:38:26AM -0500, Bjorn Andersson wrote: > On Thu 17 Jun 01:24 CDT 2021, Uwe Kleine-K?nig wrote: > > On Wed, Jun 16, 2021 at 10:22:17PM -0500, Bjorn Andersson wrote: > > > > > +static int ti_sn_pwm_apply(struct pwm_chip *chip, struct pwm_device > > > > > *pwm,

Re: [PATCH] drm/ttm: fix error handling in ttm_bo_handle_move_mem()

2021-06-17 Thread Daniel Vetter
On Thu, Jun 17, 2021 at 09:41:35AM +0200, Christian König wrote: > > > Am 16.06.21 um 21:19 schrieb Dan Carpenter: > > On Wed, Jun 16, 2021 at 01:00:38PM +0200, Christian König wrote: > > > > > > Am 16.06.21 um 11:36 schrieb Dan Carpenter: > > > > On Wed, Jun 16, 2021 at 10:47:14AM +0200, Christ

Re: [PATCH 6/7] drm/amdgpu: unwrap fence chains in the explicit sync fence

2021-06-17 Thread Daniel Vetter
On Mon, Jun 14, 2021 at 09:25:44AM +0200, Christian König wrote: > Am 11.06.21 um 17:18 schrieb Daniel Vetter: > > On Fri, Jun 11, 2021 at 12:09:19PM +0200, Christian König wrote: > > > Am 11.06.21 um 11:07 schrieb Daniel Vetter: > > > > On Thu, Jun 10, 2021 at 11:17:59AM +0200, Christian König wro

Re: [Mesa-dev] Linux Graphics Next: Userspace submission update

2021-06-17 Thread Daniel Vetter
On Mon, Jun 14, 2021 at 07:13:00PM +0200, Christian König wrote: > As long as we can figure out who touched to a certain sync object last that > would indeed work, yes. Don't you need to know who will touch it next, i.e. who is holding up your fence? Or maybe I'm just again totally confused. -Dani

Re: [Intel-gfx] [RFC PATCH 2/2] drm/doc/rfc: i915 new parallel submission uAPI plan

2021-06-17 Thread Daniel Vetter
Sorry I'm behind on mails ... On Fri, Jun 11, 2021 at 12:50:29PM -0700, Matthew Brost wrote: > On Fri, Jun 04, 2021 at 07:59:05PM +0200, Daniel Vetter wrote: > > On Wed, May 26, 2021 at 04:33:57PM -0700, Matthew Brost wrote: > > > Add entry for i915 new parallel submission uAPI plan. > > > > > >

Re: [PATCH v2 2/2] drm/bridge: ti-sn65dsi86: Implement the pwm_chip

2021-06-17 Thread Bjorn Andersson
On Thu 17 Jun 01:24 CDT 2021, Uwe Kleine-K?nig wrote: > Hello Bjorn, > > On Wed, Jun 16, 2021 at 10:22:17PM -0500, Bjorn Andersson wrote: > > > > +static int ti_sn_pwm_apply(struct pwm_chip *chip, struct pwm_device > > > > *pwm, > > > > + const struct pwm_state *state) >

Re: [PATCH v4 1/3] dt-bindings: msm: dsi: add missing 7nm bindings

2021-06-17 Thread Rob Clark
On Thu, Jun 17, 2021 at 8:09 AM Jonathan Marek wrote: > > These got lost when going from .txt to .yaml bindings, add them back. > Fixes: 8fc939e72ff8 ("dt-bindings: msm: dsi: add yaml schemas for DSI PHY bindings") > Signed-off-by: Jonathan Marek > --- > .../bindings/display/msm/dsi-phy-7nm.ya

Re: [PATCH v3 1/8] ext4/xfs: add page refcount helper

2021-06-17 Thread Darrick J. Wong
On Thu, Jun 17, 2021 at 10:16:58AM -0500, Alex Sierra wrote: > From: Ralph Campbell > > There are several places where ZONE_DEVICE struct pages assume a reference > count == 1 means the page is idle and free. Instead of open coding this, > add a helper function to hide this detail. > > v2: > [AS

Re: [PATCH v3 0/8] Support DEVICE_GENERIC memory in migrate_vma_*

2021-06-17 Thread Sierra Guiza, Alejandro (Alex)
On 6/17/2021 10:16 AM, Alex Sierra wrote: v1: AMD is building a system architecture for the Frontier supercomputer with a coherent interconnect between CPUs and GPUs. This hardware architecture allows the CPUs to coherently access GPU device memory. We have hardware in our labs and we are worki

Re: [PATCH v4] Documentation: gpu: Mention the requirements for new properties

2021-06-17 Thread Philippe CORNU
On 6/16/21 4:38 PM, Maxime Ripard wrote: New KMS properties come with a bunch of requirements to avoid each driver from running their own, inconsistent, set of properties, eventually leading to issues like property conflicts, inconsistencies between drivers and semantics, etc. Let's document

RE: [Intel-gfx] [PATCH] drm/i915: Perform execbuffer object locking as a separate step

2021-06-17 Thread Tang, CQ
> -Original Message- > From: Intel-gfx On Behalf Of > Thomas Hellström > Sent: Tuesday, June 15, 2021 4:36 AM > To: intel-...@lists.freedesktop.org; dri-devel@lists.freedesktop.org > Cc: Thomas Hellström ; Auld, Matthew > > Subject: [Intel-gfx] [PATCH] drm/i915: Perform execbuffer objec

Re: vc4: hdmi: audio: ASoC: error at snd_soc_dai_startup on fef00700.hdmi

2021-06-17 Thread Maxime Ripard
Hi Stefan, On Sat, Jun 12, 2021 at 12:04:08PM +0200, Stefan Wahren wrote: > Hi Maxime, > > Am 04.06.21 um 11:02 schrieb Maxime Ripard: > > Hi Stefan, > > > > I would assume it's due to this: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/vc4/vc4_hdmi.c

[PATCH v3 8/8] mm: call pgmap->ops->page_free for DEVICE_GENERIC pages

2021-06-17 Thread Alex Sierra
Add MEMORY_DEVICE_GENERIC case to free_zone_device_page callback. Device generic type memory case is now able to free its pages properly. Signed-off-by: Alex Sierra --- mm/memremap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mm/memremap.c b/mm/memremap.c index 614b

[PATCH v3 7/8] mm: add generic type support to migrate_vma helpers

2021-06-17 Thread Alex Sierra
Device generic type case added for migrate_vma_pages and migrate_vma_check_page helpers. Both, generic and private device types have the same conditions to decide to migrate pages from/to device memory. Signed-off-by: Alex Sierra --- mm/migrate.c | 8 1 file changed, 4 insertions(+), 4

[PATCH v3 6/8] include/linux/mm.h: helpers to check zone device generic type

2021-06-17 Thread Alex Sierra
Two helpers added. One checks if zone device page is generic type. The other if page is either private or generic type. Signed-off-by: Alex Sierra --- include/linux/mm.h | 8 1 file changed, 8 insertions(+) diff --git a/include/linux/mm.h b/include/linux/mm.h index d8d79bb94be8..f5b247

[PATCH v3 5/8] drm/amdkfd: generic type as sys mem on migration to ram

2021-06-17 Thread Alex Sierra
Generic device type memory on VRAM to RAM migration, has similar access as System RAM from the CPU. This flag sets the source from the sender. Which in Generic type case, should be set as SYSTEM. Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdkfd/kfd_migrate.c

[PATCH v3 4/8] drm/amdkfd: add SPM support for SVM

2021-06-17 Thread Alex Sierra
When CPU is connected throug XGMI, it has coherent access to VRAM resource. In this case that resource is taken from a table in the device gmc aperture base. This resource is used along with the device type, which could be DEVICE_PRIVATE or DEVICE_GENERIC to create the device page map region. Sign

[PATCH v3 3/8] kernel: resource: lookup_resource as exported symbol

2021-06-17 Thread Alex Sierra
The AMD architecture for the Frontier supercomputer will have device memory which can be coherently accessed by the CPU. The system BIOS advertises this memory as SPM (special purpose memory) in the UEFI system address map. The AMDGPU driver needs to be able to lookup this resource in order to cla

[PATCH v3 2/8] mm: remove extra ZONE_DEVICE struct page refcount

2021-06-17 Thread Alex Sierra
From: Ralph Campbell ZONE_DEVICE struct pages have an extra reference count that complicates the code for put_page() and several places in the kernel that need to check the reference count to see that a page is not being used (gup, compaction, migration, etc.). Clean up the code so the reference

[PATCH v3 1/8] ext4/xfs: add page refcount helper

2021-06-17 Thread Alex Sierra
From: Ralph Campbell There are several places where ZONE_DEVICE struct pages assume a reference count == 1 means the page is idle and free. Instead of open coding this, add a helper function to hide this detail. v2: [AS]: rename dax_layout_is_idle_page func to dax_page_unused Signed-off-by: Ral

[PATCH v3 0/8] Support DEVICE_GENERIC memory in migrate_vma_*

2021-06-17 Thread Alex Sierra
v1: AMD is building a system architecture for the Frontier supercomputer with a coherent interconnect between CPUs and GPUs. This hardware architecture allows the CPUs to coherently access GPU device memory. We have hardware in our labs and we are working with our partner HPE on the BIOS, firmware

  1   2   >