Re: [Freedreno] [PATCH] drm/msm/dp: Remove unused variable

2021-07-08 Thread abhinavk
On 2021-07-08 19:48, Souptick Joarder wrote: Kernel test roobot throws below warning -> drivers/gpu/drm/msm/dp/dp_display.c:1017:21: warning: variable 'drm' set but not used [-Wunused-but-set-variable] Removed unused variable drm. Reported-by: kernel test robot Signed-off-by: Souptick

[PATCH] drm/msm/dp: Remove unused variable

2021-07-08 Thread Souptick Joarder
Kernel test roobot throws below warning -> drivers/gpu/drm/msm/dp/dp_display.c:1017:21: warning: variable 'drm' set but not used [-Wunused-but-set-variable] Removed unused variable drm. Reported-by: kernel test robot Signed-off-by: Souptick Joarder --- drivers/gpu/drm/msm/dp/dp_display.c | 2

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

2021-07-08 Thread Stephen Boyd
Quoting maitreye (2021-07-08 12:13:44) > From: Maitreyee Rao > > Add trace points across the MSM DP driver to help debug > interop issues. > > Changes in v2: > - Got rid of redundant log messages. > - Added %#x instead of 0x%x wherever required. > - Got rid of __func__ calls in debug messages.

Re: [PATCH 52/53] drm/i915/dg2: Update to bigjoiner path

2021-07-08 Thread Navare, Manasi
On Thu, Jul 01, 2021 at 01:24:26PM -0700, Matt Roper wrote: > From: Animesh Manna > > In verify_mpllb_state() encoder is retrieved from best_encoder > of connector_state. As there will be only one connector_state > for bigjoiner and checking encoder may not be needed for > bigjoiner-slave. This

[PATCH] drm/bridge/lontium-lt9611uxc: fix provided connector suport

2021-07-08 Thread Dmitry Baryshkov
- set DRM_CONNECTOR_POLL_HPD as the connector will generate hotplug events on its own - do not call drm_kms_helper_hotplug_event() unless mode_config.funcs pointer is not NULL to remove possible kernel oops. Fixes: bc6fa8676ebb ("drm/bridge/lontium-lt9611uxc: move HPD notification out of

Re: [PATCH 3/7] drm/msm/dp: reset aux controller after dp_aux_cmd_fifo_tx() failed.

2021-07-08 Thread khsieh
On 2021-07-08 00:34, Stephen Boyd wrote: Quoting Kuogee Hsieh (2021-07-06 10:20:16) Aux hardware calibration sequence requires resetting the aux controller in order for the new setting to take effect. However resetting the AUX controller will also clear HPD interrupt status which may

Re: [PATCH] drm/qxl: add NULL check for bo->resource

2021-07-08 Thread Daniel Vetter
On Thu, Jul 08, 2021 at 12:10:25PM +, Roberto Sassu wrote: > > From: Christian König [mailto:ckoenig.leichtzumer...@gmail.com] > > Sent: Thursday, July 8, 2021 1:47 PM > > When allocations fails that can be NULL now. > > > > Signed-off-by: Christian König > > Reported-by: Daniel Bristot de

[PATCH] drm/sched: Barriers are needed for entity->last_scheduled

2021-07-08 Thread Daniel Vetter
It might be good enough on x86 with just READ_ONCE, but the write side should then at least be WRITE_ONCE because x86 has total store order. It's definitely not enough on arm. Fix this proplery, which means - explain the need for the barrier in both places - point at the other side in each

Re: [PATCH] drm/vgem: Implement mmap as GEM object function

2021-07-08 Thread Daniel Vetter
On Thu, Jun 24, 2021 at 11:52 AM Thomas Zimmermann wrote: > > Moving the driver-specific mmap code into a GEM object function allows > for using DRM helpers for various mmap callbacks. > > The respective vgem functions are being removed. The file_operations > structure vgem_driver_fops is now

Re: [PATCH 1/7] drm/msm/dp: use dp_ctrl_off_link_stream during PHY compliance test run

2021-07-08 Thread khsieh
On 2021-07-08 00:03, Stephen Boyd wrote: Quoting Kuogee Hsieh (2021-07-06 10:20:14) DP cable should always connect to DPU during the entire PHY compliance testing run. Since DP PHY compliance test is executed at irq_hpd event context, dp_ctrl_off_link_stream() should be used instead of

Re: [PATCH v2] drm/vkms: Creating a debug file to get/track vkms config in vkms_drv.c

2021-07-08 Thread Melissa Wen
On 07/08, Beatriz Martins de Carvalho wrote: > Creating a vkms_config_debufs file in vkms_drv.c to get/track vkms config > data, for the long-term plan of making vkms configurable and have multiple > different instances. > > Reviewed-by: Melissa Wen > Signed-off-by: Beatriz Martins de Carvalho

Re: [PATCH 4/7] drm/msm/dp: replug event is converted into an unplug followed by an plug events

2021-07-08 Thread Stephen Boyd
Quoting Kuogee Hsieh (2021-07-06 10:20:17) > Remove special handling of replug interrupt and instead treat replug event > as a sequential unplug followed by a plugin event. This is needed to meet > the requirements of DP Link Layer CTS test case 4.2.1.3. > > Signed-off-by: Kuogee Hsieh > ---

Re: [PATCH 2/2 v3] drm/panel: ws2401: Add driver for WideChips WS2401

2021-07-08 Thread Doug Anderson
Hi, On Wed, Jul 7, 2021 at 4:55 PM Linus Walleij wrote: > > This adds a driver for panels based on the WideChips WS2401 display > controller. This display controller is used in the Samsung LMS380KF01 > display found in the Samsung GT-I8160 (Codina) mobile phone and > possibly others. > > As is

Re: [PATCH 1/2 v3] drm/panel: Add DT bindings for Samsung LMS380KF01

2021-07-08 Thread Doug Anderson
Hi, On Wed, Jul 7, 2021 at 4:45 PM Linus Walleij wrote: > > This adds device tree bindings for the Samsung Mobile Displays > LMS380KF01 RGB DPI display panel. > > Cc: devicet...@vger.kernel.org > Cc: phone-de...@vger.kernel.org > Cc: Douglas Anderson > Cc: Noralf Trønnes > Signed-off-by: Linus

Re: [PATCH] drm/panel: Fix up DT bindings for Samsung lms397kf04

2021-07-08 Thread Doug Anderson
Hi, On Thu, Jul 1, 2021 at 2:38 PM Linus Walleij wrote: > > Improve the bindings and make them more usable: > > - Pick in spi-cpha and spi-cpol from the SPI node parent, > this will specify that we are "type 3" in the device tree > rather than hardcoding it in the operating system. > - Drop

Re: [PATCH v3] drm/dbi: Print errors for mipi_dbi_command()

2021-07-08 Thread Doug Anderson
Hi, On Fri, Jul 2, 2021 at 6:58 AM Linus Walleij wrote: > > The macro mipi_dbi_command() does not report errors unless you wrap it > in another macro to do the error reporting. > > Report a rate-limited error so we know what is going on. > > Drop the only user in DRM using mipi_dbi_command() and

Re: [PATCH v3 03/20] drm/sched: Barriers are needed for entity->last_scheduled

2021-07-08 Thread Daniel Vetter
On Thu, Jul 8, 2021 at 8:56 PM Andrey Grodzovsky wrote: > On 2021-07-08 1:37 p.m., Daniel Vetter wrote: > > It might be good enough on x86 with just READ_ONCE, but the write side > > should then at least be WRITE_ONCE because x86 has total store order. > > > > It's definitely not enough on arm. >

Re: [git pull] drm fixes for 5.14-rc1

2021-07-08 Thread pr-tracker-bot
The pull request you sent on Thu, 8 Jul 2021 13:06:50 +1000: > git://anongit.freedesktop.org/drm/drm tags/drm-next-2021-07-08-1 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/f55966571d5eb2876a11e48e798b4592fa1ffbb7 Thank you! -- Deet-doot-dot, I am a bot.

Re: [PATCH] drm/tegra: gr2d: Explicitly control module reset

2021-07-08 Thread Dmitry Osipenko
08.07.2021 18:13, Dmitry Osipenko пишет: >> +assert_rst: >> +(void)reset_control_assert(gr2d->rst); > (void)? I forgot that the 2d reset shouldn't be asserted. See comment in gr2d_runtime_suspend() [1]. [1] https://lore.kernel.org/lkml/20210701232728.23591-15-dig...@gmail.com/

[PATCH 2/2] drm/ttm: Fix COW check

2021-07-08 Thread Alex Deucher
From: Felix Kuehling KFD Thunk maps invisible VRAM BOs with PROT_NONE, MAP_PRIVATE. is_cow_mapping returns true for these mappings. Add a check for vm_flags & VM_WRITE to avoid mmap failures on private read-only or PROT_NONE mappings. Fixes: f91142c62161 ("drm/ttm: nuke VM_MIXEDMAP on BO

[PATCH 1/2] drm/amdkfd: Allow CPU access for all VRAM BOs

2021-07-08 Thread Alex Deucher
From: Felix Kuehling The thunk needs to mmap all BOs for CPU access to allow the debugger to access them. Invisible ones are mapped with PROT_NONE. Fixes: 71df0368e9b6 ("drm/amdgpu: Implement mmap as GEM object function") Signed-off-by: Felix Kuehling Signed-off-by: Alex Deucher ---

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

2021-07-08 Thread maitreye
From: Maitreyee Rao Add trace points across the MSM DP driver to help debug interop issues. Changes in v2: - Got rid of redundant log messages. - Added %#x instead of 0x%x wherever required. - Got rid of __func__ calls in debug messages. - Added newline wherever missing. Signed-off-by:

Re: [PATCH v3 03/20] drm/sched: Barriers are needed for entity->last_scheduled

2021-07-08 Thread Andrey Grodzovsky
On 2021-07-08 1:37 p.m., Daniel Vetter wrote: It might be good enough on x86 with just READ_ONCE, but the write side should then at least be WRITE_ONCE because x86 has total store order. It's definitely not enough on arm. Fix this proplery, which means - explain the need for the barrier in

[Bug 213391] AMDGPU retries page fault with some specific processes amdgpu and sometimes followed [gfxhub0] retry page fault until *ERROR* ring gfx timeout, but soft recovered

2021-07-08 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=213391 --- Comment #32 from Lahfa Samy (s...@lahfa.xyz) --- Created attachment 297781 --> https://bugzilla.kernel.org/attachment.cgi?id=297781=edit Archlinux-part-of-modinfo-amdgpu I think that my kernel is using the latest amdgpu driver that is

[Bug 213391] AMDGPU retries page fault with some specific processes amdgpu and sometimes followed [gfxhub0] retry page fault until *ERROR* ring gfx timeout, but soft recovered

2021-07-08 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=213391 --- Comment #31 from Lahfa Samy (s...@lahfa.xyz) --- I just have hit the same error even after downgrading, here is the current version of the package linux-firmware 20210315.3568f96-3. I have hit the error again, the computer froze for a few

Re: [PATCH 00/30] drm/i915/gem: ioctl clean-ups (v9)

2021-07-08 Thread Daniel Vetter
On Thu, Jul 08, 2021 at 10:48:05AM -0500, Jason Ekstrand wrote: > Overview: > - > > This patch series attempts to clean up some of the IOCTL mess we've created > over the last few years. The most egregious bit being context mutability. > In summary, this series: > > 1. Drops two

[PATCH] drm/cma-helper: Release non-coherent memory with dma_free_noncoherent()

2021-07-08 Thread Thomas Zimmermann
The GEM CMA helpers allocate non-coherent (i.e., cached) backing storage with dma_alloc_noncoherent(), but release it with dma_free_wc(). Fix this with a call to dma_free_noncoherent(). Writecombining storage is still released with dma_free_wc(). Signed-off-by: Thomas Zimmermann Fixes:

[PATCH v3 20/20] dma-resv: Give the docs a do-over

2021-07-08 Thread Daniel Vetter
Specifically document the new/clarified rules around how the shared fences do not have any ordering requirements against the exclusive fence. But also document all the things a bit better, given how central struct dma_resv to dynamic buffer management the docs have been very inadequat. - Lots

[PATCH v3 19/20] drm/i915: Don't break exclusive fence ordering

2021-07-08 Thread Daniel Vetter
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 for the existing fences, even if userspace asked us to ignore

[PATCH v3 18/20] drm/i915: delete exclude argument from i915_sw_fence_await_reservation

2021-07-08 Thread Daniel Vetter
No longer used, the last user disappeared with commit d07f0e59b2c762584478920cd2d11fba2980a94a Author: Chris Wilson Date: Fri Oct 28 13:58:44 2016 +0100 drm/i915: Move GEM activity tracking into a common struct reservation_object Signed-off-by: Daniel Vetter Cc: Maarten Lankhorst Cc:

[PATCH v3 17/20] drm/etnaviv: Don't break exclusive fence ordering

2021-07-08 Thread Daniel Vetter
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 for the existing fences, even if userspace asked us to ignore

[PATCH v3 16/20] drm/msm: always wait for the exclusive fence

2021-07-08 Thread Daniel Vetter
From: Christian König Drivers also need to to sync to the exclusive fence when a shared one is present. Signed-off-by: Christian König [danvet: Not that hard to compile-test on arm ...] Signed-off-by: Daniel Vetter Cc: Rob Clark Cc: Sean Paul Cc: linux-arm-...@vger.kernel.org Cc:

[PATCH v3 15/20] drm/msm: Don't break exclusive fence ordering

2021-07-08 Thread Daniel Vetter
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 for the existing fences, even if userspace asked us to ignore

[PATCH v3 14/20] drm/sched: Check locking in drm_sched_job_await_implicit

2021-07-08 Thread Daniel Vetter
You really need to hold the reservation here or all kinds of funny things can happen between grabbing the dependencies and inserting the new fences. Signed-off-by: Daniel Vetter Cc: "Christian König" Cc: Daniel Vetter Cc: Luben Tuikov Cc: Andrey Grodzovsky Cc: Alex Deucher Cc: Jack Zhang

[PATCH v3 10/20] drm/v3d: Use scheduler dependency handling

2021-07-08 Thread Daniel Vetter
With the prep work out of the way this isn't tricky anymore. Aside: The chaining of the various jobs is a bit awkward, with the possibility of failure in bad places. I think with the drm_sched_job_init/arm split and maybe preloading the job->dependencies xarray this should be fixable. Cc:

[PATCH v3 12/20] drm/gem: Delete gem array fencing helpers

2021-07-08 Thread Daniel Vetter
Integrated into the scheduler now and all users converted over. Signed-off-by: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: Sumit Semwal Cc: "Christian König" Cc: linux-me...@vger.kernel.org Cc:

[PATCH v3 09/20] drm/v3d: Move drm_sched_job_init to v3d_job_init

2021-07-08 Thread Daniel Vetter
Prep work for using the scheduler dependency handling. We need to call drm_sched_job_init earlier so we can use the new drm_sched_job_await* functions for dependency handling here. v2: Slightly better commit message and rebase to include the drm_sched_job_arm() call (Emma). v3: Cleanup jobs

[PATCH v3 13/20] drm/sched: Don't store self-dependencies

2021-07-08 Thread Daniel Vetter
This is essentially part of drm_sched_dependency_optimized(), which only amdgpu seems to make use of. Use it a bit more. This would mean that as-is amdgpu can't use the dependency helpers, at least not with the current approach amdgpu has for deciding whether a vm_flush is needed. Since amdgpu

[PATCH v3 11/20] drm/etnaviv: Use scheduler dependency handling

2021-07-08 Thread Daniel Vetter
We need to pull the drm_sched_job_init much earlier, but that's very minor surgery. v2: Actually fix up cleanup paths by calling drm_sched_job_init, which I wanted to to in the previous round (and did, for all other drivers). Spotted by Lucas. Signed-off-by: Daniel Vetter Cc: Lucas Stach Cc:

[PATCH v3 08/20] drm/lima: use scheduler dependency tracking

2021-07-08 Thread Daniel Vetter
Nothing special going on here. Aside reviewing the code, it seems like drm_sched_job_arm() should be moved into lima_sched_context_queue_task and put under some mutex together with drm_sched_push_job(). See the kerneldoc for drm_sched_push_job(). Signed-off-by: Daniel Vetter Cc: Qiang Yu Cc:

[PATCH v3 07/20] drm/panfrost: use scheduler dependency tracking

2021-07-08 Thread Daniel Vetter
Just deletes some code that's now more shared. Note that thanks to the split into drm_sched_job_init/arm we can now easily pull the _init() part from under the submission lock way ahead where we're adding the sync file in-fences as dependencies. v2: Correctly clean up the partially set up job,

[PATCH v3 06/20] drm/sched: improve docs around drm_sched_entity

2021-07-08 Thread Daniel Vetter
I found a few too many things that are tricky and not documented, so I started typing. I found a few more things that looked broken while typing, see the varios FIXME in drm_sched_entity. Also some of the usual logics: - actually include sched_entity.c declarations, that was lost in the move

[PATCH v3 05/20] drm/sched: drop entity parameter from drm_sched_push_job

2021-07-08 Thread Daniel Vetter
Originally a job was only bound to the queue when we pushed this, but now that's done in drm_sched_job_init, making that parameter entirely redundant. Remove it. The same applies to the context parameter in lima_sched_context_queue_task, simplify that too. Reviewed-by: Steven Price (v1)

[PATCH v3 02/20] drm/sched: Split drm_sched_job_init

2021-07-08 Thread Daniel Vetter
This is a very confusingly named function, because not just does it init an object, it arms it and provides a point of no return for pushing a job into the scheduler. It would be nice if that's a bit clearer in the interface. But the real reason is that I want to push the dependency tracking

[PATCH v3 04/20] drm/sched: Add dependency tracking

2021-07-08 Thread Daniel Vetter
Instead of just a callback we can just glue in the gem helpers that panfrost, v3d and lima currently use. There's really not that many ways to skin this cat. On the naming bikeshed: The idea for using _await_ to denote adding dependencies to a job comes from i915, where that's used quite

[PATCH v3 03/20] drm/sched: Barriers are needed for entity->last_scheduled

2021-07-08 Thread Daniel Vetter
It might be good enough on x86 with just READ_ONCE, but the write side should then at least be WRITE_ONCE because x86 has total store order. It's definitely not enough on arm. Fix this proplery, which means - explain the need for the barrier in both places - point at the other side in each

[PATCH v3 01/20] drm/sched: entity->rq selection cannot fail

2021-07-08 Thread Daniel Vetter
If it does, someone managed to set up a sched_entity without schedulers, which is just a driver bug. We BUG_ON() here because in the next patch drm_sched_job_init() will be split up, with drm_sched_job_arm() never failing. And that's the part where the rq selection will end up in. Note that if

[PATCH v3 00/20] drm/sched dependency tracking and dma-resv fixes

2021-07-08 Thread Daniel Vetter
Hil all, I figured I'll combine the two series, they build on top of each another anyway. Changes: - drop broken i915 patch (Matt) - typos and improvements in the dma-resv patch - bunch of fixes to the drm_sched_job_init/arm split (Melissa, Christian) - threw a drm_sched_entity doc patch on top

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

2021-07-08 Thread Will Deacon
On Tue, Jul 06, 2021 at 12:14:16PM -0700, Nathan Chancellor wrote: > On 7/6/2021 10:06 AM, Will Deacon wrote: > > On Tue, Jul 06, 2021 at 04:39:11PM +0100, Robin Murphy wrote: > > > On 2021-07-06 15:05, Christoph Hellwig wrote: > > > > On Tue, Jul 06, 2021 at 03:01:04PM +0100, Robin Murphy wrote:

[PATCH 0/7] CT changes required for GuC submission

2021-07-08 Thread Matthew Brost
As part of enabling GuC submission discussed in [1], [2], and [3] we need optimize and update the CT code as this is now in the critical path of submission. This series includes the patches to do that which is the first 7 patches from [3]. The patches should have addressed all the feedback in [3]

[PATCH 3/7] drm/i915/guc: Increase size of CTB buffers

2021-07-08 Thread Matthew Brost
With the introduction of non-blocking CTBs more than one CTB can be in flight at a time. Increasing the size of the CTBs should reduce how often software hits the case where no space is available in the CTB buffer. Cc: John Harrison Signed-off-by: Matthew Brost Reviewed-by: Michal Wajdeczko

[PATCH 1/7] drm/i915/guc: Relax CTB response timeout

2021-07-08 Thread Matthew Brost
In upcoming patch we will allow more CTB requests to be sent in parallel to the GuC for processing, so we shouldn't assume any more that GuC will always reply without 10ms. Use bigger value hardcoded value of 1s instead. v2: Add CONFIG_DRM_I915_GUC_CTB_TIMEOUT config option v3: (Daniel Vetter)

[PATCH 5/7] drm/i915/guc: Add stall timer to non blocking CTB send function

2021-07-08 Thread Matthew Brost
Implement a stall timer which fails H2G CTBs once a period of time with no forward progress is reached to prevent deadlock. v2: (Michal) - Improve error message in ct_deadlock() - Set broken when ct_deadlock() returns true - Return -EPIPE on ct_deadlock() v3: (Michal) - Add ms to stall

[PATCH 6/7] drm/i915/guc: Optimize CTB writes and reads

2021-07-08 Thread Matthew Brost
CTB writes are now in the path of command submission and should be optimized for performance. Rather than reading CTB descriptor values (e.g. head, tail) which could result in accesses across the PCIe bus, store shadow local copies and only read/write the descriptor values when absolutely

[PATCH 4/7] drm/i915/guc: Add non blocking CTB send function

2021-07-08 Thread Matthew Brost
Add non blocking CTB send function, intel_guc_send_nb. GuC submission will send CTBs in the critical path and does not need to wait for these CTBs to complete before moving on, hence the need for this new function. The non-blocking CTB now must have a flow control mechanism to ensure the buffer

[PATCH 7/7] drm/i915/guc: Module load failure test for CT buffer creation

2021-07-08 Thread Matthew Brost
From: John Harrison Add several module failure load inject points in the CT buffer creation code path. Signed-off-by: John Harrison Signed-off-by: Matthew Brost Reviewed-by: Michal Wajdeczko --- drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 8 1 file changed, 8 insertions(+) diff

[PATCH 2/7] drm/i915/guc: Improve error message for unsolicited CT response

2021-07-08 Thread Matthew Brost
Improve the error message when a unsolicited CT response is received by printing fence that couldn't be found, the last fence, and all requests with a response outstanding. Signed-off-by: Matthew Brost Reviewed-by: Michal Wajdeczko --- drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 10 +++---

[PATCH 27/30] drm/i915/selftests: Take a VM in kernel_context()

2021-07-08 Thread Jason Ekstrand
This better models where we want to go with contexts in general where things like the VM and engine set are create parameters instead of being set after the fact. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- .../drm/i915/gem/selftests/i915_gem_context.c | 4 ++--

[PATCH 30/30] drm/i915: Finalize contexts in GEM_CONTEXT_CREATE on version 13+

2021-07-08 Thread Jason Ekstrand
All the proto-context stuff for context creation exists to allow older userspace drivers to set VMs and engine sets via SET_CONTEXT_PARAM. Drivers need to update to use CONTEXT_CREATE_EXT_* for this going forward. Force the issue by blocking the old mechanism on any future hardware generations.

[PATCH 29/30] drm/i915/gem: Roll all of context creation together

2021-07-08 Thread Jason Ekstrand
Now that we have the whole engine set and VM at context creation time, we can just assign those fields instead of creating first and handling the VM and engines later. This lets us avoid creating useless VMs and engine sets and lets us get rid of the complex VM setting code. Signed-off-by: Jason

[PATCH 28/30] i915/gem/selftests: Assign the VM at context creation in igt_shared_ctx_exec

2021-07-08 Thread Jason Ekstrand
We want to delete __assign_ppgtt and, generally, stop setting the VM after context creation. This is the one place I could find in the selftests where we set a VM after the fact. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c

[PATCH 25/30] drm/i915/gem: Don't allow changing the VM on running contexts (v4)

2021-07-08 Thread Jason Ekstrand
When the APIs were added to manage VMs more directly from userspace, the questionable choice was made to allow changing out the VM on a context at any time. This is horribly racy and there's absolutely no reason why any userspace would want to do this outside of testing that exact race. By

[PATCH 26/30] drm/i915/gem: Don't allow changing the engine set on running contexts (v3)

2021-07-08 Thread Jason Ekstrand
When the APIs were added to manage the engine set on a GEM context directly from userspace, the questionable choice was made to allow changing the engine set on a context at any time. This is horribly racy and there's absolutely no reason why any userspace would want to do this outside of trying

[PATCH 24/30] drm/i915/gem: Delay context creation (v3)

2021-07-08 Thread Jason Ekstrand
The current context uAPI allows for two methods of setting context parameters: SET_CONTEXT_PARAM and CONTEXT_CREATE_EXT_SETPARAM. The former is allowed to be called at any time while the later happens as part of GEM_CONTEXT_CREATE. Currently, everything settable via one is settable via the

[PATCH 23/30] drm/i915/gt: Drop i915_address_space::file (v2)

2021-07-08 Thread Jason Ekstrand
There's a big comment saying how useful it is but no one is using this for anything anymore. It was added in 2bfa996e031b ("drm/i915: Store owning file on the i915_address_space") and used for debugfs at the time as well as telling the difference between the global GTT and a PPGTT. In

[PATCH 22/30] drm/i915/gem: Return an error ptr from context_lookup

2021-07-08 Thread Jason Ekstrand
We're about to start doing lazy context creation which means contexts get created in i915_gem_context_lookup and we may start having more errors than -ENOENT. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_context.c| 12 ++--

[PATCH 21/30] drm/i915/gem: Use the proto-context to handle create parameters (v5)

2021-07-08 Thread Jason Ekstrand
This means that the proto-context needs to grow support for engine configuration information as well as setparam logic. Fortunately, we'll be deleting a lot of setparam logic on the primary context shortly so it will hopefully balance out. There's an extra bit of fun here when it comes to

[PATCH 20/30] drm/i915/gem: Make an alignment check more sensible

2021-07-08 Thread Jason Ekstrand
What we really want to check is that size of the engines array, i.e. args->size - sizeof(*user) is divisible by the element size, i.e. sizeof(*user->engines) because that's what's required for computing the array length right below the check. However, we're currently not doing this and instead

[PATCH 19/30] drm/i915: Add an i915_gem_vm_lookup helper

2021-07-08 Thread Jason Ekstrand
This is the VM equivalent of i915_gem_context_lookup. It's only used once in this patch but future patches will need to duplicate this lookup code so it's better to have it in a helper. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_context.c |

[PATCH 16/30] drm/i915/gem: Add an intermediate proto_context struct (v5)

2021-07-08 Thread Jason Ekstrand
The current context uAPI allows for two methods of setting context parameters: SET_CONTEXT_PARAM and CONTEXT_CREATE_EXT_SETPARAM. The former is allowed to be called at any time while the later happens as part of GEM_CONTEXT_CREATE. Currently, everything settable via one is settable via the

[PATCH 18/30] drm/i915/gem: Optionally set SSEU in intel_context_set_gem

2021-07-08 Thread Jason Ekstrand
For now this is a no-op because everyone passes in a null SSEU but it lets us get some of the error handling and selftest refactoring plumbed through. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 41 +++

[PATCH 17/30] drm/i915/gem: Rework error handling in default_engines

2021-07-08 Thread Jason Ekstrand
Since free_engines works for partially constructed engine sets, we can use the usual goto pattern. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git

[PATCH 15/30] drm/i915: Add gem/i915_gem_context.h to the docs

2021-07-08 Thread Jason Ekstrand
In order to prevent kernel doc warnings, also fill out docs for any missing fields and fix those that forgot the "@". Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- Documentation/gpu/i915.rst| 2 + .../gpu/drm/i915/gem/i915_gem_context_types.h | 43

[PATCH 08/30] drm/i915: Drop getparam support for I915_CONTEXT_PARAM_ENGINES

2021-07-08 Thread Jason Ekstrand
This has never been used by any userspace except IGT and provides no real functionality beyond parroting back parameters userspace passed in as part of context creation or via setparam. If the context is in legacy mode (where you use I915_EXEC_RENDER and friends), it returns success with zero

[PATCH 14/30] drm/i915/gem: Add a separate validate_priority helper

2021-07-08 Thread Jason Ekstrand
With the proto-context stuff added later in this series, we end up having to duplicate set_priority. This lets us avoid duplicating the validation logic. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 42 + 1 file

[PATCH 09/30] drm/i915/gem: Disallow bonding of virtual engines (v3)

2021-07-08 Thread Jason Ekstrand
This adds a bunch of complexity which the media driver has never actually used. The media driver does technically bond a balanced engine to another engine but the balanced engine only has one engine in the sibling set. This doesn't actually result in a virtual engine. This functionality was

[PATCH 13/30] drm/i915: Stop manually RCU banging in reset_stats_ioctl (v2)

2021-07-08 Thread Jason Ekstrand
As far as I can tell, the only real reason for this is to avoid taking a reference to the i915_gem_context. The cost of those two atomics probably pales in comparison to the cost of the ioctl itself so we're really not buying ourselves anything here. We're about to make context lookup a tiny bit

[PATCH 12/30] drm/i915/gem: Disallow creating contexts with too many engines

2021-07-08 Thread Jason Ekstrand
There's no sense in allowing userspace to create more engines than it can possibly access via execbuf. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH 10/30] drm/i915/gem: Remove engine auto-magic with FENCE_SUBMIT (v2)

2021-07-08 Thread Jason Ekstrand
Even though FENCE_SUBMIT is only documented to wait until the request in the in-fence starts instead of waiting until it completes, it has a bit more magic than that. If FENCE_SUBMIT is used to submit something to a balanced engine, we would wait to assign engines until the primary request was

[PATCH 11/30] drm/i915/request: Remove the hook from await_execution

2021-07-08 Thread Jason Ekstrand
This was only ever used for FENCE_SUBMIT automatic engine selection which was removed in the previous commit. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 3 +- drivers/gpu/drm/i915/i915_request.c | 42

[PATCH 07/30] drm/i915: Implement SINGLE_TIMELINE with a syncobj (v4)

2021-07-08 Thread Jason Ekstrand
This API is entirely unnecessary and I'd love to get rid of it. If userspace wants a single timeline across multiple contexts, they can either use implicit synchronization or a syncobj, both of which existed at the time this feature landed. The justification given at the time was that it would

[PATCH 06/30] drm/i915: Drop the CONTEXT_CLONE API (v2)

2021-07-08 Thread Jason Ekstrand
This API allows one context to grab bits out of another context upon creation. It can be used as a short-cut for setparam(getparam()) for things like I915_CONTEXT_PARAM_VM. However, it's never been used by any real userspace. It's used by a few IGT tests and that's it. Since it doesn't add any

[PATCH 05/30] drm/i915/gem: Return void from context_apply_all

2021-07-08 Thread Jason Ekstrand
None of the callbacks we use with it return an error code anymore; they all return 0 unconditionally. Signed-off-by: Jason Ekstrand Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 26 +++-- 1 file changed, 8 insertions(+), 18 deletions(-) diff

[PATCH 04/30] drm/i915/gem: Set the watchdog timeout directly in intel_context_set_gem (v2)

2021-07-08 Thread Jason Ekstrand
Instead of handling it like a context param, unconditionally set it when intel_contexts are created. For years we've had the idea of a watchdog uAPI floating about. The aim was for media, so that they could set very tight deadlines for their transcodes jobs, so that if you have a corrupt

[PATCH 03/30] drm/i915: Drop I915_CONTEXT_PARAM_NO_ZEROMAP

2021-07-08 Thread Jason Ekstrand
The idea behind this param is to support OpenCL drivers with relocations because OpenCL reserves 0x0 for NULL and, if we placed memory there, it would confuse CL kernels. It was originally sent out as part of a patch series including libdrm [1] and Beignet [2] support. However, the libdrm and

[PATCH 02/30] drm/i915: Stop storing the ring size in the ring pointer (v3)

2021-07-08 Thread Jason Ekstrand
Previously, we were storing the ring size in the ring pointer before it was actually allocated. We would then guard setting the ring size on checking for CONTEXT_ALLOC_BIT. This is error-prone at best and really only saves us a few bytes on something that already burns at least 4K. Instead, this

[PATCH 01/30] drm/i915: Drop I915_CONTEXT_PARAM_RINGSIZE

2021-07-08 Thread Jason Ekstrand
This reverts commit 88be76cdafc7 ("drm/i915: Allow userspace to specify ringsize on construction"). This API was originally added for OpenCL but the compute-runtime PR has sat open for a year without action so we can still pull it out if we want. I argue we should drop it for three reasons: 1.

[PATCH 00/30] drm/i915/gem: ioctl clean-ups (v9)

2021-07-08 Thread Jason Ekstrand
Overview: - This patch series attempts to clean up some of the IOCTL mess we've created over the last few years. The most egregious bit being context mutability. In summary, this series: 1. Drops two never-used context params: RINGSIZE and NO_ZEROMAP 2. Drops the entire CONTEXT_CLONE

Aw: Re: BUG: MTK DRM/HDMI broken on 5.13 (mt7623/bpi-r2)

2021-07-08 Thread Frank Wunderlich
> Gesendet: Donnerstag, 08. Juli 2021 um 11:35 Uhr > Von: "Frank Wunderlich" > i guess not, but is watchdog somehow involved? i ask because i see this on > reboot/poweroff: > > "watchdog: watchdog0: watchdog did not stop!" > > i see this with my 5.13, 5.12-drm (5.12.0+mtk/core drm-patches) and

Re: [PATCH] drm/tegra: gr2d: Explicitly control module reset

2021-07-08 Thread Dmitry Osipenko
08.07.2021 18:13, Dmitry Osipenko пишет: >> #include "drm.h" >> #include "gem.h" >> @@ -19,6 +21,7 @@ struct gr2d_soc { >> struct gr2d { >> struct tegra_drm_client client; >> struct host1x_channel *channel; >> +struct reset_control *rst; > Unused variable? Ah, I haven't noticed

Re: [PATCH] drm/tegra: gr2d: Explicitly control module reset

2021-07-08 Thread Dmitry Osipenko
08.07.2021 17:37, Thierry Reding пишет: > From: Thierry Reding > > As of commit 4782c0a5dd88 ("clk: tegra: Don't deassert reset on enabling > clocks"), module resets are no longer automatically deasserted when the > module clock is enabled. To make sure that the gr2d module continues to > work,

Re: [PATCH 2/2 v3] drm/panel: ws2401: Add driver for WideChips WS2401

2021-07-08 Thread Noralf Trønnes
Den 08.07.2021 01.43, skrev Linus Walleij: > This adds a driver for panels based on the WideChips WS2401 display > controller. This display controller is used in the Samsung LMS380KF01 > display found in the Samsung GT-I8160 (Codina) mobile phone and > possibly others. > > As is common with

[PATCH] drm/tegra: gr2d: Explicitly control module reset

2021-07-08 Thread Thierry Reding
From: Thierry Reding As of commit 4782c0a5dd88 ("clk: tegra: Don't deassert reset on enabling clocks"), module resets are no longer automatically deasserted when the module clock is enabled. To make sure that the gr2d module continues to work, we need to explicitly control the module reset.

Aw: Re: Re: BUG: MTK DRM/HDMI broken on 5.13 (mt7623/bpi-r2)

2021-07-08 Thread Frank Wunderlich
> Gesendet: Donnerstag, 08. Juli 2021 um 14:30 Uhr > Von: "Dafna Hirschfeld" > > i see both messages, but mtk_crtc_ddp_irq is never called and so the other > > 2 not. > > Yes, In my case the irq isr is also not called after resume which cause the > warning > even though "enable_vblank" do get

Re: [PATCH] drm/meson: Convert to Linux IRQ interfaces

2021-07-08 Thread Thomas Zimmermann
Hi Am 08.07.21 um 15:31 schrieb Martin Blumenstingl: Hi Thomas, On Tue, Jul 6, 2021 at 9:45 AM Thomas Zimmermann wrote: Drop the DRM IRQ midlayer in favor of Linux IRQ interfaces. DRM's IRQ helpers are mostly useful for UMS drivers. Modern KMS drivers don't benefit from using it.

Re: [PATCH 1/2] drm/gud: Add Raspberry Pi Pico ID

2021-07-08 Thread Noralf Trønnes
Den 03.07.2021 21.24, skrev Peter Stuge: > Hi Noralf, > > Noralf Trønnes wrote: >> Add VID/PID for the Raspberry Pi Pico implementation. >> Source: https://github.com/notro/gud-pico >> >> +++ b/drivers/gpu/drm/gud/gud_drv.c >> @@ -660,6 +660,7 @@ static int gud_resume(struct usb_interface

Re: [PATCH] drm/meson: Convert to Linux IRQ interfaces

2021-07-08 Thread Martin Blumenstingl
Hi Thomas, On Tue, Jul 6, 2021 at 9:45 AM Thomas Zimmermann wrote: > > Drop the DRM IRQ midlayer in favor of Linux IRQ interfaces. DRM's > IRQ helpers are mostly useful for UMS drivers. Modern KMS drivers > don't benefit from using it. > > Signed-off-by: Thomas Zimmermann Tested-by: Martin

Re: [PATCH 06/7] drm/i915/guc: Optimize CTB writes and reads

2021-07-08 Thread Michal Wajdeczko
On 08.07.2021 01:25, Matthew Brost wrote: > CTB writes are now in the path of command submission and should be > optimized for performance. Rather than reading CTB descriptor values > (e.g. head, tail) which could result in accesses across the PCIe bus, > store shadow local copies and only

[PATCH] dma-heap: Let dma heap use dma_map_attrs to map & unmap iova

2021-07-08 Thread guangming.cao
From: Guangming Cao For dma-heap users, they can't bypass cache sync when map/unmap iova with dma heap. But they can do it by adding DMA_ATTR_SKIP_CPU_SYNC into dma_alloc_attrs. To keep alignment, at dma_heap side, also use dma_buf_attachment.dma_map_attrs to do iova map & unmap.

[PATCH] MAINTAINERS: Add Raphael Gallais-Pou as STM32 DRM maintainer

2021-07-08 Thread Raphael GALLAIS-POU - foss
Add Raphael Gallais-Pou as STM32 DRM maintainer. Signed-off-by: Raphael Gallais-Pou --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 0f1171ceaf8b..4fa3bfc00f57 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6165,6 +6165,7 @@ DRM DRIVERS FOR STM

  1   2   >