Re: [PATCH 07/13] drm/i915/guc: New definition of the CTB registration action

2021-06-09 Thread Matthew Brost
On Wed, Jun 09, 2021 at 10:07:21PM +0200, Michal Wajdeczko wrote: > > > On 09.06.2021 19:36, John Harrison wrote: > > On 6/7/2021 18:23, Daniele Ceraolo Spurio wrote: > >> On 6/7/2021 11:03 AM, Matthew Brost wrote: > >>> From: Michal Wajdeczko > >>> > >>> Definition of the CTB registration

Re: [Intel-gfx] [PATCH 00/13] Update firmware to v62.0.0

2021-06-09 Thread Matthew Brost
On Wed, Jun 09, 2021 at 09:36:36PM -0700, Matthew Brost wrote: > As part of enabling GuC submission [1] we need to update to the latest > and greatest firmware. This series does that. This is a destructive > change. e.g. Without all the patches in this series it will break the > i915 driver. As

[PATCH 13/13] drm/i915/guc: Update firmware to v62.0.0

2021-06-09 Thread Matthew Brost
From: John Harrison Signed-off-by: John Harrison Signed-off-by: Michal Wajdeczko Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 26 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c

[PATCH 06/13] drm/i915/guc: New definition of the CTB descriptor

2021-06-09 Thread Matthew Brost
From: Michal Wajdeczko Definition of the CTB descriptor has changed, leaving only minimal shared fields like HEAD/TAIL/STATUS. Both HEAD and TAIL are now in dwords. Add some ABI documentation and implement required changes. v2: (Daniele) - Drop GUC_CTB_STATUS_NO_BACKCHANNEL,

[PATCH 12/13] drm/i915/guc: Unified GuC log

2021-06-09 Thread Matthew Brost
From: John Harrison GuC v57 unified the 'DPC' and 'ISR' buffers into a single buffer with the option for it to be larger. Signed-off-by: Matthew Brost Signed-off-by: John Harrison Cc: Alan Previn --- drivers/gpu/drm/i915/gt/uc/intel_guc.c | 15 ---

[PATCH 05/13] drm/i915/guc: Add flag for mark broken CTB

2021-06-09 Thread Matthew Brost
From: Michal Wajdeczko Once CTB descriptor is found in error state, either set by GuC or us, there is no need continue checking descriptor any more, we can rely on our internal flag. Signed-off-by: Matthew Brost Signed-off-by: Michal Wajdeczko Cc: Piotr Piórkowski ---

[PATCH 10/13] drm/i915/guc: Kill guc_clients.ct_pool

2021-06-09 Thread Matthew Brost
From: Michal Wajdeczko CTB pool is now maintained internally by the GuC as part of its "private data". No need to allocate separate buffer and pass it to GuC as yet another ADS. Signed-off-by: Matthew Brost #v4 Signed-off-by: Michal Wajdeczko Cc: Janusz Krzysztofik ---

[PATCH 09/13] drm/i915/doc: Include GuC ABI documentation

2021-06-09 Thread Matthew Brost
From: Michal Wajdeczko GuC ABI documentation is now ready to be included in i915.rst Signed-off-by: Michal Wajdeczko Signed-off-by: Matthew Brost Cc: Piotr Piórkowski --- Documentation/gpu/i915.rst | 8 1 file changed, 8 insertions(+) diff --git a/Documentation/gpu/i915.rst

[PATCH 11/13] drm/i915/guc: Kill ads.client_info

2021-06-09 Thread Matthew Brost
From: Michal Wajdeczko New GuC does not require it any more. Reviewed-by: Matthew Brost Signed-off-by: Michal Wajdeczko Cc: Piotr Piórkowski --- drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c | 7 --- drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h | 8 +--- 2 files changed, 1

[PATCH 03/13] drm/i915/guc: Update CTB response status definition

2021-06-09 Thread Matthew Brost
From: Michal Wajdeczko Format of the STATUS dword in CTB response message now follows definition of the HXG header. Update our code and remove any obsolete legacy definitions. GuC: 55.0.0 Signed-off-by: Matthew Brost Signed-off-by: Michal Wajdeczko Acked-by: Piotr Piórkowski Reviewed-by:

[PATCH 04/13] drm/i915/guc: Support per context scheduling policies

2021-06-09 Thread Matthew Brost
From: John Harrison GuC firmware v53.0.0 introduced per context scheduling policies. This includes changes to some of the ADS structures which are required to load the firmware even if not using GuC submission. Signed-off-by: John Harrison Signed-off-by: Matthew Brost ---

[PATCH 02/13] drm/i915/guc: Update MMIO based communication

2021-06-09 Thread Matthew Brost
From: Michal Wajdeczko The MMIO based Host-to-GuC communication protocol has been updated to use unified HXG messages. Update our intel_guc_send_mmio() function by correctly handle BUSY, RETRY and FAILURE replies. Also update our documentation. Since some of the new MMIO actions may use DATA0

[PATCH 01/13] drm/i915/guc: Introduce unified HXG messages

2021-06-09 Thread Matthew Brost
From: Michal Wajdeczko New GuC firmware will unify format of MMIO and CTB H2G messages. Introduce their definitions now to allow gradual transition of our code to match new changes. Signed-off-by: Matthew Brost Signed-off-by: Michal Wajdeczko Cc: Michał Winiarski ---

[PATCH 07/13] drm/i915/guc: New definition of the CTB registration action

2021-06-09 Thread Matthew Brost
From: Michal Wajdeczko Definition of the CTB registration action has changed. Add some ABI documentation and implement required changes. v2: (Checkpoint) - Fix warnings (Daniele) - Drop FIXME (John H) - Drop value in kernel doc, just use define Signed-off-by: Michal Wajdeczko

[PATCH 08/13] drm/i915/guc: New CTB based communication

2021-06-09 Thread Matthew Brost
From: Michal Wajdeczko Format of the CTB messages has changed: - support for multiple formats - message fence is now part of the header - reuse of unified HXG message formats v2: (Daniele) - Better comment in ct_write() Signed-off-by: Michal Wajdeczko Signed-off-by: Matthew Brost Cc:

[PATCH 00/13] Update firmware to v62.0.0

2021-06-09 Thread Matthew Brost
As part of enabling GuC submission [1] we need to update to the latest and greatest firmware. This series does that. This is a destructive change. e.g. Without all the patches in this series it will break the i915 driver. As such, after we review most of these patches they will squashed into a

Re: [PATCH 08/13] drm/i915/guc: New CTB based communication

2021-06-09 Thread Matthew Brost
On Mon, Jun 07, 2021 at 07:20:01PM -0700, Daniele Ceraolo Spurio wrote: > > > On 6/7/2021 11:03 AM, Matthew Brost wrote: > > From: Michal Wajdeczko > > > > Format of the CTB messages has changed: > > - support for multiple formats > > - message fence is now part of the header > > - reuse

[pull] amdgpu, radeon drm-fixes-5.13

2021-06-09 Thread Alex Deucher
Hi Dave, Daniel, Fixes for 5.13. The following changes since commit 614124bea77e452aa6df7a8714e8bc820b489922: Linux 5.13-rc5 (2021-06-06 15:47:27 -0700) are available in the Git repository at: https://gitlab.freedesktop.org/agd5f/linux.git tags/amd-drm-fixes-5.13-2021-06-09 for you to

Re: [PATCH] drm/amdgpu: use correct rounding macro for 64-bit

2021-06-09 Thread Alex Deucher
On Wed, Jun 9, 2021 at 11:33 PM Dave Airlie wrote: > > On Thu, 10 Jun 2021 at 13:23, Alex Deucher wrote: > > > > On Wed, Jun 9, 2021 at 11:10 PM Dave Airlie wrote: > > > > > > From: Dave Airlie > > > > > > This fixes 32-bit arm build due to lack of 64-bit divides. > > > > > > Fixes:

Re: [PATCH] drm/amdgpu: use correct rounding macro for 64-bit

2021-06-09 Thread Dave Airlie
On Thu, 10 Jun 2021 at 13:23, Alex Deucher wrote: > > On Wed, Jun 9, 2021 at 11:10 PM Dave Airlie wrote: > > > > From: Dave Airlie > > > > This fixes 32-bit arm build due to lack of 64-bit divides. > > > > Fixes: cb1c81467af3 ("drm/ttm: flip the switch for driver allocated > > resources v2") >

Re: [PATCH] drm/amdgpu: use correct rounding macro for 64-bit

2021-06-09 Thread Alex Deucher
On Wed, Jun 9, 2021 at 11:10 PM Dave Airlie wrote: > > From: Dave Airlie > > This fixes 32-bit arm build due to lack of 64-bit divides. > > Fixes: cb1c81467af3 ("drm/ttm: flip the switch for driver allocated resources > v2") > Signed-off-by: Dave Airlie Reviewed-by: Alex Deucher > --- >

[pull] amdgpu, amdkfd, radeon drm-next-5.14

2021-06-09 Thread Alex Deucher
Hi Dave, Daniel, More new stuff for 5.14. The following changes since commit 5745d647d5563d3e9d32013ad4e5c629acff04d7: Merge tag 'amd-drm-next-5.14-2021-06-02' of https://gitlab.freedesktop.org/agd5f/linux into drm-next (2021-06-04 06:13:57 +1000) are available in the Git repository at:

[PATCH] drm/amdgpu: use correct rounding macro for 64-bit

2021-06-09 Thread Dave Airlie
From: Dave Airlie This fixes 32-bit arm build due to lack of 64-bit divides. Fixes: cb1c81467af3 ("drm/ttm: flip the switch for driver allocated resources v2") Signed-off-by: Dave Airlie --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH] ARM: config: Refresh mutli v7

2021-06-09 Thread Joel Stanley
On Wed, 9 Jun 2021 at 09:30, Arnd Bergmann wrote: > > On Tue, Jun 8, 2021 at 6:49 PM Hans Verkuil wrote: > > On 08/06/2021 18:14, Arnd Bergmann wrote: > > > > Right now it is inherent to the driver. It is probably possible to drop > > support > > for video overlay devices if CONFIG_FB=n, but it

Re: [PATCH v10 07/10] mm: Device exclusive memory access

2021-06-09 Thread Alistair Popple
On Thursday, 10 June 2021 2:05:06 AM AEST Peter Xu wrote: > On Wed, Jun 09, 2021 at 07:38:04PM +1000, Alistair Popple wrote: > > On Wednesday, 9 June 2021 4:33:52 AM AEST Peter Xu wrote: > > > On Mon, Jun 07, 2021 at 05:58:52PM +1000, Alistair Popple wrote: [...] > > For thp this means we could

Re: [Intel-gfx] [RFC PATCH 36/97] drm/i915/guc: Add non blocking CTB send function

2021-06-09 Thread Matthew Brost
On Wed, Jun 09, 2021 at 04:14:05PM +0200, Michal Wajdeczko wrote: > > > On 07.06.2021 19:31, Matthew Brost wrote: > > On Thu, May 27, 2021 at 04:11:50PM +0100, Tvrtko Ursulin wrote: > >> > >> On 27/05/2021 15:35, Matthew Brost wrote: > >>> On Thu, May 27, 2021 at 11:02:24AM +0100, Tvrtko Ursulin

Re: [Intel-gfx] [RFC PATCH 36/97] drm/i915/guc: Add non blocking CTB send function

2021-06-09 Thread Matthew Brost
On Tue, Jun 08, 2021 at 10:46:15AM +0200, Daniel Vetter wrote: > On Tue, Jun 8, 2021 at 10:39 AM Tvrtko Ursulin > wrote: > > > > > > On 07/06/2021 18:31, Matthew Brost wrote: > > > On Thu, May 27, 2021 at 04:11:50PM +0100, Tvrtko Ursulin wrote: > > >> > > >> On 27/05/2021 15:35, Matthew Brost

[PATCH] drm/msm/dpu: Avoid ABBA deadlock between IRQ modules

2021-06-09 Thread Bjorn Andersson
Handling of the interrupt callback lists is done in dpu_core_irq.c, under the "cb_lock" spinlock. When these operations results in the need for enableing or disabling the IRQ in the hardware the code jumps to dpu_hw_interrupts.c, which protects its operations with "irq_lock" spinlock. When an

Re: [Intel-gfx] [RFC PATCH 36/97] drm/i915/guc: Add non blocking CTB send function

2021-06-09 Thread Matthew Brost
On Wed, Jun 09, 2021 at 03:58:38PM +0200, Michal Wajdeczko wrote: > > > On 08.06.2021 10:39, Tvrtko Ursulin wrote: > > > > On 07/06/2021 18:31, Matthew Brost wrote: > >> On Thu, May 27, 2021 at 04:11:50PM +0100, Tvrtko Ursulin wrote: > >>> > >>> On 27/05/2021 15:35, Matthew Brost wrote: >

Re: [PATCH v4 2/2] drm/doc: document drm_mode_get_plane

2021-06-09 Thread Leandro Ribeiro
On 6/9/21 8:00 PM, Leandro Ribeiro wrote: > Add a small description and document struct fields of > drm_mode_get_plane. > > Signed-off-by: Leandro Ribeiro > --- > include/uapi/drm/drm_mode.h | 36 > 1 file changed, 36 insertions(+) > > diff --git

[PATCH v4 2/2] drm/doc: document drm_mode_get_plane

2021-06-09 Thread Leandro Ribeiro
Add a small description and document struct fields of drm_mode_get_plane. Signed-off-by: Leandro Ribeiro --- include/uapi/drm/drm_mode.h | 36 1 file changed, 36 insertions(+) diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h index

[PATCH v4 1/2] drm/doc: document how userspace should find out CRTC index

2021-06-09 Thread Leandro Ribeiro
In this patch we add a section to document what userspace should do to find out the CRTC index. This is important as they may be many places in the documentation that need this, so it's better to just point to this section and avoid repetition. Signed-off-by: Leandro Ribeiro ---

[PATCH v4 0/2] Document drm_mode_get_plane

2021-06-09 Thread Leandro Ribeiro
v2: possible_crtcs field is a bitmask, not a pointer. Suggested by Ville Syrjälä v3: document how userspace should find out CRTC index. Also, document that field 'gamma_size' represents the number of entries in the lookup table. Suggested by Pekka Paalanen and Daniel Vetter v4: document IN

Re: [PATCH v3 2/3] dt-bindings: msm: dsi: document phy-type property for 7nm dsi phy

2021-06-09 Thread Rob Herring
On Tue, Jun 08, 2021 at 03:53:28PM -0400, Jonathan Marek wrote: > Document a new phy-type property which will be used to determine whether > the phy should operate in D-PHY or C-PHY mode. > > Signed-off-by: Jonathan Marek > --- > .../devicetree/bindings/display/msm/dsi-phy-7nm.yaml | 4

Re: [PATCH v4 6/6] drm/msm: devcoredump iommu fault support

2021-06-09 Thread Rob Clark
On Tue, Jun 8, 2021 at 8:20 AM Jordan Crouse wrote: > > On Tue, Jun 01, 2021 at 03:47:25PM -0700, Rob Clark wrote: > > From: Rob Clark > > > > Wire up support to stall the SMMU on iova fault, and collect a devcore- > > dump snapshot for easier debugging of faults. > > > > Currently this is

Re: [PATCH v4 5/6] drm/msm: Add crashdump support for stalled SMMU

2021-06-09 Thread Rob Clark
On Tue, Jun 8, 2021 at 8:12 AM Jordan Crouse wrote: > > On Tue, Jun 01, 2021 at 03:47:24PM -0700, Rob Clark wrote: > > From: Rob Clark > > > > For collecting devcoredumps with the SMMU stalled after an iova fault, > > we need to skip the parts of the GPU state which are normally collected > >

[PULL] drm-intel-next

2021-06-09 Thread Rodrigo Vivi
Hi Dave and Daniel, Here goes the last pull request towards 5.14. Mostly it is ADL-P enabling related and a few other things. drm-intel-next-2021-06-09: Cross-subsystem Changes: - x86/gpu: add JasperLake to gen11 early quirks (Although the patch lacks the Ack info, it has been Acked by

[PATCH 5/5] DONOTMERGE: dma-buf: Get rid of dma_fence_get_rcu_safe

2021-06-09 Thread Jason Ekstrand
This helper existed to handle the weird corner-cases caused by using SLAB_TYPESAFE_BY_RCU for backing dma_fence. Now that no one is using that anymore (i915 was the only real user), dma_fence_get_rcu is sufficient. The one slightly annoying thing we have to deal with here is that

[PATCH 4/5] dma-buf: Stop using SLAB_TYPESAFE_BY_RCU in selftests

2021-06-09 Thread Jason Ekstrand
The only real-world user of SLAB_TYPESAFE_BY_RCU was i915 and it doesn't use that anymore so there's no need to be testing it in selftests. Signed-off-by: Jason Ekstrand Cc: Daniel Vetter Cc: Christian König Cc: Matthew Auld Cc: Maarten Lankhorst --- drivers/dma-buf/st-dma-fence-chain.c |

[PATCH 3/5] drm/i915: Stop using SLAB_TYPESAFE_BY_RCU for i915_request

2021-06-09 Thread Jason Ekstrand
Ever since 0eafec6d3244 ("drm/i915: Enable lockless lookup of request tracking via RCU"), the i915 driver has used SLAB_TYPESAFE_BY_RCU (it was called SLAB_DESTROY_BY_RCU at the time) in order to allow RCU on i915_request. As nifty as SLAB_TYPESAFE_BY_RCU may be, it comes with some serious

[PATCH 2/5] drm/i915: Use a simpler scheme for caching i915_request

2021-06-09 Thread Jason Ekstrand
Instead of attempting to recycle a request in to the cache when it retires, stuff a new one in the cache every time we allocate a request for some other reason. Signed-off-by: Jason Ekstrand Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Matthew Auld Cc: Maarten Lankhorst ---

[PATCH 1/5] drm/i915: Move intel_engine_free_request_pool to i915_request.c

2021-06-09 Thread Jason Ekstrand
This appears to break encapsulation by moving an intel_engine_cs function to a i915_request file. However, this function is intrinsically tied to the lifetime rules and allocation scheme of i915_request and having it in intel_engine_cs.c leaks details of i915_request. We have an abstraction leak

[PATCH 0/5] dma-fence, i915: Stop allowing SLAB_TYPESAFE_BY_RCU for dma_fence

2021-06-09 Thread Jason Ekstrand
Ever since 0eafec6d3244 ("drm/i915: Enable lockless lookup of request tracking via RCU"), the i915 driver has used SLAB_TYPESAFE_BY_RCU (it was called SLAB_DESTROY_BY_RCU at the time) in order to allow RCU on i915_request. As nifty as SLAB_TYPESAFE_BY_RCU may be, it comes with some serious

[PATCH v2 7/7] drm/connector: add ref to drm_connector_get in iter docs

2021-06-09 Thread Simon Ser
Mention that connectors need to be referenced manually if they are to be accessed after the iteration has progressed or ended. Signed-off-by: Simon Ser --- include/drm/drm_connector.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/drm/drm_connector.h

[PATCH v2 6/7] i915/display/dp: send a more fine-grained link-status uevent

2021-06-09 Thread Simon Ser
When link-status changes, send a hotplug uevent which contains the connector and property ID. That way, user-space can more easily figure out that only the link-status property of this connector has been updated. Signed-off-by: Simon Ser --- drivers/gpu/drm/i915/display/intel_dp.c | 2 ++ 1

[PATCH v2 5/7] drm/probe-helper: use drm_kms_helper_connector_hotplug_event

2021-06-09 Thread Simon Ser
If an hotplug event only updates a single connector, use drm_kms_helper_connector_hotplug_event instead of drm_kms_helper_hotplug_event. Signed-off-by: Simon Ser --- drivers/gpu/drm/drm_probe_helper.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff --git

[PATCH v2 4/7] amdgpu: use drm_kms_helper_connector_hotplug_event

2021-06-09 Thread Simon Ser
When updating a single connector, use drm_kms_helper_connector_hotplug_event instead of drm_kms_helper_hotplug_event. Signed-off-by: Simon Ser --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 8 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c | 4 ++-- 2 files

[PATCH v2 3/7] drm/connector: use drm_sysfs_connector_hotplug_event

2021-06-09 Thread Simon Ser
In drm_connector_register, use drm_sysfs_connector_hotplug_event instead of drm_sysfs_hotplug_event, because the hotplug event only updates a single connector. Signed-off-by: Simon Ser --- drivers/gpu/drm/drm_connector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v2 2/7] drm/probe-helper: add drm_kms_helper_connector_hotplug_event

2021-06-09 Thread Simon Ser
This function is the same as drm_kms_helper_hotplug_event, but takes a connector instead of a device. Signed-off-by: Simon Ser --- drivers/gpu/drm/drm_probe_helper.c | 23 +++ include/drm/drm_probe_helper.h | 1 + 2 files changed, 24 insertions(+) diff --git

[PATCH v2 1/7] drm/sysfs: introduce drm_sysfs_connector_hotplug_event

2021-06-09 Thread Simon Ser
This function sends a hotplug uevent with a CONNECTOR property. Signed-off-by: Simon Ser --- drivers/gpu/drm/drm_sysfs.c | 25 + include/drm/drm_sysfs.h | 1 + 2 files changed, 26 insertions(+) diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c

[PATCH v2 0/7] drm: add per-connector hotplug events

2021-06-09 Thread Simon Ser
When a uevent only updates a single connector, add a CONNECTOR property to the uevent. This allows user-space to ignore other connectors when handling the uevent. This is purely an optimization, drivers can still send a uevent without the CONNECTOR property. The CONNECTOR property is already set

[RFC 6/6] drm/msm/kms: drop set_encoder_mode callback

2021-06-09 Thread Dmitry Baryshkov
set_encoder_mode callback is completely unused now. Drop it from msm_kms_func(). Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_kms.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_kms.h b/drivers/gpu/drm/msm/msm_kms.h index 086a2d59b8c8..9484e8b62630

[RFC 3/6] drm/msm/mdp5: move mdp5_encoder_set_intf_mode after msm_dsi_modeset_init

2021-06-09 Thread Dmitry Baryshkov
Move a call to mdp5_encoder_set_intf_mode() after msm_dsi_modeset_init(), removing set_encoder_mode callback. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git

[RFC 4/6] drm/msm/dp: stop calling set_encoder_mode callback

2021-06-09 Thread Dmitry Baryshkov
None of the display drivers now implement set_encoder_mode callback. Stop calling it from the modeset init code. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dp/dp_display.c | 18 -- 1 file changed, 18 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_display.c

[RFC 5/6] drm/msm/dsi: stop calling set_encoder_mode callback

2021-06-09 Thread Dmitry Baryshkov
None of the display drivers now implement set_encoder_mode callback. Stop calling it from the modeset init code. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi.c | 2 -- drivers/gpu/drm/msm/dsi/dsi.h | 1 - drivers/gpu/drm/msm/dsi/dsi_manager.c | 12

[RFC 2/6] drm/msm/dpu: support setting up two independent DSI connectors

2021-06-09 Thread Dmitry Baryshkov
Move setting up encoders from set_encoder_mode to _dpu_kms_initialize_dsi() / _dpu_kms_initialize_displayport(). This allows us to support not only "single DSI" and "dual DSI" but also "two independent DSI" configurations. In future this would also help adding support for multiple DP connectors.

[RFC 1/6] drm/msm/dsi: add two helper functions

2021-06-09 Thread Dmitry Baryshkov
Add two helper functions to be used by display drivers for setting up encoders. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi.c | 6 ++ drivers/gpu/drm/msm/dsi/dsi_manager.c | 14 ++ drivers/gpu/drm/msm/msm_drv.h | 12 ++-- 3 files

[RFC 0/6] drm/msm/dpu: add support for idependent DSI config

2021-06-09 Thread Dmitry Baryshkov
This patchseries adds support for independent DSI config to DPU1 display subdriver. This results in ability to drop one of msm_kms_funcs callbacks. This code was tested on RB5 (dpu, dsi). Neither DP nor MDP5 changes were tested (thus the RFC tag).

Re: [PATCH] drm: display: Remove duplicated argument in dcn31

2021-06-09 Thread Alex Deucher
Applied. Thanks! On Wed, Jun 9, 2021 at 2:48 PM Rodrigo Siqueira wrote: > > On 06/09, Wan Jiabing wrote: > > Fix the following coccicheck warning: > > ./drivers/gpu/drm/amd/display/dc/dml/dcn31/display_mode_vba_31.c: > > 3539:12-42: duplicated argument to && or || > >

Re: [PATCH] drm: display: Remove duplicate include in dce110

2021-06-09 Thread Alex Deucher
Applied. Thanks! On Wed, Jun 9, 2021 at 2:43 PM Rodrigo Siqueira wrote: > > On 06/08, Wan Jiabing wrote: > > Fix the following checkincludes.pl warning: > > ./drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c > > 35 #include "dce110_hw_sequencer.h" > > 69 #include

Re: [PATCH] drm/amd/display: use ARRAY_SIZE for base60_refresh_rates

2021-06-09 Thread Alex Deucher
Applied. Thanks! On Wed, Jun 9, 2021 at 6:09 AM Jiapeng Chong wrote: > > Use ARRAY_SIZE instead of dividing sizeof array with sizeof an > element. > > Clean up the following coccicheck warning: > > ./drivers/gpu/drm/amd/display/dc/core/dc_resource.c:448:47-48: WARNING: > Use ARRAY_SIZE. > >

[PATCH] drm/msm/dsi: do not enable PHYs when called for the slave DSI interface

2021-06-09 Thread Dmitry Baryshkov
Move the call to dsi_mgr_phy_enable after checking whether the DSI interface is slave, so that PHY enablement happens together with the host enablement. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi_manager.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff

Re: [PATCH] drm/amd/display: Fix duplicate included clk_mgr.h

2021-06-09 Thread Alex Deucher
Applied. Thanks! On Wed, Jun 9, 2021 at 6:05 AM Jiapeng Chong wrote: > > Clean up the following includecheck warning: > > ./drivers/gpu/drm/amd/display/dc/dcn31/dcn31_hwseq.c: clk_mgr.h is > included more than once. > > No functional change. > > Reported-by: Abaci Robot > Signed-off-by:

[PATCH v4] drm/msm/dsi: add continuous clock support for 7nm PHY

2021-06-09 Thread Dmitry Baryshkov
Unlike previous generations, 7nm PHYs are required to collaborate with the host for conitnuos clock mode. Add changes neccessary to enable continuous clock mode in the 7nm DSI PHYs. Signed-off-by: Dmitry Baryshkov --- Chanes since v3: - Invert the DSI_LANE_CTRL_HS_REQ_SEL_PHY bit logic, as

Re: [PATCH 07/13] drm/i915/guc: New definition of the CTB registration action

2021-06-09 Thread Michal Wajdeczko
On 09.06.2021 19:36, John Harrison wrote: > On 6/7/2021 18:23, Daniele Ceraolo Spurio wrote: >> On 6/7/2021 11:03 AM, Matthew Brost wrote: >>> From: Michal Wajdeczko >>> >>> Definition of the CTB registration action has changed. >>> Add some ABI documentation and implement required changes.

Re: nouveau broken on Riva TNT2 in 5.13.0-rc4: NULL pointer dereference in nouveau_bo_sync_for_device

2021-06-09 Thread Ondrej Zary
On Wednesday 09 June 2021 11:21:05 Christian König wrote: > Am 09.06.21 um 09:10 schrieb Ondrej Zary: > > On Wednesday 09 June 2021, Christian König wrote: > >> Am 09.06.21 um 08:57 schrieb Ondrej Zary: > >>> [SNIP] > Thanks for the heads up. So the problem with my patch is already fixed, >

Re: [PATCH 07/13] drm/i915/guc: New definition of the CTB registration action

2021-06-09 Thread Michal Wajdeczko
On 08.06.2021 03:23, Daniele Ceraolo Spurio wrote: > > > On 6/7/2021 11:03 AM, Matthew Brost wrote: >> From: Michal Wajdeczko >> >> Definition of the CTB registration action has changed. >> Add some ABI documentation and implement required changes. >> >> Signed-off-by: Michal Wajdeczko >>

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

2021-06-09 Thread Matthew Wilcox
On Mon, Jun 07, 2021 at 03:42:19PM -0500, Alex Sierra wrote: > +++ b/include/linux/dax.h > @@ -243,6 +243,16 @@ static inline bool dax_mapping(struct address_space > *mapping) > return mapping->host && IS_DAX(mapping->host); > } > > +static inline bool dax_layout_is_idle_page(struct page

Re: [PATCH] drm: display: Remove duplicated argument in dcn31

2021-06-09 Thread Rodrigo Siqueira
On 06/09, Wan Jiabing wrote: > Fix the following coccicheck warning: > ./drivers/gpu/drm/amd/display/dc/dml/dcn31/display_mode_vba_31.c: > 3539:12-42: duplicated argument to && or || > ./drivers/gpu/drm/amd/display/dc/dml/dcn31/display_mode_vba_31.c: > 5677:87-123: duplicated argument to && or ||

Re: [PATCH] drm: display: Remove duplicate include in dce110

2021-06-09 Thread Rodrigo Siqueira
On 06/08, Wan Jiabing wrote: > Fix the following checkincludes.pl warning: > ./drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c > 35 #include "dce110_hw_sequencer.h" > 69 #include "dce110_hw_sequencer.h" > > > Signed-off-by: Wan Jiabing > --- >

[PATCH] udmabuf: Add support for mapping hugepages (v4)

2021-06-09 Thread Vivek Kasireddy
If the VMM's (Qemu) memory backend is backed up by memfd + Hugepages (hugetlbfs and not THP), we have to first find the hugepage(s) where the Guest allocations are located and then extract the regular 4k sized subpages from them. v2: Ensure that the subpage and hugepage offsets are calculated

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

2021-06-09 Thread Daniel Vetter
On Wed, Jun 09, 2021 at 03:58:26PM +0200, Christian König wrote: > Am 09.06.21 um 15:19 schrieb Daniel Vetter: > > [SNIP] > > > Yeah, we call this the lightweight and the heavyweight tlb flush. > > > > > > The lighweight can be used when you are sure that you don't have any of > > > the > > >

Re: [Intel-gfx] [PATCH 1/1] drm/i915/uc: Use platform specific defaults for GuC/HuC enabling

2021-06-09 Thread Daniele Ceraolo Spurio
On 6/3/2021 9:48 AM, Matthew Brost wrote: From: John Harrison The meaning of 'default' for the enable_guc module parameter has been updated to accurately reflect what is supported on current platforms. So start using the defaults instead of forcing everything off. Although, note that right

Re: [PATCH 06/13] drm/i915/guc: New definition of the CTB descriptor

2021-06-09 Thread Michal Wajdeczko
On 08.06.2021 02:59, Daniele Ceraolo Spurio wrote: > > > On 6/7/2021 11:03 AM, Matthew Brost wrote: >> From: Michal Wajdeczko >> >> Definition of the CTB descriptor has changed, leaving only >> minimal shared fields like HEAD/TAIL/STATUS. >> >> Both HEAD and TAIL are now in dwords. >> >> Add

Re: [PATCH v2 02/10] drm/arm: malidp: Use fourcc_mod_is_vendor() helper

2021-06-09 Thread Daniel Vetter
On Fri, Mar 26, 2021 at 03:51:31PM +0100, Thierry Reding wrote: > From: Thierry Reding > > Rather than open-coding the vendor extraction operation, use the newly > introduced helper macro. > > Signed-off-by: Thierry Reding On the first two patches: Reviewed-by: Daniel Vetter > --- >

Re: [PATCH] drm/nouveau: init the base GEM fields for internal BOs

2021-06-09 Thread Mikko Perttunen
On 6/9/21 8:29 PM, Christian König wrote: TTMs buffer objects are based on GEM objects for quite a while and rely on initializing those fields before initializing the TTM BO. Noveau now doesn't init the GEM object for internally allocated BOs, Nouveau so make sure that we at least

[PATCH 31/31] HACK: Always finalize contexts

2021-06-09 Thread Jason Ekstrand
Only for verifying the previous patch with I-G-T. DO NOT MERGE! --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c index

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

2021-06-09 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/31] drm/i915/gem: Roll all of context creation together

2021-06-09 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/31] i915/gem/selftests: Assign the VM at context creation in igt_shared_ctx_exec

2021-06-09 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 22/31] drm/i915/gem: Return an error ptr from context_lookup

2021-06-09 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 27/31] drm/i915/selftests: Take a VM in kernel_context()

2021-06-09 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 20/31] drm/i915/gem: Make an alignment check more sensible

2021-06-09 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 25/31] drm/i915/gem: Don't allow changing the VM on running contexts (v4)

2021-06-09 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/31] drm/i915/gem: Don't allow changing the engine set on running contexts (v3)

2021-06-09 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/31] drm/i915/gem: Delay context creation (v3)

2021-06-09 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/31] drm/i915/gt: Drop i915_address_space::file (v2)

2021-06-09 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 17/31] drm/i915/gem: Rework error handling in default_engines

2021-06-09 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 21/31] drm/i915/gem: Use the proto-context to handle create parameters (v4)

2021-06-09 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 18/31] drm/i915/gem: Optionally set SSEU in intel_context_set_gem

2021-06-09 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 19/31] drm/i915: Add an i915_gem_vm_lookup helper

2021-06-09 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/31] drm/i915/gem: Add an intermediate proto_context struct (v5)

2021-06-09 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 14/31] drm/i915/gem: Add a separate validate_priority helper

2021-06-09 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 15/31] drm/i915: Add gem/i915_gem_context.h to the docs

2021-06-09 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 13/31] drm/i915: Stop manually RCU banging in reset_stats_ioctl (v2)

2021-06-09 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/31] drm/i915/gem: Disallow creating contexts with too many engines

2021-06-09 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/31] drm/i915/gem: Remove engine auto-magic with FENCE_SUBMIT (v2)

2021-06-09 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/31] drm/i915/request: Remove the hook from await_execution

2021-06-09 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 08/31] drm/i915: Drop getparam support for I915_CONTEXT_PARAM_ENGINES

2021-06-09 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 09/31] drm/i915/gem: Disallow bonding of virtual engines (v3)

2021-06-09 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

  1   2   3   >