[PATCH] [next] i915/gvt: remove hardcoded value on crc32_start calculation

2022-10-29 Thread Paulo Miguel Almeida
struct gvt_firmware_header has a crc32 member in which all members that come after the that field are used to calculate it. The previous implementation added the value '4' (crc32's u32 size) to calculate the crc32_start offset which came across as a bit cryptic until you take a deeper look at the

Re: [PATCH v1] drm: rockchip: remove rockchip_drm_framebuffer_init() function

2022-10-29 Thread Heiko Stuebner
On Wed, 19 Oct 2022 23:35:03 +0200, Johan Jonker wrote: > The function rockchip_drm_framebuffer_init() was in use > in the rockchip_drm_fbdev.c file, but that is now replaced > by a generic fbdev setup. Reduce the image size by > removing the rockchip_drm_framebuffer_init() and sub function >

Re: [PATCH] drm/rockchip: use pm_runtime_resume_and_get() instead of pm_runtime_get_sync()

2022-10-29 Thread Heiko Stuebner
On Wed, 15 Jun 2022 06:26:44 +, Yuan Can wrote: > Replace pm_runtime_get_sync() with pm_runtime_resume_and_get() to avoid > device usage counter leak. > > Applied, thanks! [1/1] drm/rockchip: use pm_runtime_resume_and_get() instead of pm_runtime_get_sync() commit:

Re: (subset) [PATCH -next 0/2] fix PM usage counter unbalance

2022-10-29 Thread Heiko Stuebner
On Thu, 22 Sep 2022 21:21:05 +0800, Zhang Qilong wrote: > pm_runtime_get_sync will increment pm usage counter even it failed. > Forgetting to putting operation will result in reference leak here. > We fix it by replacing it with the newest pm_runtime_resume_and_get > to keep usage counter

Re: [PATCH] drm/rockchip: dsi: Remove the unused function dsi_update_bits()

2022-10-29 Thread Heiko Stuebner
On Mon, 17 Oct 2022 16:43:30 +0800, Jiapeng Chong wrote: > The function dsi_update_bits() is defined in the dw-mipi-dsi-rockchip.c > file, but not called elsewhere, so delete this unused function. > > drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c:367:20: warning: unused > function

Re: [PATCH] drm/rockchip: vop2: Register Esmart0-win0 as primary plane

2022-10-29 Thread Heiko Stuebner
On Mon, 26 Sep 2022 10:16:43 +0200, Sascha Hauer wrote: > Esmart0-win0 could serve as primary plane, so mark it as such. On > RK3568 this window will never be used as primary plane, because the > three windows at the beginning of the rk3568_vop_win_data[] array > will be used. On RK3566 however,

Re: [PATCH v3 1/4] dt-bindings: vendor-prefixes: Add prefix for ClockworkPi

2022-10-29 Thread Samuel Holland
Hi Max, On 9/17/22 22:44, Max Fierke wrote: > Add a prefix for Clockwork Tech LLC, known as ClockworkPi. They > produce a number of hobbyist devices, including the ClockworkPi > DevTerm and GameShell. > > Signed-off-by: Max Fierke > Acked-by: Krzysztof Kozlowski > --- >

Re: [PATCH] staging: fbtft: Use ARRAY_SIZE() to get argument count

2022-10-29 Thread Julia Lawall
On Sat, 29 Oct 2022, Deepak R Varma wrote: > On Sat, Oct 29, 2022 at 09:32:50AM +0200, Greg Kroah-Hartman wrote: > > On Fri, Oct 28, 2022 at 07:00:05PM +0530, Deepak R Varma wrote: > > > The ARRAY_SIZE(foo) macro should be preferred over sizeof operator > > > based computation such as

Re: [PATCH] staging: fbtft: Use ARRAY_SIZE() to get argument count

2022-10-29 Thread Deepak R Varma
On Sat, Oct 29, 2022 at 09:32:50AM +0200, Greg Kroah-Hartman wrote: > On Fri, Oct 28, 2022 at 07:00:05PM +0530, Deepak R Varma wrote: > > The ARRAY_SIZE(foo) macro should be preferred over sizeof operator > > based computation such as sizeof(foo)/sizeof(foo[0]) for finding > > number of elements

Re: [PATCH 2/9] drm/i915: Use kmap_local_page() in gem/i915_gem_pyhs.c

2022-10-29 Thread Fabio M. De Francesco
On lunedì 17 ottobre 2022 11:37:18 CEST Zhao Liu wrote: > From: Zhao Liu > > The use of kmap_atomic() is being deprecated in favor of > kmap_local_page()[1]. > > The main difference between atomic and local mappings is that local > mappings doesn't disable page faults or preemption. > > In

Re: [PATCH 1/2] drm/rockchip: dsi: Clean up 'usage_mode' when failing to attach

2022-10-29 Thread Heiko Stuebner
On Wed, 19 Oct 2022 17:03:48 -0700, Brian Norris wrote: > If we fail to attach the first time (especially: EPROBE_DEFER), we fail > to clean up 'usage_mode', and thus will fail to attach on any subsequent > attempts, with "dsi controller already in use". > > Re-set to DW_DSI_USAGE_IDLE on attach

Re: [PATCH] drm/rockchip: fix fbdev on non-IOMMU devices

2022-10-29 Thread Heiko Stuebner
On Thu, 20 Oct 2022 19:12:47 +0100, John Keeping wrote: > When switching to the generic fbdev infrastructure, it was missed that > framebuffers were created with the alloc_kmap parameter to > rockchip_gem_create_object() set to true. The generic infrastructure > calls this via the .dumb_create()

Re: [PATCH] drm/rockchip: dw_hdmi: filter regulator -EPROBE_DEFER error messages

2022-10-29 Thread Heiko Stuebner
On Mon, 26 Sep 2022 22:37:52 +0200, Aurelien Jarno wrote: > When the avdd-0v9 or avdd-1v8 supply are not yet available, EPROBE_DEFER > is returned by rockchip_hdmi_parse_dt(). This causes the following error > message to be printed multiple times: > > dwhdmi-rockchip fe0a.hdmi:

Re: [PATCH] drm/rockchip: dsi: Fix VOP selection on SoCs that support it

2022-10-29 Thread Heiko Stuebner
On Sun, 23 Oct 2022 18:07:47 +0200, Ondrej Jirman wrote: > lcdsel_grf_reg is defined as u32, so "< 0" comaprison is always false, > which breaks VOP selection on eg. RK3399. Compare against 0. > > Applied, thanks! [1/1] drm/rockchip: dsi: Fix VOP selection on SoCs that support it commit:

Re: [PATCH 0/2] drm/rockchip: vop2: fix IOMMU warnings after reenable

2022-10-29 Thread Heiko Stuebner
On Fri, 28 Oct 2022 11:52:04 +0200, Michael Tretter wrote: > I was observing a lot of warnings that the IOMMU has blocked accessed by the > VOP2 when I disabled and reenabled the VOP2 by shutting down a DRM user space > application (namely Weston) and restarting it. > > The reason for the

Re: [RFC PATCH 1/3] drm: Introduce color fill properties for drm plane

2022-10-29 Thread Dmitry Baryshkov
On 29/10/2022 01:59, Jessica Zhang wrote: Add support for COLOR_FILL and COLOR_FILL_FORMAT properties for drm_plane. In addition, add support for setting and getting the values of these properties. COLOR_FILL represents the color fill of a plane while COLOR_FILL_FORMAT represents the format of

Re: [RFC PATCH 3/3] drm/msm/dpu: Use color_fill property for DPU planes

2022-10-29 Thread Dmitry Baryshkov
On 29/10/2022 01:59, Jessica Zhang wrote: Initialize and use the color_fill properties for planes in DPU driver. In addition, relax framebuffer requirements within atomic commit path and add checks for NULL framebuffers. Signed-off-by: Jessica Zhang ---

Re: [RFC PATCH 2/3] drm: Adjust atomic checks for solid fill color

2022-10-29 Thread Dmitry Baryshkov
On 29/10/2022 01:59, Jessica Zhang wrote: Loosen the requirements for atomic and legacy commit so that, in cases where solid fill planes is enabled (and FB_ID is NULL), the commit can still go through. In addition, add framebuffer NULL checks in other areas to account for FB being NULL when

Re: [RFC PATCH 1/3] drm: Introduce color fill properties for drm plane

2022-10-29 Thread Dmitry Baryshkov
On 29/10/2022 01:59, Jessica Zhang wrote: Add support for COLOR_FILL and COLOR_FILL_FORMAT properties for drm_plane. In addition, add support for setting and getting the values of these properties. COLOR_FILL represents the color fill of a plane while COLOR_FILL_FORMAT represents the format of

Re: [PATCH 1/9] drm/i915: Use kmap_local_page() in gem/i915_gem_object.c

2022-10-29 Thread Fabio M. De Francesco
On lunedì 17 ottobre 2022 11:37:17 CEST Zhao Liu wrote: > From: Zhao Liu > > The use of kmap_atomic() is being deprecated in favor of > kmap_local_page()[1]. > > The main difference between atomic and local mappings is that local > mappings doesn't disable page faults or preemption. You are

[PATCH] drm/vc4: hdmi: Fix pointer dereference before check

2022-10-29 Thread José Expósito
Commit 6bed2ea3cb38 ("drm/vc4: hdmi: Reset link on hotplug") introduced the vc4_hdmi_reset_link() function. This function dereferences the "connector" pointer before checking whether it is NULL or not. Rework variable assignment to avoid this issue. Fixes: 6bed2ea3cb38 ("drm/vc4: hdmi: Reset

Re: [PATCH v5] overflow: Introduce overflows_type() and castable_to_type()

2022-10-29 Thread Gwan-gyeong Mun
On 10/29/22 10:32 AM, Kees Cook wrote: On Sat, Oct 29, 2022 at 08:55:43AM +0300, Gwan-gyeong Mun wrote: Hi Kees, Hi! :) I've updated to v5 with the last comment of Nathan. Could you please kindly review what more is needed as we move forward with this patch? It looks fine to me -- I

Re: [PATCH v5] overflow: Introduce overflows_type() and castable_to_type()

2022-10-29 Thread Kees Cook
On Sat, Oct 29, 2022 at 08:55:43AM +0300, Gwan-gyeong Mun wrote: > Hi Kees, Hi! :) > I've updated to v5 with the last comment of Nathan. > Could you please kindly review what more is needed as we move forward with > this patch? It looks fine to me -- I assume it'll go via the drm tree? Would

Re: [PATCH] staging: fbtft: Use ARRAY_SIZE() to get argument count

2022-10-29 Thread Greg Kroah-Hartman
On Fri, Oct 28, 2022 at 07:00:05PM +0530, Deepak R Varma wrote: > The ARRAY_SIZE(foo) macro should be preferred over sizeof operator > based computation such as sizeof(foo)/sizeof(foo[0]) for finding > number of elements in an array. Issue identified using coccicheck. > > Signed-off-by: Deepak R

Re: [PATCH 0/9] drm/i915: Replace kmap_atomic() with kmap_local_page()

2022-10-29 Thread Fabio M. De Francesco
On lunedì 17 ottobre 2022 11:37:16 CEST Zhao Liu wrote: > From: Zhao Liu > > The use of kmap_atomic() is being deprecated in favor of > kmap_local_page()[1]. Some words to explain why kmap_atomic was deprecated won't hurt. Many maintainers and reviewers, and also casual readers might not yet

Re: [PATCH v2] drm/format-helper: Only advertise supported formats for conversion

2022-10-29 Thread Hector Martin
On 28/10/2022 17.07, Thomas Zimmermann wrote: > In yesterday's discussion on IRC, it was said that several devices > advertise ARGB framebuffers when the hardware actually uses XRGB? Is > there hardware that supports transparent primary planes? ARGB hardware probably exists in the form of