Re: [PATCH] video: fbdev: via: check the return value of kstrdup()

2022-02-22 Thread Helge Deller
On 2/21/22 11:37, xkernel.w...@foxmail.com wrote: > From: Xiaoke Wang > > kstrdup() is a memory allocation function which can return NULL when > some internal memory errors happen. It is better to check the return > value of it to catch the error in time during the setup of viafb. > > Signed-off-b

Re: [PATCH 2/2] drm/bridge: Document the expected behaviour of DSI host controllers

2022-02-22 Thread Dave Stevenson
Hi Laurent On Tue, 22 Feb 2022 at 06:22, Laurent Pinchart wrote: > > Hi Dave, > > Thank you for the patch. > > > On Wed, Feb 16, 2022 at 04:59:44PM +, Dave Stevenson wrote: > > The exact behaviour of DSI host controllers is not specified, > > therefore define it. > > > > Signed-off-by: Dave S

Re: [PATCH v3 8/9] drm/tegra: vic: Implement get_streamid_offset

2022-02-22 Thread Mikko Perttunen
On 2/21/22 22:10, Dmitry Osipenko wrote: 21.02.2022 14:44, Mikko Perttunen пишет: On 2/19/22 20:54, Dmitry Osipenko wrote: 19.02.2022 21:49, Dmitry Osipenko пишет: 18.02.2022 14:39, Mikko Perttunen пишет: +static int vic_get_streamid_offset(struct tegra_drm_client *client) +{ +    struct vic

Re: Report 1 in ext4 and journal based on v5.17-rc1

2022-02-22 Thread Jan Kara
On Thu 17-02-22 20:10:03, Byungchul Park wrote: > [7.009608] === > [7.009613] DEPT: Circular dependency has been detected. > [7.009614] 5.17.0-rc1-00014-g8a599299c0cb-dirty #30 Tainted: GW > [7.009616] -

Re: [PATCH v10 3/4] drm/lsdc: add drm driver for loongson display controller

2022-02-22 Thread Maxime Ripard
Hi, On Sun, Feb 20, 2022 at 10:55:53PM +0800, Sui Jingfeng wrote: > +/* lsdc_get_display_timings_from_dtb - Get display timings from the device > tree > + * > + * @np: point to the device node contain the display timings > + * @pptim: point to where the pointer of struct display_timings is store

Re: [PATCH v3 9/9] drm/tegra: Support context isolation

2022-02-22 Thread Mikko Perttunen
On 2/21/22 22:02, Dmitry Osipenko wrote: 21.02.2022 15:06, Mikko Perttunen пишет: On 2/19/22 20:35, Dmitry Osipenko wrote: 18.02.2022 14:39, Mikko Perttunen пишет: +    if (context->memory_context && context->client->ops->get_streamid_offset) { ^^^ +    int offset = context

Re: [PATCH] drm/simpledrm: Add "panel orientation" property on non-upright mounted LCD panels

2022-02-22 Thread Javier Martinez Canillas
Hello Hans, On 2/21/22 23:00, Hans de Goede wrote: > Some devices use e.g. a portrait panel in a standard laptop casing made > for landscape panels. efifb calls drm_get_panel_orientation_quirk() and > sets fb_info.fbcon_rotate_hint to make fbcon rotate the console so that > it shows up-right inste

Re: [PATCH libdrm v2 00/25] Update Tegra support

2022-02-22 Thread Mikko Perttunen
On 2/21/22 22:29, Dmitry Osipenko wrote: 18.02.2022 12:31, Mikko Perttunen пишет: On 2/17/22 21:16, Thierry Reding wrote: ... Reviewed-by: Mikko Perttunen Left one cosmetic comment in the VIC4.0 patch, but overall looks OK. I think it would be fine to have some basic tests in libdrm as well

Re: [PATCH 1/2] drm: Introduce DRM_BRIDGE_OP_UPSTREAM_FIRST to alter bridge init order

2022-02-22 Thread Dave Stevenson
Hi Laurent. Thanks for the review. On Tue, 22 Feb 2022 at 06:34, Laurent Pinchart wrote: > > Hi Dave, > > Thank you for the patch. > > On Wed, Feb 16, 2022 at 04:59:43PM +, Dave Stevenson wrote: > > DSI sink devices typically want the DSI host powered up and configured > > before they are po

[RFC PATCH] drm/panel: simple: panel-dpi: use bus-format to set bpc and bus_format

2022-02-22 Thread Max Krummenacher
Use the new property bus-format to set the enum bus_format and bpc. Completes: commit 4a1d0dbc8332 ("drm/panel: simple: add panel-dpi support") Signed-off-by: Max Krummenacher --- drivers/gpu/drm/panel/panel-simple.c | 32 1 file changed, 32 insertions(+) Relates

RE: [PATCH 1/3] drm/edid: parse multiple CEA extension block

2022-02-22 Thread Lee, Shawn C
On Tue, Feb 22, 2022 at 03:28:17PM +0800, Ville Syrjälä wrote: >On Tue, Feb 22, 2022 at 02:38:17PM +0800, Lee Shawn C wrote: >> Try to find and parse more CEA ext blocks if edid->extensions is >> greater than one. >> >> Cc: Jani Nikula >> Cc: Ville Syrjala >> Cc: Ankit Nautiyal >> Signed-off

Re: [PATCH 0/2] DSI host and peripheral initialisation ordering

2022-02-22 Thread Dave Stevenson
Hi Laurent. On Tue, 22 Feb 2022 at 06:43, Laurent Pinchart wrote: > > Hello, > > On Fri, Feb 18, 2022 at 02:20:19PM +0100, Andrzej Hajda wrote: > > On 16.02.2022 17:59, Dave Stevenson wrote: > > > Hi All > > > > > > Hopefully I've cc'ed all those that have bashed this problem around > > > previo

Re: [RFC][PATCH] Revert "drm/panel-simple: drop use of data-mapping property"

2022-02-22 Thread Max
Am Samstag, den 19.02.2022, 09:37 + schrieb Christoph Niedermaier: > From: Max Krummenacher [mailto:max.oss...@gmail.com] > Sent: Wednesday, February 9, 2022 2:14 PM > > Hi > > > > Am Mittwoch, den 09.02.2022, 00:52 +0100 schrieb Marek Vasut: > > > On 2/8/22 22:27, Christoph Niedermaier wrote:

[PATCH] video: fbdev: via: check the return value of kstrdup()

2022-02-22 Thread xkernel . wang
From: Xiaoke Wang kstrdup() is a memory allocation function which can return NULL when some internal memory errors happen. It is better to check the return value of it to catch the error in time during the setup of viafb. Signed-off-by: Xiaoke Wang --- drivers/video/fbdev/via/viafbdev.c | 10 +

Re: [PATCH 1/2] drm/i915/vlv_dsi: Add DMI quirk for wrong panel modeline in BIOS on Asus TF103C

2022-02-22 Thread Javier Martinez Canillas
Hello Hans, On 2/21/22 23:06, Hans de Goede wrote: > Vtotal is wrong in the BIOS supplied modeline for the DSI panel on > the Asus TF103C leading to the last line of the display being shown > as the first line. > > The factory installed Android has a hardcoded modeline in its kernel, > causing it

Re: [Intel-gfx] [PATCH v5 5/7] drm/i915/gt: Create per-tile RC6 sysfs interface

2022-02-22 Thread Andi Shyti
Hi Tvrtko and Joonas, > > > > > Now tiles have their own sysfs interfaces under the gt/ > > > > > directory. Because RC6 is a property that can be configured on a > > > > > tile basis, then each tile should have its own interface > > > > > > > > > > The new sysfs structure will have a similar lay

Re: [PATCH v5 0/5] drm: exynos: dsi: Convert drm bridge

2022-02-22 Thread Jagan Teki
Hi Marek, On Tue, Feb 22, 2022 at 12:19 PM Jagan Teki wrote: > > On Wed, Feb 2, 2022 at 9:54 PM Jagan Teki wrote: > > > > Hi Marek, > > > > On Fri, Jan 21, 2022 at 6:14 PM Marek Szyprowski > > wrote: > > > > > > Hi Jagan, > > > > > > On 21.01.2022 12:40, Jagan Teki wrote: > > > > On Fri, Jan 21

Re: [PATCH 2/2] drm/i915/vlv_dsi: Add DMI quirk for wrong panel size on Lenovo Yoga Tablet 2 series

2022-02-22 Thread Javier Martinez Canillas
On 2/21/22 23:06, Hans de Goede wrote: > On the Lenovo Yoga Tablet 2 830 / 1050 the VBT contains a bogus > 192mm x 120mm size. This is especially a problem on the 8" 830 version > which uses a 10:16 portrait screen where as the bogus size is 16:10. > > Add a DMI quirk to override the wrong panel s

Re: [PATCH 1/2] drm/i915/vlv_dsi: Add DMI quirk for wrong panel modeline in BIOS on Asus TF103C

2022-02-22 Thread Ville Syrjälä
On Mon, Feb 21, 2022 at 11:06:07PM +0100, Hans de Goede wrote: > Vtotal is wrong in the BIOS supplied modeline for the DSI panel on Please include both the correct and bad modelines in the commit msg. > the Asus TF103C leading to the last line of the display being shown > as the first line. > >

Re: [GIT PULL] exynos-drm-fixes

2022-02-22 Thread Inki Dae
Hi Dave, Seems you missed. Is there any issue? Thanks, Inki Dae 22. 2. 10. 20:07에 Inki Dae 이(가) 쓴 글: > Hi Dave and Daniel, > >Just two fixup series - one is to fix irq chaining issue and other is >regressions to TE-gpio handling. > > Please let me know if there is any problem. > > Tha

Re: [PATCH] drm/stm: ltdc: add support for CRC hashing feature

2022-02-22 Thread yannick Fertre
Hi Raphael, thanks for the patch. Acked-by: Yannick Fertre Best regards On 2/11/22 11:46, Raphaël Gallais-Pou wrote: From: Raphael Gallais-Pou This patch adds the CRC hashing feature supported by some recent hardware versions of the LTDC. This is useful for test suite such as IGT-GPU-tools

Re: [PATCH 1/3] drm/edid: parse multiple CEA extension block

2022-02-22 Thread Jani Nikula
On Tue, 22 Feb 2022, Ville Syrjälä wrote: > On Tue, Feb 22, 2022 at 02:38:17PM +0800, Lee Shawn C wrote: >> Try to find and parse more CEA ext blocks if edid->extensions >> is greater than one. >> >> Cc: Jani Nikula >> Cc: Ville Syrjala >> Cc: Ankit Nautiyal >> Signed-off-by: Lee Shawn C >> -

Re: [PATCH v4 7/9] drm: vkms: Refactor the plane composer to accept new formats

2022-02-22 Thread Pekka Paalanen
On Mon, 21 Feb 2022 22:13:21 -0300 Igor Torrente wrote: > Hi Pekka, > > On 2/21/22 06:18, Pekka Paalanen wrote: > > On Sun, 20 Feb 2022 22:02:12 -0300 > > Igor Torrente wrote: > > > >> Hi Melissa, > >> > >> On 2/9/22 18:45, Melissa Wen wrote: > >>> On 02/08, Igor Torrente wrote: > H

Re: [Intel-gfx] [PATCH v3 08/11] drm/i915: Separate wakeref tracking

2022-02-22 Thread Andrzej Hajda
On 22.02.2022 08:12, Ville Syrjälä wrote: On Tue, Feb 22, 2022 at 12:25:39AM +0100, Andrzej Hajda wrote: -static noinline depot_stack_handle_t +static intel_wakeref_t track_intel_runtime_pm_wakeref(struct intel_runtime_pm *rpm) { - depot_stack_handle_t stack, *stacks; - unsign

Re: [PATCH v2] drm/panel: Select DRM_DP_HELPER for DRM_PANEL_EDP

2022-02-22 Thread Geert Uytterhoeven
On Tue, Feb 8, 2022 at 10:39 AM Geert Uytterhoeven wrote: > On Mon, Feb 7, 2022 at 12:31 PM Thomas Zimmermann wrote: > > As reported in [1], DRM_PANEL_EDP depends on DRM_DP_HELPER. Select > > the option to fix the build failure. The error message is shown > > below. > > > > arm-linux-gnueabihf-

Re: [PATCH 1/3] drm/edid: parse multiple CEA extension block

2022-02-22 Thread Ville Syrjälä
On Tue, Feb 22, 2022 at 11:19:15AM +0200, Jani Nikula wrote: > On Tue, 22 Feb 2022, Ville Syrjälä wrote: > > On Tue, Feb 22, 2022 at 02:38:17PM +0800, Lee Shawn C wrote: > >> Try to find and parse more CEA ext blocks if edid->extensions > >> is greater than one. > >> > >> Cc: Jani Nikula > >> Cc

Re: [Intel-gfx] [PATCH v3 08/11] drm/i915: Separate wakeref tracking

2022-02-22 Thread Ville Syrjälä
On Tue, Feb 22, 2022 at 10:28:33AM +0100, Andrzej Hajda wrote: > > > On 22.02.2022 08:12, Ville Syrjälä wrote: > > On Tue, Feb 22, 2022 at 12:25:39AM +0100, Andrzej Hajda wrote: > >> -static noinline depot_stack_handle_t > >> +static intel_wakeref_t > >> track_intel_runtime_pm_wakeref(struct in

Re: [Intel-gfx] [PATCH 1/3] drm/i915/guc: Limit scheduling properties to avoid overflow

2022-02-22 Thread Tvrtko Ursulin
On 18/02/2022 21:33, john.c.harri...@intel.com wrote: From: John Harrison GuC converts the pre-emption timeout and timeslice quantum values into clock ticks internally. That significantly reduces the point of 32bit overflow. On current platforms, worst case scenario is approximately Where d

Re: [Intel-gfx] [PATCH 0/3] Improve anti-pre-emption w/a for compute workloads

2022-02-22 Thread Tvrtko Ursulin
On 18/02/2022 21:33, john.c.harri...@intel.com wrote: From: John Harrison Compute workloads are inherently not pre-emptible on current hardware. Thus the pre-emption timeout was disabled as a workaround to prevent unwanted resets. Instead, the hang detection was left to the heartbeat and its

Re: [PATCH v3 05/11] lib/ref_tracker: __ref_tracker_dir_print improve printing

2022-02-22 Thread Andrzej Hajda
On 22.02.2022 01:08, Eric Dumazet wrote: On Mon, Feb 21, 2022 at 3:26 PM Andrzej Hajda wrote: To improve readibility of ref_tracker printing following changes readability have been performed: - reports are printed per stack_handle - log is more compact, - added display name for ref_tr

[PATCH] drm/sched: Add device pointer to drm_gpu_scheduler

2022-02-22 Thread Jiawei Gu
Add device pointer so scheduler's printing can use DRM_DEV_ERROR() instead, which makes life easier under multiple GPU scenario. v2: amend all calls of drm_sched_init() v3: fill dev pointer for all drm_sched_init() calls Signed-off-by: Jiawei Gu --- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c |

Re: [PATCH 2/2] drm/doc: add rfc section for small BAR uapi

2022-02-22 Thread Thomas Hellström
On 2/18/22 12:22, Matthew Auld wrote: Add an entry for the new uapi needed for small BAR on DG2+. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Jon Bloomfield Cc: Daniel Vetter Cc: Jordan Justen Cc: Kenneth Graunke Cc: mesa-...@lists.freedesktop.org --- Documentation/gpu/rfc/i91

[PATCH v5 0/4] GuC HWCONFIG with documentation

2022-02-22 Thread Jordan Justen
This is John/Rodrigo's 2 patches with some minor changes, and I added 2 patches. "drm/i915/uapi: Add query for hwconfig blob" was changed: * Rename DRM_I915_QUERY_HWCONFIG_TABLE to DRM_I915_QUERY_HWCONFIG_BLOB as requested by Joonas. * Reword commit message * I added Acked-by to this patc

[PATCH v5 1/4] drm/i915/guc: Add fetch of hwconfig table

2022-02-22 Thread Jordan Justen
From: John Harrison Implement support for fetching the hardware description table from the GuC. The call is made twice - once without a destination buffer to query the size and then a second time to fill in the buffer. Note that the table is only available on ADL-P and later platforms. v5 (of J

[PATCH v5 2/4] drm/i915/uapi: Add query for hwconfig blob

2022-02-22 Thread Jordan Justen
From: Rodrigo Vivi The DRM_I915_QUERY_HWCONFIG_BLOB query item returns a blob of data which it receives from the GuC software. This blob provides some useful data about the hardware for drivers. Although the blob is not fully documented at this time, the basic format is an array of u32 values. T

[PATCH v5 4/4] drm/i915/guc: Verify hwconfig blob matches supported format

2022-02-22 Thread Jordan Justen
i915_drm.h now defines the format of the returned DRM_I915_QUERY_HWCONFIG_BLOB query item. Since i915 receives this from the black box GuC software, it should verify that the data matches that format before sending it to user-space. The verification makes a single simple pass through the blob cont

[PATCH v5 3/4] drm/i915/uapi: Add struct drm_i915_query_hwconfig_blob_item

2022-02-22 Thread Jordan Justen
Also, document DRM_I915_QUERY_HWCONFIG_BLOB with this struct. v3: * Add various changes suggested by Tvrtko v5: * Fix documenation formatting and verified with `make htmldocs` as suggested by Daniel Cc: Daniel Vetter Signed-off-by: Jordan Justen Acked-by: Jon Bloomfield Acked-by: Daniel

Re: [PATCH 0/2] drm/tegra: Fix panel support on Venice 2 and Nyan

2022-02-22 Thread Dmitry Osipenko
20.12.2021 13:48, Thierry Reding пишет: > From: Thierry Reding > > Hi, > > this is an alternative proposal to fix panel support on Venice 2 and > Nyan. Dmitry had proposed a different solution that involved reverting > the I2C/DDC registration order and would complicate things by breaking > the

Re: [Intel-gfx] [PATCH 1/3] drm/i915/guc: Limit scheduling properties to avoid overflow

2022-02-22 Thread Tvrtko Ursulin
On 22/02/2022 09:52, Tvrtko Ursulin wrote: On 18/02/2022 21:33, john.c.harri...@intel.com wrote: From: John Harrison GuC converts the pre-emption timeout and timeslice quantum values into clock ticks internally. That significantly reduces the point of 32bit overflow. On current platforms, w

Re: [PATCH v3 07/11] lib/ref_tracker: remove warnings in case of allocation failure

2022-02-22 Thread Andrzej Hajda
On 22.02.2022 00:54, Eric Dumazet wrote: On Mon, Feb 21, 2022 at 3:26 PM Andrzej Hajda wrote: Library can handle allocation failures. To avoid allocation warnings __GFP_NOWARN has been added everywhere. Moreover GFP_ATOMIC has been replaced with GFP_NOWAIT in case of stack allocation on trac

Re: [PATCH v3 8/9] drm/tegra: vic: Implement get_streamid_offset

2022-02-22 Thread Dmitry Osipenko
22.02.2022 11:27, Mikko Perttunen пишет: > On 2/21/22 22:10, Dmitry Osipenko wrote: >> 21.02.2022 14:44, Mikko Perttunen пишет: >>> On 2/19/22 20:54, Dmitry Osipenko wrote: 19.02.2022 21:49, Dmitry Osipenko пишет: > 18.02.2022 14:39, Mikko Perttunen пишет: >> +static int vic_get_stream

Re: [PATCH] drm/stm: Avoid using val uninitialized in ltdc_set_ycbcr_config()

2022-02-22 Thread Philippe CORNU
On 2/7/22 8:44 PM, Nick Desaulniers wrote: On Mon, Feb 7, 2022 at 8:53 AM Nathan Chancellor wrote: Clang warns: drivers/gpu/drm/stm/ltdc.c:625:2: warning: variable 'val' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized] default: ^~

Re: [PATCH v3 8/9] drm/tegra: vic: Implement get_streamid_offset

2022-02-22 Thread Mikko Perttunen
On 2/22/22 12:46, Dmitry Osipenko wrote: 22.02.2022 11:27, Mikko Perttunen пишет: On 2/21/22 22:10, Dmitry Osipenko wrote: 21.02.2022 14:44, Mikko Perttunen пишет: On 2/19/22 20:54, Dmitry Osipenko wrote: 19.02.2022 21:49, Dmitry Osipenko пишет: 18.02.2022 14:39, Mikko Perttunen пишет: +sta

Re: [PATCH v3 8/9] drm/tegra: vic: Implement get_streamid_offset

2022-02-22 Thread Dmitry Osipenko
22.02.2022 13:54, Mikko Perttunen пишет: > On 2/22/22 12:46, Dmitry Osipenko wrote: >> 22.02.2022 11:27, Mikko Perttunen пишет: >>> On 2/21/22 22:10, Dmitry Osipenko wrote: 21.02.2022 14:44, Mikko Perttunen пишет: > On 2/19/22 20:54, Dmitry Osipenko wrote: >> 19.02.2022 21:49, Dmitry O

Re: [Intel-gfx] [PATCH 2/3] drm/i915/gt: Make the heartbeat play nice with long pre-emption timeouts

2022-02-22 Thread Tvrtko Ursulin
On 18/02/2022 21:33, john.c.harri...@intel.com wrote: From: John Harrison Compute workloads are inherantly not pre-emptible for long periods on current hardware. As a workaround for this, the pre-emption timeout for compute capable engines was disabled. This is undesirable with GuC submission

Re: [Intel-gfx] [PATCH v5 4/4] drm/i915/guc: Verify hwconfig blob matches supported format

2022-02-22 Thread Tvrtko Ursulin
On 22/02/2022 10:36, Jordan Justen wrote: i915_drm.h now defines the format of the returned DRM_I915_QUERY_HWCONFIG_BLOB query item. Since i915 receives this from the black box GuC software, it should verify that the data matches that format before sending it to user-space. The verification ma

Re: [PATCH] dma-buf: check the return value of kstrdup()

2022-02-22 Thread Christian König
Am 22.02.22 um 12:30 schrieb xkernel.w...@foxmail.com: From: Xiaoke Wang kstrdup() is a memory allocation function which can return NULL when some internaly memory errors happen. It is better to check the return value of it to prevent further wrong memory access. Signed-off-by: Xiaoke Wang

Re: [PATCH 7/7] drm/i915: Expose client engine utilisation via fdinfo

2022-02-22 Thread Tvrtko Ursulin
On 19/02/2022 00:51, Umesh Nerlige Ramappa wrote: On Thu, Jan 06, 2022 at 04:55:36PM +, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Similar to AMD commit 874442541133 ("drm/amdgpu: Add show_fdinfo() interface"), using the infrastructure added in previous patches, we add basic client info

Re: [PATCH] drm/i915: make a handful of read-only arrays static const

2022-02-22 Thread Jani Nikula
On Tue, 22 Feb 2022, Colin Ian King wrote: > Don't populate the read-only arrays on the stack but instead make > them static const. Also makes the object code a little smaller. > Reformat the statements to clear up checkpatch warning. > > Signed-off-by: Colin Ian King > --- > drivers/gpu/drm/i91

Re: [PATCH v13 5/5] drm/amdgpu: add drm buddy support to amdgpu

2022-02-22 Thread Christian König
Am 21.02.22 um 17:45 schrieb Arunpravin: - Remove drm_mm references and replace with drm buddy functionalities - Add res cursor support for drm buddy v2(Matthew Auld): - replace spinlock with mutex as we call kmem_cache_zalloc (..., GFP_KERNEL) in drm_buddy_alloc() function - lock dr

Re: [PATCH v13 4/5] drm/amdgpu: move vram inline functions into a header

2022-02-22 Thread Christian König
Am 21.02.22 um 17:45 schrieb Arunpravin: Move shared vram inline functions and structs into a header file Signed-off-by: Arunpravin Patches #1-#3 haven been pushed to drm-misc-next. For this one it might be better to squash that into commit #5 as well since this is otherwise unused. Might

Re: [PATCH] drm: rcar-du: Fix CRTC timings when CMM is used

2022-02-22 Thread Kieran Bingham
Quoting Laurent Pinchart (2021-11-29 22:28:13) > When the CMM is enabled, an offset of 25 pixels must be subtracted from > the HDS (horizontal display start) and HDE (horizontal display end) > registers. Fix the timings calculation, and take this into account in > the mode validation. > > This fix

Re: [PATCH v2 4/5] fbdev: Improve performance of cfb_imageblit()

2022-02-22 Thread Pekka Paalanen
On Mon, 21 Feb 2022 20:54:09 +0100 Thomas Zimmermann wrote: > Improve the performance of sys_imageblit() by manually unrolling sys? > the inner blitting loop and moving some invariants out. The compiler > failed to do this automatically. This change keeps cfb_imageblit() > in sync with sys_imag

[PATCH 00/10] Fix multiple compilation warnings

2022-02-22 Thread Maíra Canal
This patchset intends to deal with a couple of warnings in the AMD graphic drivers. All warnings were generated with Clang and W=1 flag. Maíra Canal (10): drm/amdgpu: Change amdgpu_ras_block_late_init_default function scope drm/amdgpu: Remove tmp unused variable drm/amdgpu: Remove unused get

[PATCH 01/10] drm/amdgpu: Change amdgpu_ras_block_late_init_default function scope

2022-02-22 Thread Maíra Canal
Turn previously global function into a static function to avoid the following Clang warning: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c:2459:5: warning: no previous prototype for function 'amdgpu_ras_block_late_init_default' [-Wmissing-prototypes] int amdgpu_ras_block_late_init_default(struct amdgpu_

[PATCH 02/10] drm/amdgpu: Remove tmp unused variable

2022-02-22 Thread Maíra Canal
The variable tmp is not used in the dce_v6_0_hpd_fini and dce_v8_0_hpd_fini functions. Therefor, the variable is removed in order to avoid the following Clang warnings: drivers/gpu/drm/amd/amdgpu/dce_v6_0.c:331:6: warning: variable 'tmp' set but not used [-Wunused-but-set-variable] u32 tmp;

[PATCH 03/10] drm/amdgpu: Remove unused get_umc_v8_7_channel_index function

2022-02-22 Thread Maíra Canal
Remove get_umc_v8_7_channel_index function, which is not used in the codebase. This was pointed by clang with the following warning: drivers/gpu/drm/amd/amdgpu/umc_v8_7.c:50:24: warning: unused function 'get_umc_v8_7_channel_index' [-Wunused-function] static inline uint32_t get_umc_v8_7_channel_i

[PATCH 04/10] drm/amd/display: Remove unused temp variable

2022-02-22 Thread Maíra Canal
Remove unused temp variable from the dmub_rb_flush_pending function by using arithmetic to remove the loop. The -Wunused-but-set-variable warning was pointed out by Clang with the following warning: drivers/gpu/drm/amd/amdgpu/../display/dmub/inc/dmub_cmd.h:2921:12: warning: variable 'temp' set bu

[PATCH 06/10] drm/amd/display: Remove vupdate_int_entry definition

2022-02-22 Thread Maíra Canal
Remove the vupdate_int_entry definition and utilization to avoid the following warning by Clang: drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn21/irq_service_dcn21.c:410:2: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides] vupdate_no_lock_int_ent

[PATCH 07/10] drm/amd/display: Remove unused dmub_outbox_irq_info_funcs variable

2022-02-22 Thread Maíra Canal
Remove the unused struct irq_source_info_funcs dmub_outbox_irq_info_funcs from the file, which was declared but never hooked up. This was pointed by clang with the following warning: drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn201/irq_service_dcn201.c:141:43: warning: unused variable 'dmub_ou

[PATCH 08/10] drm/amd/display: Remove unused variable

2022-02-22 Thread Maíra Canal
Remove the variable clamshell_closed from the function dcn10_align_pixel_clocks. This was pointed by clang with the following warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn10/dcn10_hw_sequencer.c:2063:7: warning: variable 'clamshell_closed' set but not used [-Wunused-but-set-variable]

[PATCH 09/10] drm/amd/display: Add missing prototypes to dcn201_init

2022-02-22 Thread Maíra Canal
Include the header with the prototype to silence the following clang warning: drivers/gpu/drm/amd/amdgpu/../display/dc/dcn201/dcn201_init.c:127:6: warning: no previous prototype for function 'dcn201_hw_sequencer_construct' [-Wmissing-prototypes] void dcn201_hw_sequencer_construct(struct dc *dc

[PATCH 10/10] drm/amd/display: Turn global functions into static functions

2022-02-22 Thread Maíra Canal
Turn previously global functions into static functions to avoid -Wmissing-prototype warnings, such as: drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn30/irq_service_dcn30.c:50:20: warning: no previous prototype for function 'to_dal_irq_source_dcn30' [-Wmissing-prototypes] enum dc_irq_source to_da

[PATCH v5 00/11] clk: Improve clock range handling

2022-02-22 Thread Maxime Ripard
Hi, This is a follow-up of the discussion here: https://lore.kernel.org/linux-clk/20210319150355.xzw7ikwdaga2dwhv@gilmour/ and here: https://lore.kernel.org/all/20210914093515.260031-1-max...@cerno.tech/ While the initial proposal implemented a new API to temporarily raise and lower clock rates

[PATCH v5 01/11] clk: Introduce Kunit Tests for the framework

2022-02-22 Thread Maxime Ripard
Let's test various parts of the rate-related clock API with the kunit testing framework. Cc: kunit-...@googlegroups.com Suggested-by: Stephen Boyd Signed-off-by: Maxime Ripard --- drivers/clk/.kunitconfig | 1 + drivers/clk/Kconfig | 7 + drivers/clk/Makefile | 1 + drivers/clk/c

[PATCH v5 03/11] clk: Always clamp the rounded rate

2022-02-22 Thread Maxime Ripard
The current core while setting the min and max rate properly in the clk_request structure will not make sure that the requested rate is within these boundaries, leaving it to each and every driver to make sure it is. It's not clear if this was on purpose or not, but this introduces some inconsiste

[PATCH v5 04/11] clk: Use clamp instead of open-coding our own

2022-02-22 Thread Maxime Ripard
The code in clk_set_rate_range() will, if the current rate is outside of the new range, will force it to the minimum or maximum. Since it's running under the condition that the rate is either lower than the minimum, or higher than the maximum, this is equivalent to using clamp, while being less re

[PATCH v5 05/11] clk: Always set the rate on clk_set_range_rate

2022-02-22 Thread Maxime Ripard
When we change a clock minimum or maximum using clk_set_rate_range(), clk_set_min_rate() or clk_set_max_rate(), the current code will only trigger a new rate change if the rate is outside of the new boundaries. However, a clock driver might want to always keep the clock rate to one of its boundary

[PATCH v5 06/11] clk: Add clk_drop_range

2022-02-22 Thread Maxime Ripard
In order to reset the range on a clock, we need to call clk_set_rate_range with a minimum of 0 and a maximum of ULONG_MAX. Since it's fairly inconvenient, let's introduce a clk_drop_range() function that will do just this. Suggested-by: Stephen Boyd Signed-off-by: Maxime Ripard --- drivers/clk/

[PATCH v5 02/11] clk: Enforce that disjoints limits are invalid

2022-02-22 Thread Maxime Ripard
If we were to have two users of the same clock, doing something like: clk_set_rate_range(user1, 1000, 2000); clk_set_rate_range(user2, 3000, 4000); The second call would fail with -EINVAL, preventing from getting in a situation where we end up with impossible limits. However, this is never expli

[PATCH v5 08/11] clk: bcm: rpi: Set a default minimum rate

2022-02-22 Thread Maxime Ripard
The M2MC clock provides the state machine clock for both HDMI controllers. However, if no HDMI monitor is plugged in at boot, its clock rate will be left at 0 by the firmware and will make any register access end up in a CPU stall, even though the clock was enabled. We had some code in the HDMI c

[PATCH v5 07/11] clk: bcm: rpi: Add variant structure

2022-02-22 Thread Maxime Ripard
We only export a bunch of firmware clocks, and some of them require special treatment. This has been do so far using some tests on the clock id in various places, but this is fairly hard to extend and doesn't scale very well. Since we'll need some more cases in the next patches, let's switch to a

[PATCH v5 09/11] clk: bcm: rpi: Run some clocks at the minimum rate allowed

2022-02-22 Thread Maxime Ripard
The core clock and M2MC clocks are shared between some devices (Unicam controllers and the HVS, and the HDMI controllers, respectively) that will have various, varying, requirements depending on their current work load. Since those loads can require a fairly high clock rate in extreme conditions (

[PATCH v5 10/11] drm/vc4: Add logging and comments

2022-02-22 Thread Maxime Ripard
The HVS core clock isn't really obvious, so let's add a bunch more comments and some logging for easier debugging. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_kms.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/v

[PATCH v5 11/11] drm/vc4: hdmi: Remove clock rate initialization

2022-02-22 Thread Maxime Ripard
Now that the clock driver makes sure we never end up with a rate of 0, the HDMI driver doesn't need to care anymore. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 13 - 1 file changed, 13 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/

[PATCH v2] drm/i915: Clarify vma lifetime

2022-02-22 Thread Thomas Hellström
It's unclear what reference the initial vma kref reference refers to. A vma can have multiple weak references, the object vma list, the vm's bound list and the GT's closed_list, and the initial vma reference can be put from lookups of all these lists. With the current implementation this means tha

Re: [PATCH] dma-buf: check the return value of kstrdup()

2022-02-22 Thread Sumit Semwal
Hi Xiaoke, On Tue, 22 Feb 2022 at 17:00, wrote: > > From: Xiaoke Wang > > kstrdup() is a memory allocation function which can return NULL when > some internaly memory errors happen. It is better to check the return > value of it to prevent further wrong memory access. Thanks for the patch; looks

[v2 1/3] drm/edid: parse multiple CEA extension block

2022-02-22 Thread Lee Shawn C
Try to find and parse more CEA ext blocks if edid->extensions is greater than one. v2: add ext_index and look for available CEA block from ext_index in drm_find_cea_extension(). Cc: Jani Nikula Cc: Ville Syrjala Cc: Ankit Nautiyal Signed-off-by: Lee Shawn C --- drivers/gpu/drm/drm_edid.c

[v2 3/3] drm/edid: parse HF-EEODB CEA extension block

2022-02-22 Thread Lee Shawn C
While adding CEA modes, try to get available EEODB block number. Then based on it to parse numbers of ext blocks, retrieve CEA information and add more CEA modes. Signed-off-by: Lee Shawn C --- drivers/gpu/drm/drm_displayid.c | 5 - drivers/gpu/drm/drm_edid.c | 34 ++---

[v2 2/3] drm/edid: read HF-EEODB ext block

2022-02-22 Thread Lee Shawn C
Support to read HF_EEODB block that request by HDMI 2.1 specification. Signed-off-by: Lee Shawn C --- drivers/gpu/drm/drm_connector.c | 5 ++- drivers/gpu/drm/drm_edid.c | 76 ++--- include/drm/drm_edid.h | 2 + 3 files changed, 77 insertions(+), 6 del

Re: [PATCH v10 3/4] drm/lsdc: add drm driver for loongson display controller

2022-02-22 Thread Sui Jingfeng
On 2022/2/22 16:27, Maxime Ripard wrote: Hi, On Sun, Feb 20, 2022 at 10:55:53PM +0800, Sui Jingfeng wrote: +/* lsdc_get_display_timings_from_dtb - Get display timings from the device tree + * + * @np: point to the device node contain the display timings + * @pptim: point to where the pointer

[PATCH i-g-t 00/11] Per client GPU utilisation

2022-02-22 Thread Tvrtko Ursulin
From: Tvrtko Ursulin This series contains four main components: 1. Per client support for intel_gpu_top. 2. IGT test for per client data exposed via fdinfo from i915. 3. Extracting intel_gpu_top code into shared IGT libraries - which makes possible to write: 4. Vendor agnostic rudimentar

[PATCH i-g-t 01/11] lib: Helper library for parsing i915 fdinfo output

2022-02-22 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Tests and intel_gpu_top will share common code for parsing this file. Signed-off-by: Tvrtko Ursulin --- lib/igt_drm_fdinfo.c | 183 +++ lib/igt_drm_fdinfo.h | 48 lib/meson.build | 7 ++ 3 files changed, 238 inse

[PATCH i-g-t 03/11] intel-gpu-top: Add support for per client stats

2022-02-22 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Use the i915 exported data in /proc//fdinfo to show GPU utilization per DRM client. Example of the output: intel-gpu-top: Intel Tigerlake (Gen12) @ /dev/dri/card0 - 220/ 221 MHz 70% RC6; 0.62/ 7.08 W; 760 irqs/s ENGINES BUSY

[PATCH i-g-t 05/11] libdrmfdinfo: Allow specifying custom engine map

2022-02-22 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Instead of hard coding the engine names, allow a map of names to indices to either be passed in or it gets auto-detected (less efficient) while parsing. Signed-off-by: Tvrtko Ursulin --- lib/igt_drm_clients.c | 7 +++--- lib/igt_drm_clients.h | 3 ++- lib/igt_drm_fdi

[PATCH i-g-t 08/11] libdrmfdinfo: Track largest engine index

2022-02-22 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Prep code for incoming work. Signed-off-by: Tvrtko Ursulin --- lib/igt_drm_fdinfo.c | 2 ++ lib/igt_drm_fdinfo.h | 1 + 2 files changed, 3 insertions(+) diff --git a/lib/igt_drm_fdinfo.c b/lib/igt_drm_fdinfo.c index 96a8b768a4b1..964c6b708960 100644 --- a/lib/igt_drm_fdin

[PATCH i-g-t 06/11] libdrmclients: Record client drm minor

2022-02-22 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Prepare for supporting clients belonging to multiple DRM cards by storing the DRM minor in the client record. Signed-off-by: Tvrtko Ursulin --- lib/igt_drm_clients.c | 33 - lib/igt_drm_clients.h | 6 -- 2 files changed, 24 insertions(+

[PATCH i-g-t 04/11] lib: Extract igt_drm_clients from intel_gpu_top

2022-02-22 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Code movement with some improvements to prepare for further work in making a vendor agnostic gputop tool possible. Signed-off-by: Tvrtko Ursulin --- lib/igt_drm_clients.c | 386 +++ lib/igt_drm_clients.h | 102 + lib/meson.build |

[PATCH i-g-t 02/11] tests/i915/drm_fdinfo: Basic and functional tests for GPU busyness exported via fdinfo

2022-02-22 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Mostly inherited from the perf_pmu, some basic tests, and some tests to verify exported GPU busyness is as expected. Signed-off-by: Tvrtko Ursulin --- tests/i915/drm_fdinfo.c | 555 tests/meson.build | 8 + 2 files changed,

[PATCH i-g-t 07/11] libdrmclient: Support multiple DRM cards

2022-02-22 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Require DRM minor match during client lookup. Signed-off-by: Tvrtko Ursulin --- lib/igt_drm_clients.c | 14 -- lib/igt_drm_clients.h | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/lib/igt_drm_clients.c b/lib/igt_drm_clients.c index 1164

[PATCH i-g-t 10/11] libdrmclient: Enforce client status sort order in the library

2022-02-22 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Some libdrmclient operations require that inactive clients are last in the list. Rather than relying on callers of the library sort routine to implement their comparison callbacks correctly, enforce this order directly in the library and let callers comparison callbacks conce

[PATCH i-g-t 09/11] libdrmclient/intel_gpu_top: Decouple hardcoded engine assumptions

2022-02-22 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Intel_gpu_top gets it's main engine configuration data via PMU probe and uses that for per client view as well. Furthemore code so far assumed only clients belonging from a single DRM card would be tracked in a single clients list. Break this inter-dependency by moving the e

[PATCH i-g-t 11/11] gputop: Basic vendor agnostic GPU top tool

2022-02-22 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Rudimentary vendor agnostic example of how lib_igt_drm_clients can be used to display a sorted by card and usage list of processes using GPUs. Signed-off-by: Tvrtko Ursulin Cc: Rob Clark --- tools/gputop.c| 276 ++ tools/mes

Re: [PATCH v2 13/22] drm/nouveau/kms: Remove redundant zpos initialisation

2022-02-22 Thread Maxime Ripard
Hi, On Mon, Feb 21, 2022 at 05:42:36PM +0100, Karol Herbst wrote: > On Mon, Feb 21, 2022 at 11:00 AM Maxime Ripard wrote: > > > > The nouveau KMS driver will call drm_plane_create_zpos_property() with > > an init value depending on the plane purpose. > > > > Since the initial value wasn't carried

[PATCH] drm/i915: Check input parameter for NULL

2022-02-22 Thread Yongzhi Liu
[why] i915_gem_object_put_pages_phys() frees pages and standard pattern is to allow caller to not care if it's NULL or not. This will reduce burden on the callers to perform this check. [how] Fix it by adding Null check. Signed-off-by: Yongzhi Liu --- drivers/gpu/drm/i915/gem/i915_gem_phys.c |

Re: [PATCH v10 3/4] drm/lsdc: add drm driver for loongson display controller

2022-02-22 Thread Sui Jingfeng
On 2022/2/22 16:27, Maxime Ripard wrote: + if (!of_device_is_available(output)) { + of_node_put(output); + drm_info(ddev, "connector%d is not available\n", index); + return NULL; + } + + disp_tims_np = of_get_child_by_name(output, "dis

[PATCH 0/7] drm/i915: Use the memcpy_from_wc function from drm

2022-02-22 Thread Balasubramani Vivekanandan
drm_memcpy_from_wc() performs fast copy from WC memory type using non-temporal instructions. Now there are two similar implementations of this function. One exists in drm_cache.c as drm_memcpy_from_wc() and another implementation in i915/i915_memcpy.c as i915_memcpy_from_wc(). drm_memcpy_from_wc()

[PATCH 1/7] drm: Relax alignment constraint for destination address

2022-02-22 Thread Balasubramani Vivekanandan
There is no need for the destination address to be aligned to 16 byte boundary to be able to use the non-temporal instructions while copying. Non-temporal instructions are used only for loading from the source address which has alignment constraints. We only need to take care of using the right ins

[PATCH 2/7] drm: Add drm_memcpy_from_wc() variant which accepts destination address

2022-02-22 Thread Balasubramani Vivekanandan
Fast copy using non-temporal instructions for x86 currently exists at two locations. One is implemented in i915 driver at i915/i915_memcpy.c and another copy at drm_cache.c. The plan is to remove the duplicate implementation in i915 driver and use the functions from drm_cache.c. A variant of drm_m

[PATCH 3/7] drm/i915: use the memcpy_from_wc call from the drm

2022-02-22 Thread Balasubramani Vivekanandan
memcpy_from_wc functions in i915_memcpy.c will be removed and replaced by the implementation in drm_cache.c. Updated to use the functions provided by drm_cache.c. Signed-off-by: Balasubramani Vivekanandan --- drivers/gpu/drm/i915/gem/i915_gem_object.c | 8 1 file changed, 4 insertions(+

  1   2   3   >