Re: [RFC PATCH v3 04/17] drm/i915: Implement bind and unbind of object

2022-08-31 Thread Dave Airlie
On Sun, 28 Aug 2022 at 05:45, Andi Shyti wrote: > > From: Niranjana Vishwanathapura > > Implement the bind and unbind of an object at the specified GPU virtual > addresses. > > Signed-off-by: Niranjana Vishwanathapura > Signed-off-by: Prathap Kumar Valsan > Signed-off-by: Ramalingam C >

Re: [RFC PATCH v3 04/17] drm/i915: Implement bind and unbind of object

2022-08-31 Thread Niranjana Vishwanathapura
On Tue, Aug 30, 2022 at 07:19:17PM +0100, Matthew Auld wrote: On 27/08/2022 20:43, Andi Shyti wrote: From: Niranjana Vishwanathapura Implement the bind and unbind of an object at the specified GPU virtual addresses. Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Prathap Kumar

Re: [Intel-gfx] [RFC PATCH v3 10/17] drm/i915/vm_bind: Implement I915_GEM_EXECBUFFER3 ioctl

2022-08-31 Thread Niranjana Vishwanathapura
On Wed, Aug 31, 2022 at 08:38:48AM +0100, Tvrtko Ursulin wrote: On 27/08/2022 20:43, Andi Shyti wrote: From: Niranjana Vishwanathapura Implement new execbuf3 ioctl (I915_GEM_EXECBUFFER3) which only works in vm_bind mode. The vm_bind mode only works with this new execbuf3 ioctl. The new

Re: [PATCH 15/15] vfio: Add struct device to vfio_device

2022-08-31 Thread Alex Williamson
On Thu, 1 Sep 2022 00:46:51 + "Tian, Kevin" wrote: > > From: Alex Williamson > > Sent: Thursday, September 1, 2022 1:15 AM > > > > On Wed, 31 Aug 2022 06:10:51 + > > "Tian, Kevin" wrote: > > > > > > From: Jason Gunthorpe > > > > Sent: Wednesday, August 31, 2022 7:53 AM > > > > > >

RE: [PATCH 15/15] vfio: Add struct device to vfio_device

2022-08-31 Thread Tian, Kevin
> From: Alex Williamson > Sent: Thursday, September 1, 2022 1:15 AM > > On Wed, 31 Aug 2022 06:10:51 + > "Tian, Kevin" wrote: > > > > From: Jason Gunthorpe > > > Sent: Wednesday, August 31, 2022 7:53 AM > > > > > > On Tue, Aug 30, 2022 at 04:18:38PM -0600, Alex Williamson wrote: > > > >

[PATCH v2 0/4] Allow MMIO regions to be exported through dma-buf

2022-08-31 Thread Jason Gunthorpe
dma-buf has become a way to safely acquire a handle to non-struct page memory that can still have lifetime controlled by the exporter. Notably RDMA can now import dma-buf FDs and build them into MRs which allows for PCI P2P operations. Extend this to allow vfio-pci to export MMIO memory from PCI

[PATCH v2 1/4] dma-buf: Add dma_buf_try_get()

2022-08-31 Thread Jason Gunthorpe
Used to increment the refcount of the dma buf's struct file, only if the refcount is not zero. Useful to allow the struct file's lifetime to control the lifetime of the dmabuf while still letting the driver to keep track of created dmabufs. Signed-off-by: Jason Gunthorpe ---

[PATCH v2 4/4] vfio/pci: Allow MMIO regions to be exported through dma-buf

2022-08-31 Thread Jason Gunthorpe
dma-buf has become a way to safely acquire a handle to non-struct page memory that can still have lifetime controlled by the exporter. Notably RDMA can now import dma-buf FDs and build them into MRs which allows for PCI P2P operations. Extend this to allow vfio-pci to export MMIO memory from PCI

[PATCH v2 3/4] vfio_pci: Do not open code pci_try_reset_function()

2022-08-31 Thread Jason Gunthorpe
FLR triggered by an emulated config space write should not behave differently from a FLR triggered by VFIO_DEVICE_RESET, currently the config space path misses the power management. Consolidate all the call sites to invoke a single function. Signed-off-by: Jason Gunthorpe ---

[PATCH v2 2/4] vfio: Add vfio_device_get()

2022-08-31 Thread Jason Gunthorpe
To increment a reference the caller already holds. Export vfio_device_put() to pair with it. Signed-off-by: Jason Gunthorpe --- drivers/vfio/vfio_main.c | 3 ++- include/linux/vfio.h | 6 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/vfio/vfio_main.c

Re: [PATCH v1 1/4] drm/msm/mdp5: stop overriding drvdata

2022-08-31 Thread Abhinav Kumar
On 8/26/2022 7:23 AM, Dmitry Baryshkov wrote: On 24/08/2022 20:20, Abhinav Kumar wrote: On 8/24/2022 1:29 AM, Dmitry Baryshkov wrote: On Wed, 24 Aug 2022 at 04:25, Abhinav Kumar wrote: On 6/20/2022 2:30 PM, Dmitry Baryshkov wrote: The rest of the code expects that master's device

Re: [PATCH 2/2] drm/format: Split into more granular test cases

2022-08-31 Thread Maíra Canal
Hi Michał Some very minor nits inline, but either way: Reviewed-by: Maíra Canal On 8/31/22 18:56, Michał Winiarski wrote: While we have multiple test cases, most of them check multiple conditions, calling the function that is tested multiple times with different arguments (with comments that

[PATCH] drm/dp: Avoid Reading DPCD_REV Before Native Aux Read

2022-08-31 Thread Fangzhi Zuo
The attempt to read DPCD_REV before any native aux read breaks majority of DP2 compliance. The spec. requires DP_SINK_STATUS to be polled for the reset status DP_INTRA_HOP_AUX_REPLY_INDICATION during the clear training stage. Polling DP_SINK_STATUS each time gets DPCD_REV read first that makes

[PATCH 2/2] drm/format: Split into more granular test cases

2022-08-31 Thread Michał Winiarski
While we have multiple test cases, most of them check multiple conditions, calling the function that is tested multiple times with different arguments (with comments that indicate test case boundary). This usually means that it can be easily converted into multiple test cases. Passing output:

[PATCH 1/2] drm/format: Use appropriate types in expect/assert

2022-08-31 Thread Michał Winiarski
drm_format_info_* functions don't return bool, and the info variable is a pointer. Expecting non-NULL info will cause the test to crash if it is NULL in checks that follow (which dereference it). Use appropriate KUNIT_EXPECT/KUNIT_ASSERT variants. Signed-off-by: Michał Winiarski ---

[PATCH v3 02/11] drm/i915: Read graphics/media/display arch version from hw

2022-08-31 Thread Radhakrishna Sripada
From: Matt Roper Going forward, the hardware teams no longer consider new platforms to have a "generation" in the way we've defined it for past platforms. Instead, each IP block (graphics, media, display) will have their own architecture major.minor versions and stepping ID's which should be

[PATCH v3 03/11] drm/i915: Parse and set stepping for platforms with GMD

2022-08-31 Thread Radhakrishna Sripada
From: José Roberto de Souza The GMD step field do not properly match the current stepping convention that we use(STEP_A0, STEP_A1, STEP_B0...). One platform could have { arch = 12, rel = 70, step = 1 } and the actual stepping is STEP_B0 but without the translation of the step field would mean

[PATCH v3 08/11] drm/i915/mtl: Obtain SAGV values from MMIO instead of GT pcode mailbox

2022-08-31 Thread Radhakrishna Sripada
>From Meteorlake, Latency Level, SAGV bloack time are read from LATENCY_SAGV register instead of the GT driver pcode mailbox. DDR type and QGV information are also to be read from Mem SS registers. v2: - Simplify MTL_MEM_SS_INFO_QGV_POINT macro(MattR) - Nit: Rearrange the bit def's from higher

[PATCH v3 10/11] drm/i915/mtl: Update CHICKEN_TRANS* register addresses

2022-08-31 Thread Radhakrishna Sripada
From: Madhumitha Tolakanahalli Pradeep In Display version 14, Transcoder Chicken Registers are moved from DPRZ to DRPOS to reduce register signal crossings for Unit Interface Optimization. This patch modifies the CHICKEN_TRANS macro to add a DISPLAY_VER check for calculating the correct

[PATCH v3 06/11] drm/i915/mtl: Add display power wells

2022-08-31 Thread Radhakrishna Sripada
From: Imre Deak Add support for display power wells on MTL. The differences from XE_LPD: - The AUX HW block is moved to the PICA block, where the registers are on an always-on power well and the functionality needs to be powered on/off via the AUX_CH_CTL register: [1], [2] - The DDI IO power

[PATCH v3 11/11] drm/i915/mtl: Do not update GV point, mask value

2022-08-31 Thread Radhakrishna Sripada
Display 14 and future platforms do not directly communicate to Pcode via mailbox the SAGV bandwidth information. PM Demand registers are used to communicate display power requirements to the PUnit which would include GV point and mask value. Skip programming GV point and mask values through

[PATCH v3 07/11] drm/i915/mtl: Add DP AUX support on TypeC ports

2022-08-31 Thread Radhakrishna Sripada
From: Imre Deak On MTL TypeC ports the AUX_CH_CTL and AUX_CH_DATA addresses have changed wrt. previous platforms, adjust the code accordingly. Signed-off-by: Imre Deak Signed-off-by: Radhakrishna Sripada --- drivers/gpu/drm/i915/display/intel_dp_aux.c | 45 -

[PATCH v3 01/11] drm/i915: Move display and media IP version to runtime info

2022-08-31 Thread Radhakrishna Sripada
Future platforms can read the IP version from a register and the IP version numbers need not be hard coded in device info. Move the ip version for media and display to runtime info. On platforms where hard coding of IP version is required, update the IP version in __runtime under device_info.

[PATCH v3 04/11] drm/i915/mtl: Define engine context layouts

2022-08-31 Thread Radhakrishna Sripada
From: Matt Roper The part of the media and blitter engine contexts that we care about for setting up an initial state are the same on MTL as they were on DG2 (and PVC), so we need to update the driver conditions to re-use the DG2 context table. For render/compute engines, the part of the

[PATCH v3 09/11] drm/i915/mtl: Update MBUS_DBOX credits

2022-08-31 Thread Radhakrishna Sripada
Display version 14 platforms have different credits values compared to ADL-P. Update the credits based on pipe usage. v2: Simplify DBOX BW Credit definition(MattR) Bspec: 49213 Cc: Jose Roberto de Souza Cc: Matt Roper Original Author: Caz Yokoyama Signed-off-by: José Roberto de Souza

[PATCH v3 05/11] drm/i915/mtl: Add gmbus and gpio support

2022-08-31 Thread Radhakrishna Sripada
Add tables to map the GMBUS pin pairs to GPIO registers and port to DDC. >From spec we have registers GPIO_CTL[1-5] mapped to native display phys and GPIO_CTL[9-12] are mapped to TC ports. v2: - Drop unused GPIO pins(MattR) BSpec: 49306 Cc: Matt Roper Original Author: Brian J Lovin

[PATCH v3 00/11] Initial Meteorlake Support

2022-08-31 Thread Radhakrishna Sripada
The PCI Id's and platform definition are posted earlier. This series adds handful of early enablement patches including support for display power wells, VBT and AUX Channel mapping, PCH and gmbus support, dbus, mbus, sagv and memory bandwidth support. This series also add the support for a new

[PATCH v2] dt-bindings: display: bridge: renesas, dw-hdmi: Add resets property

2022-08-31 Thread Lad Prabhakar
The DWC HDMI blocks on R-Car and RZ/G2 SoC's use resets, so to complete the bindings include resets property. This also fixes the below warning when running dtbs_check: arch/arm64/boot/dts/renesas/r8a774b1-hihope-rzg2n-rev2-ex-idk-1110wr.dtb: hdmi@fead: Unevaluated properties are not allowed

[pull] amdgpu drm-fixes-6.0

2022-08-31 Thread Alex Deucher
Hi Dave, Daniel, Fixes for 6.0. Once again, mainly fixes for new IPs added in 6.0. The following changes since commit b90cb1053190353cc30f0fef0ef1f378ccc063c5: Linux 6.0-rc3 (2022-08-28 15:05:29 -0700) are available in the Git repository at: https://gitlab.freedesktop.org/agd5f/linux.git

[PATCH v2 2/2] drm/plane_helper: Split into parameterized test cases

2022-08-31 Thread Michał Winiarski
The test was constructed as a single function (test case) which checks multiple conditions, calling the function that is tested multiple times with different arguments. This usually means that it can be easily converted into multiple test cases. Split igt_check_plane_state into two parameterized

[PATCH v2 1/2] drm/plane_helper: Print actual/expected values on failure

2022-08-31 Thread Michał Winiarski
Currently the values are printed with debug log level. Adjust the log level and link the output with the test by using kunit_err. Example output: foo: dst: 20x20+10+10, expected: 10x10+0+0 foo: EXPECTATION FAILED at drivers/gpu/drm/tests/drm_plane_helper_test.c:85 Signed-off-by: Michał Winiarski

Re: [linux-next:master] BUILD REGRESSION 7fd22855300e693668c3397771b3a2b3948f827a

2022-08-31 Thread Linus Walleij
laration-of-function-writesl > | |-- > drivers-base-regmap-regmap-mmio.c:error:implicit-declaration-of-function-writesq > | `-- > drivers-base-regmap-regmap-mmio.c:error:implicit-declaration-of-function-writesw Fixed in this patch: https://lore.kernel.org/linux-arch/20220818092059.1038

Re: [PATCH] drm/panel-edp: Fix typo in kerneldoc comment (appers=>appears)

2022-08-31 Thread Sam Ravnborg
Hi Douglas, On Wed, Aug 31, 2022 at 08:03:11AM -0700, Doug Anderson wrote: > Sam, > > On Wed, Jul 20, 2022 at 4:23 PM Douglas Anderson > wrote: > > > > Ever since I got the spell-check working in my editor this one has > > been bugging me. Fix it. > > > > Signed-off-by: Douglas Anderson > >

Re: [PATCH v2 3/5] Makefile.compiler: replace cc-ifversion with compiler-specific macros

2022-08-31 Thread Nathan Chancellor
On Wed, Aug 31, 2022 at 11:44:06AM -0700, Nick Desaulniers wrote: > cc-ifversion is GCC specific. Replace it with compiler specific > variants. Update the users of cc-ifversion to use these new macros. > Provide a helper for checking compiler versions for GCC and Clang > simultaneously, that will

Re: [PATCH] drm/virtio: set fb_modifiers_not_supported

2022-08-31 Thread Daniel Stone
On Wed, 31 Aug 2022 at 20:06, Chia-I Wu wrote: > Without this, the drm core advertises LINEAR modifier which is > incorrect. > > Also userspace virgl does not support modifiers. For example, it causes > chrome on ozone/drm to fail with "Failed to create scanout buffer". > > Fixes: 2af104290da5

Re: [PATCH v2 18/41] drm/connector: Add a function to lookup a TV mode by its name

2022-08-31 Thread Noralf Trønnes
Den 29.08.2022 15.11, skrev Maxime Ripard: > As part of the command line parsing rework coming in the next patches, > > we'll need to lookup drm_connector_tv_mode values by their name, already > > defined in drm_tv_mode_enum_list. > > > > In order to avoid any code duplication, let's do a

[PATCH] drm/virtio: set fb_modifiers_not_supported

2022-08-31 Thread Chia-I Wu
Without this, the drm core advertises LINEAR modifier which is incorrect. Also userspace virgl does not support modifiers. For example, it causes chrome on ozone/drm to fail with "Failed to create scanout buffer". Fixes: 2af104290da5 ("drm: introduce fb_modifiers_not_supported flag in

Re: [PATCH v2] drm/scheduler: quieten kernel-doc warnings

2022-08-31 Thread Randy Dunlap
ping? On 4/4/22 14:58, Andrey Grodzovsky wrote: > Reviewed-by: Andrey Grodzovsky > Andrey > > On 2022-04-04 17:30, Randy Dunlap wrote: >> Fix kernel-doc warnings in gpu_scheduler.h and sched_main.c. >> >> Quashes these warnings: >> >> include/drm/gpu_scheduler.h:332: warning: missing initial

[PULL] drm-misc-fixes

2022-08-31 Thread Thomas Zimmermann
Hi Dave and Daniel, only a single fix from drm-misc this week. Best regards Thomas drm-misc-fixes-2022-08-31: Short summary of fixes pull: * dma-buf/dma-resv: Fence-handling fix The following changes since commit 6b04ce966a738ecdd9294c9593e48513c0dc90aa: nouveau: explicitly wait on the

[linux-next:master] BUILD REGRESSION 7fd22855300e693668c3397771b3a2b3948f827a

2022-08-31 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: 7fd22855300e693668c3397771b3a2b3948f827a Add linux-next specific files for 20220831 Error/Warning reports: https://lore.kernel.org/linux-mm/202209010004.bz0et3lm-...@intel.com https

RE: [PATCH] drm/amd/display: fix indentation in commit_planes_for_stream()

2022-08-31 Thread Deucher, Alexander
[AMD Official Use Only - General] > -Original Message- > From: Mahfooz, Hamza > Sent: Wednesday, August 31, 2022 1:58 PM > To: linux-ker...@vger.kernel.org > Cc: Mahfooz, Hamza ; Wentland, Harry > ; Li, Sun peng (Leo) ; > Siqueira, Rodrigo ; Deucher, Alexander > ; Koenig, Christian > ;

[PATCH] drm/amd/display: fix indentation in commit_planes_for_stream()

2022-08-31 Thread Hamza Mahfooz
Address the following warning: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:3508:9: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 3508 | if (update_type != UPDATE_TYPE_FAST) | ^~ drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc.c:3510:17:

Re: [PATCH 2/2] drm/tests: Change "igt_" prefix to "drm_"

2022-08-31 Thread Jani Nikula
On Wed, 31 Aug 2022, Maíra Canal wrote: > Hi Jani > > On 8/31/22 06:30, Jani Nikula wrote: >> On Tue, 30 Aug 2022, Maíra Canal wrote: >>> With the introduction of KUnit, IGT is no longer the only option to run >>> the DRM unit tests, as the tests can be run through kunit-tool or on >>> real

Re: [PATCH 2/2] drm/tests: Change "igt_" prefix to "drm_"

2022-08-31 Thread Maíra Canal
Hi Jani On 8/31/22 06:30, Jani Nikula wrote: On Tue, 30 Aug 2022, Maíra Canal wrote: With the introduction of KUnit, IGT is no longer the only option to run the DRM unit tests, as the tests can be run through kunit-tool or on real hardware with CONFIG_KUNIT. Therefore, remove the "igt_"

[PATCH v2 8/8] Documentation/gpu: Add Display Core Unit Test documentation

2022-08-31 Thread Maíra Canal
Explain how to run the KUnit tests present in the AMDGPU's Display Core and clarify which architectures and tools can be used to run the tests. Moreover, explains how to add new tests to the existing tests. Signed-off-by: Maíra Canal --- .../gpu/amdgpu/display/display-test.rst | 88

[PATCH v2 7/8] drm/amd/display: Introduce KUnit tests to dc_dmub_srv library

2022-08-31 Thread Maíra Canal
Add unit test to the SubVP feature in order to avoid possible regressions and assure the code robustness. Signed-off-by: Maíra Canal --- drivers/gpu/drm/amd/display/Kconfig | 13 + drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 4 + .../gpu/drm/amd/display/tests/.kunitconfig|

[PATCH v2 6/8] drm/amd/display: Introduce KUnit tests for dcn20_fpu

2022-08-31 Thread Maíra Canal
From: Magali Lemes This commit adds unit tests to the functions dcn20_cap_soc_clocks and dcn21_update_bw_bounding_box from dcn20/dcn20_fpu. Signed-off-by: Magali Lemes Signed-off-by: Maíra Canal --- drivers/gpu/drm/amd/display/tests/Makefile| 3 +-

[PATCH v2 5/8] drm/amd/display: Introduce KUnit to dcn20/display_mode_vba_20 library

2022-08-31 Thread Maíra Canal
The display_mode_vba_20 deals with hundreds of display parameters for the DCN20 and sometimes does it in odd ways. The addition of unit tests intends to assure the quality of the code delivered by HW engineers and, also make it possible to refactor the code decreasing concerns about adding bugs to

[PATCH v2 4/8] drm/amd/display: Introduce KUnit tests to the display_mode_vba library

2022-08-31 Thread Maíra Canal
The display_mode_vba library deals with hundreds of display parameters and sometimes does it in odd ways. The addition of unit tests intends to assure the quality of the code delivered by HW engineers and, also make it possible to refactor the code decreasing concerns about adding bugs to the

[PATCH v2 3/8] drm/amd/display: Introduce KUnit tests to display_rq_dlg_calc_20

2022-08-31 Thread Maíra Canal
From: Isabella Basso This adds tests to the bit encoding format verification functions on the file. They're meant to be simpler so as to provide a proof of concept on testing DML code. Signed-off-by: Isabella Basso Signed-off-by: Maíra Canal --- drivers/gpu/drm/amd/display/Kconfig

[PATCH v2 2/8] drm/amd/display: Introduce KUnit tests to the bw_fixed library

2022-08-31 Thread Maíra Canal
KUnit unifies the test structure and provides helper tools that simplify the development of tests. Basic use case allows running tests as regular processes, which makes easier to run unit tests on a development machine and to integrate the tests in a CI system. This commit introduces a unit test

[PATCH v2 1/8] drm/amd/display: Introduce KUnit tests for fixed31_32 library

2022-08-31 Thread Maíra Canal
From: Tales Aparecida The fixed31_32 library performs a lot of the mathematical operations involving fixed-point arithmetic and the conversion of integers to fixed-point representation. This unit tests intend to assure the proper functioning of the basic mathematical operations of fixed-point

[PATCH v2 0/8] drm/amd/display: Introduce KUnit to Display Mode Library

2022-08-31 Thread Maíra Canal
Hello, This series is version 2 of the introduction of unit testing to the AMDPGU driver [1]. Our main goal is to bring unit testing to the AMD display driver; in particular, we'll focus on the Display Mode Library (DML) for DCN2.0, DMUB, and some of the DCE functions. This implementation

Re: [PATCH 15/15] vfio: Add struct device to vfio_device

2022-08-31 Thread Alex Williamson
On Wed, 31 Aug 2022 06:10:51 + "Tian, Kevin" wrote: > > From: Jason Gunthorpe > > Sent: Wednesday, August 31, 2022 7:53 AM > > > > On Tue, Aug 30, 2022 at 04:18:38PM -0600, Alex Williamson wrote: > > > On Sun, 28 Aug 2022 01:10:37 +0800 > > > Kevin Tian wrote: > > > > > > > From: Yi

Re: [PATCH 1/3] drm/i915: audit bo->resource usage

2022-08-31 Thread Matthew Auld
On 31/08/2022 15:53, Matthew Auld wrote: On 31/08/2022 14:34, Christian König wrote: Am 31.08.22 um 14:50 schrieb Matthew Auld: On 31/08/2022 13:35, Christian König wrote: Am 31.08.22 um 14:06 schrieb Matthew Auld: On 31/08/2022 12:03, Christian König wrote: Am 31.08.22 um 12:37 schrieb

[PATCH] drm/i915/ttm: Abort suspend on i915_ttm_backup failure

2022-08-31 Thread Nirmoy Das
On system suspend when system memory is low then i915_gem_obj_copy_ttm() could fail trying to backup a lmem obj. GEM_WARN_ON() is not enough, suspend shouldn't continue if i915_ttm_backup() throws an error. References: https://gitlab.freedesktop.org/drm/intel/-/issues/6529 Reviewed-by: Matthew

Re: [Intel-gfx] [PATCH] drm/i915/ttm: Abort suspend on i915_ttm_backup failure

2022-08-31 Thread Das, Nirmoy
On 8/31/2022 5:50 PM, Matthew Auld wrote: On 29/08/2022 13:04, Nirmoy Das wrote: On system suspend when system memory is low then i915_gem_obj_copy_ttm() could fail trying to backup a lmem obj. GEM_WARN_ON() is not enough, suspend shouldn't continue if i915_ttm_backup() throws an error.

Re: [PATCH v2 4/6] drm: allow DRM_MODE_PAGE_FLIP_ASYNC for atomic commits

2022-08-31 Thread Ville Syrjälä
On Wed, Aug 31, 2022 at 02:56:12PM +, Simon Ser wrote: > On Wednesday, August 31st, 2022 at 09:50, Pekka Paalanen > wrote: > > > > diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h > > > index 86a292c3185a..cce1a1bea645 100644 > > > --- a/include/uapi/drm/drm_mode.h > >

Re: [PATCH] drm/i915/ttm: Abort suspend on i915_ttm_backup failure

2022-08-31 Thread Matthew Auld
On 29/08/2022 13:04, Nirmoy Das wrote: On system suspend when system memory is low then i915_gem_obj_copy_ttm() could fail trying to backup a lmem obj. GEM_WARN_ON() is not enough, suspend shouldn't continue if i915_ttm_backup() throws an error. Closes:

[PATCH v4 06/21] drm/i915: Prepare to dynamic dma-buf locking specification

2022-08-31 Thread Dmitry Osipenko
Prepare i915 driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions and handling cases where importer now holds the reservation lock. Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 2 +-

[PATCH v4 21/21] dma-buf: Remove obsoleted internal lock

2022-08-31 Thread Dmitry Osipenko
The internal dma-buf lock isn't needed anymore because the updated locking specification claims that dma-buf reservation must be locked by importers, and thus, the internal data is already protected by the reservation lock. Remove the obsoleted internal lock. Acked-by: Christian König

[PATCH v4 18/21] dma-buf: Move dma_buf_mmap() to dynamic locking specification

2022-08-31 Thread Dmitry Osipenko
Move dma_buf_mmap() function to the dynamic locking specification by taking the reservation lock. Neither of the today's drivers take the reservation lock within the mmap() callback, hence it's safe to enforce the locking. Acked-by: Christian König Signed-off-by: Dmitry Osipenko ---

[PATCH v4 10/21] RDMA/umem: Prepare to dynamic dma-buf locking specification

2022-08-31 Thread Dmitry Osipenko
Prepare InfiniBand drivers to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Signed-off-by: Dmitry Osipenko --- drivers/infiniband/core/umem_dmabuf.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git

[PATCH v4 17/21] dma-buf: Move dma_buf_map_attachment() to dynamic locking specification

2022-08-31 Thread Dmitry Osipenko
Move dma-buf attachment mapping functions to the dynamic locking specification by asserting that the reservation lock is held. Signed-off-by: Dmitry Osipenko --- drivers/dma-buf/dma-buf.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/dma-buf/dma-buf.c

[PATCH v4 20/21] media: videobuf2: Stop using internal dma-buf lock

2022-08-31 Thread Dmitry Osipenko
All drivers that use dma-bufs have been moved to the updated locking specification and now dma-buf reservation is guaranteed to be locked by importers during the mapping operations. There is no need to take the internal dma-buf lock anymore. Remove locking from the videobuf2 memory allocators.

[PATCH v4 16/21] dma-buf: Move dma_buf_attach() to dynamic locking specification

2022-08-31 Thread Dmitry Osipenko
Move dma-buf attachment API functions to the dynamic locking specification by taking the reservation lock around the mapping operations. The strict locking convention prevents deadlock situations for dma-buf importers and exporters. Signed-off-by: Dmitry Osipenko --- drivers/dma-buf/dma-buf.c |

[PATCH v4 15/21] dma-buf: Move dma_buf_vmap() to dynamic locking specification

2022-08-31 Thread Dmitry Osipenko
Move dma_buf_vmap/vunmap_unlocked() functions to the dynamic locking specification by asserting that the reservation lock is held. Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/dma-buf/dma-buf.c | 4 1 file changed, 4 insertions(+) diff --git

[PATCH v4 12/21] xen/gntdev: Prepare to dynamic dma-buf locking specification

2022-08-31 Thread Dmitry Osipenko
Prepare gntdev driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Signed-off-by: Dmitry Osipenko --- drivers/xen/gntdev-dmabuf.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH v4 11/21] misc: fastrpc: Prepare to dynamic dma-buf locking specification

2022-08-31 Thread Dmitry Osipenko
Prepare fastrpc to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Signed-off-by: Dmitry Osipenko --- drivers/misc/fastrpc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/misc/fastrpc.c

[PATCH v4 14/21] media: tegra-vde: Prepare to dynamic dma-buf locking specification

2022-08-31 Thread Dmitry Osipenko
Prepare Tegra video decoder driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Signed-off-by: Dmitry Osipenko --- drivers/media/platform/nvidia/tegra-vde/dmabuf-cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3

[PATCH v4 19/21] dma-buf: Document dynamic locking convention

2022-08-31 Thread Dmitry Osipenko
Add documentation for the dynamic locking convention. The documentation tells dma-buf API users when they should take the reservation lock and when not. Signed-off-by: Dmitry Osipenko --- Documentation/driver-api/dma-buf.rst | 6 +++ drivers/dma-buf/dma-buf.c| 64

[PATCH v4 13/21] media: videobuf2: Prepare to dynamic dma-buf locking specification

2022-08-31 Thread Dmitry Osipenko
Prepare V4L2 memory allocators to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Acked-by: Tomasz Figa Signed-off-by: Dmitry Osipenko --- drivers/media/common/videobuf2/videobuf2-dma-contig.c | 11 ++-

[PATCH v4 09/21] drm/etnaviv: Prepare to dynamic dma-buf locking specification

2022-08-31 Thread Dmitry Osipenko
Prepare Etnaviv driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/etnaviv/etnaviv_gem_prime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v4 05/21] drm/armada: Prepare to dynamic dma-buf locking specification

2022-08-31 Thread Dmitry Osipenko
Prepare Armada driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/armada/armada_gem.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH v4 07/21] drm/omapdrm: Prepare to dynamic dma-buf locking specification

2022-08-31 Thread Dmitry Osipenko
Prepare OMAP DRM driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/omapdrm/omap_gem_dmabuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v4 04/21] drm/prime: Prepare to dynamic dma-buf locking specification

2022-08-31 Thread Dmitry Osipenko
Prepare DRM prime core to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/drm_prime.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH v4 08/21] drm/tegra: Prepare to dynamic dma-buf locking specification

2022-08-31 Thread Dmitry Osipenko
Prepare Tegra DRM driver to the common dynamic dma-buf locking convention by starting to use the unlocked versions of dma-buf API functions. Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/tegra/gem.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git

[PATCH v4 01/21] dma-buf: Add unlocked variant of vmapping functions

2022-08-31 Thread Dmitry Osipenko
Add unlocked variant of dma_buf_vmap/vunmap() that will be utilized by drivers that don't take the reservation lock explicitly. Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/dma-buf/dma-buf.c | 38 ++ include/linux/dma-buf.h | 2 ++

[PATCH v4 03/21] drm/gem: Take reservation lock for vmap/vunmap operations

2022-08-31 Thread Dmitry Osipenko
The new common dma-buf locking convention will require buffer importers to hold the reservation lock around mapping operations. Make DRM GEM core to take the lock around the vmapping operations and update DRM drivers to use the locked functions for the case where DRM core now holds the lock. This

[PATCH v4 02/21] dma-buf: Add unlocked variant of attachment-mapping functions

2022-08-31 Thread Dmitry Osipenko
Add unlocked variant of dma_buf_map/unmap_attachment() that will be used by drivers that don't take the reservation lock explicitly. Acked-by: Christian König Signed-off-by: Dmitry Osipenko --- drivers/dma-buf/dma-buf.c | 53 +++ include/linux/dma-buf.h |

[PATCH v4 00/21] Move all drivers to a common dma-buf locking convention

2022-08-31 Thread Dmitry Osipenko
Hello, This series moves all drivers to a dynamic dma-buf locking specification. >From now on all dma-buf importers are made responsible for holding dma-buf's reservation lock around all operations performed over dma-bufs in accordance to the locking specification. This allows us to utilize

Re: [PATCH] drm/panel-edp: Fix typo in kerneldoc comment (appers=>appears)

2022-08-31 Thread Doug Anderson
Sam, On Wed, Jul 20, 2022 at 4:23 PM Douglas Anderson wrote: > > Ever since I got the spell-check working in my editor this one has > been bugging me. Fix it. > > Signed-off-by: Douglas Anderson > --- > > drivers/gpu/drm/panel/panel-edp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH v2 4/6] drm: allow DRM_MODE_PAGE_FLIP_ASYNC for atomic commits

2022-08-31 Thread Simon Ser
On Wednesday, August 31st, 2022 at 09:50, Pekka Paalanen wrote: > > diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h > > index 86a292c3185a..cce1a1bea645 100644 > > --- a/include/uapi/drm/drm_mode.h > > +++ b/include/uapi/drm/drm_mode.h > > @@ -942,6 +942,10 @@ struct

Re: [PATCH 1/3] drm/i915: audit bo->resource usage

2022-08-31 Thread Matthew Auld
On 31/08/2022 14:34, Christian König wrote: Am 31.08.22 um 14:50 schrieb Matthew Auld: On 31/08/2022 13:35, Christian König wrote: Am 31.08.22 um 14:06 schrieb Matthew Auld: On 31/08/2022 12:03, Christian König wrote: Am 31.08.22 um 12:37 schrieb Matthew Auld: [SNIP] That hopefully just

[ANNOUNCE] libdrm 2.4.113

2022-08-31 Thread Simon Ser
Alex Deucher (1): amdgpu: update marketing names for 22.20 Eric Curtin (1): tests/util: Add simpledrm driver Eric Engestrom (9): ci: remove system meson before installing the pip one ci: fix the tested meson version ci/freedesktop: bump python version of docutils

RaspberryPi4 Panic in net_ns_init()

2022-08-31 Thread Maxime Ripard
Hi, Sorry for the fairly broad list of recipients, I'm not entirely sure where the issue lies exactly, and it seems like multiple areas are involved. Martin reported me an issue discovered with the VC4 DRM driver that would prevent the RaspberryPi4 from booting entirely. At boot, and apparently

Re: [PATCH 1/3] drm/i915: audit bo->resource usage

2022-08-31 Thread Christian König
Am 31.08.22 um 14:50 schrieb Matthew Auld: On 31/08/2022 13:35, Christian König wrote: Am 31.08.22 um 14:06 schrieb Matthew Auld: On 31/08/2022 12:03, Christian König wrote: Am 31.08.22 um 12:37 schrieb Matthew Auld: [SNIP] That hopefully just leaves i915_ttm_shrink(), which is swapping

Re: [PATCH] drm: rcar-du: Drop leftovers variables from Makefile

2022-08-31 Thread Kieran Bingham
Quoting Laurent Pinchart (2022-08-27 01:42:20) > Commit 841281fe52a7 ("drm: rcar-du: Drop LVDS device tree backward > compatibility") has removed device tree overlay sources used for > backward compatibility with old bindings, but forgot to remove related > variables from the Makefile. Fix it. >

Re: [PATCH] drm/bridge_connector: enable HPD by default if supported

2022-08-31 Thread Tomi Valkeinen
Hi, On 23/02/2022 19:02, Kieran Bingham wrote: Quoting Laurent Pinchart (2022-02-23 16:25:28) Hello, On Wed, Feb 23, 2022 at 04:17:22PM +, Kieran Bingham wrote: Quoting Laurent Pinchart (2021-12-29 23:44:29) On Sat, Dec 25, 2021 at 09:31:51AM +0300, Nikita Yushchenko wrote: Hotplug

Re: [PATCH 1/3] drm/i915: audit bo->resource usage

2022-08-31 Thread Matthew Auld
On 31/08/2022 13:35, Christian König wrote: Am 31.08.22 um 14:06 schrieb Matthew Auld: On 31/08/2022 12:03, Christian König wrote: Am 31.08.22 um 12:37 schrieb Matthew Auld: [SNIP] That hopefully just leaves i915_ttm_shrink(), which is swapping out shmem ttm_tt and is calling

Re: [PATCH] drm/panfrost: Update io-pgtable API

2022-08-31 Thread Alyssa Rosenzweig
On Tue, Aug 23, 2022 at 11:42:33AM +0100, Robin Murphy wrote: > On 2022-08-23 03:51, Alyssa Rosenzweig wrote: > > > -static size_t get_pgsize(u64 addr, size_t size) > > > +static size_t get_pgsize(u64 addr, size_t size, size_t *count) > > > { > > > - if (addr & (SZ_2M - 1) || size < SZ_2M) > > >

Re: [PATCH] kernel/panic: Drop unblank_screen call

2022-08-31 Thread Sebastian Andrzej Siewior
On 2022-08-30 16:50:04 [+0200], Daniel Vetter wrote: > Long story short, I have no idea why the direct call to unblank_screen > survived for so long (the infrastructure to do it properly existed for > years), nor why it wasn't removed when the console_unblank() call was > finally added. But it

Re: [PATCH 1/3] drm/i915: audit bo->resource usage

2022-08-31 Thread Christian König
Am 31.08.22 um 14:06 schrieb Matthew Auld: On 31/08/2022 12:03, Christian König wrote: Am 31.08.22 um 12:37 schrieb Matthew Auld: [SNIP] That hopefully just leaves i915_ttm_shrink(), which is swapping out shmem ttm_tt and is calling ttm_bo_validate() with empty placements to force the

Re: [PATCH] drm/bridge: sii902x: add support for DRM_BRIDGE_ATTACH_NO_CONNECTOR

2022-08-31 Thread Linus Walleij
On Mon, Aug 29, 2022 at 3:36 PM Neil Armstrong wrote: > On 25/08/2022 14:48, Linus Walleij wrote: > > On Wed, Aug 17, 2022 at 3:31 PM Neil Armstrong > > wrote: > >> On 15/08/2022 02:15, Dmitry Osipenko wrote: > >>> 08.08.2022 12:51, Neil Armstrong пишет: > On 08/08/2022 11:15, Neil

Re: [PATCH 1/3] drm/i915: audit bo->resource usage

2022-08-31 Thread Matthew Auld
On 31/08/2022 12:03, Christian König wrote: Am 31.08.22 um 12:37 schrieb Matthew Auld: [SNIP] That hopefully just leaves i915_ttm_shrink(), which is swapping out shmem ttm_tt and is calling ttm_bo_validate() with empty placements to force the pipeline-gutting path, which importantly

Re: [PATCH linux-next] drm/gem: Remove the unneeded result variable

2022-08-31 Thread Thierry Reding
On Wed, Aug 31, 2022 at 12:25:52PM +0300, Jani Nikula wrote: > On Wed, 31 Aug 2022, cgel@gmail.com wrote: > > From: ye xingchen > > > > Return the value drm_gem_handle_delete() directly instead of storing it > > in another redundant variable. > > Personally, I generally prefer keeping these

[PATCH] drm/simpledrm: Drop superfluous primary plane .atomic_check return logic

2022-08-31 Thread Javier Martinez Canillas
The simpledrm_primary_plane_helper_atomic_check() function is more complex than needed. It first checks drm_atomic_helper_check_plane_state() returns value to decide whether to return this or zero. But it could just return that function return value directly. It also does a check if

Re: [PATCH 2/2] drm/plane_helper: Split into parameterized test cases

2022-08-31 Thread Michał Winiarski
On Fri, Aug 26, 2022 at 07:34:11PM -0300, Maíra Canal wrote: > Hi Michał > > Great patch! Just a few nits inline. > > On 8/25/22 09:48, Michał Winiarski wrote: > > The test was constructed as a single function (test case) which checks > > multiple conditions, calling the function that is tested

Re: [bug report] dma-buf: Add debug option

2022-08-31 Thread Christian König
Hi Yunfei, well it looks like system_heap_dma_buf_begin_cpu_access() is exactly doing what this patch tries to prevent. In other words the dma_heap implementation is doing something which it shouldn't be doing. The patch from Daniel is just surfacing this. Regards, Christian. Am 31.08.22

Re: [PATCH 1/3] drm/i915: audit bo->resource usage

2022-08-31 Thread Christian König
Am 31.08.22 um 12:37 schrieb Matthew Auld: [SNIP] That hopefully just leaves i915_ttm_shrink(), which is swapping out shmem ttm_tt and is calling ttm_bo_validate() with empty placements to force the pipeline-gutting path, which importantly unpopulates the ttm_tt for us (since

  1   2   >