[PATCH] drm/msm: remove unnecessary NULL check

2023-10-13 Thread Dan Carpenter
This NULL check was required when it was added, but we shuffled the code around in commit 1f50db2f3e1e ("drm/msm/mdp5: move resource allocation to the _probe function") and now it's not. The inconsistent NULL checking triggers a Smatch warning: drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c:847 mdp

[PATCH] drm/i915/gvt: Optimize mmio_offset_compare() for efficiency

2023-10-13 Thread Kuan-Wei Chiu
The original code used conditional branching in the mmio_offset_compare function to compare two values and return -1, 1, or 0 based on the result. However, the list_sort comparison function only needs results <0, >0, or =0. This patch optimizes the code to make the comparison branchless, improving

[RFC] drm: bridge: samsung-dsim: Recalculate timings when rounding HFP up

2023-10-13 Thread Adam Ford
When using video sync pulses, the HFP, HBP, and HSA are divided between the available lanes if there is more than one lane. For certain timings and lane configurations, the HFP may not be evenly divisible and it gets rounded down which can cause certain resolutions and refresh rates to not sync.

Re: [PATCH v10 4/7] drm: bridge: Cadence: Add MHDP8501 DP/HDMI driver

2023-10-13 Thread Alexander Stein
Hi Sandor, thanks for the updated series. Am Freitag, 13. Oktober 2023, 05:24:23 CEST schrieb Sandor Yu: > Add a new DRM DisplayPort and HDMI bridge driver for Candence MHDP8501 > used in i.MX8MQ SOC. MHDP8501 could support HDMI or DisplayPort > standards according embedded Firmware running in th

Re: [PATCH v10 1/7] drm: bridge: Cadence: Creat mhdp helper driver

2023-10-13 Thread Alexander Stein
Hi Sandor, thanks for the updated series. Am Freitag, 13. Oktober 2023, 05:24:20 CEST schrieb Sandor Yu: > MHDP8546 mailbox access functions will be share to other mhdp driver > and Cadence HDP-TX HDMI/DP PHY drivers. > Create a new mhdp helper driver and move all those functions into. > > cdns_

Re: [PATCH v3 4/6] drm/ssd130x: Add support for the SSD132x OLED controller family

2023-10-13 Thread Thomas Zimmermann
Hi Javier, thanks for this patch. Am 12.10.23 um 23:38 schrieb Javier Martinez Canillas: [...] +static int ssd132x_fb_blit_rect(struct drm_framebuffer *fb, + const struct iosys_map *vmap, + struct drm_rect *rect, u8 *buf, +

Re: [PATCH] drm/msm: remove unnecessary NULL check

2023-10-13 Thread Uwe Kleine-König
Hello, On Fri, Oct 13, 2023 at 10:17:08AM +0300, Dan Carpenter wrote: > This NULL check was required when it was added, but we shuffled the code > around in commit 1f50db2f3e1e ("drm/msm/mdp5: move resource allocation > to the _probe function") and now it's not. The inconsistent NULL > checking t

Re: [PATCH 3/3] drm/rockchip: fix the plane format defination of rk3568/6

2023-10-13 Thread Sascha Hauer
On Fri, Oct 13, 2023 at 02:43:31PM +0800, Andy Yan wrote: > Hi Sacha: > > On 10/13/23 14:11, Sascha Hauer wrote: > > On Thu, Oct 12, 2023 at 10:37:05AM +0800, Andy Yan wrote: > > > From: Andy Yan > > > > > > The cluster windows on rk3568/6 only support afbc format, > > > linear format(RGB/YUV) a

[PATCH v2] drm/msm: remove unnecessary NULL check

2023-10-13 Thread Dan Carpenter
This NULL check was required when it was added, but we shuffled the code around and now it's not. The inconsistent NULL checking triggers a Smatch warning: drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c:847 mdp5_init() warn: variable dereferenced before check 'mdp5_kms' (see line 782) Fixes: 1

Re: [PATCH] drm/msm: remove unnecessary NULL check

2023-10-13 Thread Dan Carpenter
On Fri, Oct 13, 2023 at 10:01:49AM +0200, Uwe Kleine-König wrote: > Hello, > > On Fri, Oct 13, 2023 at 10:17:08AM +0300, Dan Carpenter wrote: > > This NULL check was required when it was added, but we shuffled the code > > around in commit 1f50db2f3e1e ("drm/msm/mdp5: move resource allocation > >

Re: [PATCH] drm/loongson: Add support for the DC in LS2K1000 SoC

2023-10-13 Thread Icenowy Zheng
在 2023-10-12星期四的 00:26 +0800,Sui Jingfeng写道: > LS2K1000 is a low end SoC (two core 1.0gHz), it don't has dedicated > VRAM. > It requires the framebuffer to be phisically continguous to scanout. > The > display controller in LS2K1000 don't has built-in GPIO hardware, the > structure (register bit fi

[v4 0/3] Break out as separate driver from boe-tv101wum-nl6 panel driver

2023-10-13 Thread Cong Yang
Linus series proposed to break out ili9882t as separate driver, but he didn't have time for that extensive rework of the driver. As discussed by Linus and Doug [1], keep macro using the "struct panel_init_cmd" until we get some resolution about the binary size issue. [1]: https://lore.kernel.org

[v4 1/3] drm/panel: ili9882t: Break out as separate driver

2023-10-13 Thread Cong Yang
The Starry ILI9882t-based panel should never have been part of the boe tv101wum driver, it is clearly based on the Ilitek ILI9882t display controller and if you look at the custom command sequences for the panel these clearly contain the signature Ilitek page switch (0xff) commands. The hardware ha

[v4 2/3] drm/panel: ili9882t: Avoid blurred screen from fast sleep

2023-10-13 Thread Cong Yang
At present, we have found that there may be a problem of blurred screen during fast sleep/resume. The direct cause of the blurred screen is that the IC does not receive 0x28/0x10. Because of the particularity of the IC, before the panel enters sleep hid must stop scanning, as i2c_hid_core_suspend b

[v4 3/3] arm64: defconfig: Enable ILITEK_ILI9882T panel

2023-10-13 Thread Cong Yang
DRM_PANEL_ILITEK_ILI9882T is being split out from DRM_PANEL_BOE_TV101WUM_NL6. Since the arm64 defconfig had the BOE panel driver enabled, let's also enable the Ilitek driver. Reviewed-by: Douglas Anderson Signed-off-by: Cong Yang --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 inserti

Re: [PATCH] drm/atomic: Perform blocking commits on workqueue

2023-10-13 Thread Daniel Vetter
On Thu, Oct 12, 2023 at 02:19:41PM -0400, Ray Strode wrote: > Hi, > > On Mon, Oct 09, 2023 at 02:36:17PM +0200, Christian König wrote: > > > > > To be clear, my take is, if driver code is running in process context > > > > > and needs to wait for periods of time on the order of or in excess of > >

Re: [PATCH v2] drm/msm: remove unnecessary NULL check

2023-10-13 Thread Uwe Kleine-König
On Fri, Oct 13, 2023 at 11:25:15AM +0300, Dan Carpenter wrote: > This NULL check was required when it was added, but we shuffled the code > around and now it's not. The inconsistent NULL checking triggers a > Smatch warning: > > drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c:847 mdp5_init() warn: >

Re: [PATCH] drm/atomic: Perform blocking commits on workqueue

2023-10-13 Thread Michel Dänzer
On 10/13/23 11:41, Daniel Vetter wrote: > On Thu, Oct 12, 2023 at 02:19:41PM -0400, Ray Strode wrote: >> On Mon, Oct 09, 2023 at 02:36:17PM +0200, Christian König wrote: >> To be clear, my take is, if driver code is running in process context >> and needs to wait for periods of time on the

Re: [PATCH] drm/loongson: Add support for the DC in LS2K1000 SoC

2023-10-13 Thread Sui Jingfeng
Hi, On 2023/10/13 16:22, Icenowy Zheng wrote: 在 2023-10-12星期四的 00:26 +0800,Sui Jingfeng写道: LS2K1000 is a low end SoC (two core 1.0gHz), it don't has dedicated VRAM. It requires the framebuffer to be phisically continguous to scanout. The display controller in LS2K1000 don't has built-in GPIO h

Re: [PATCH] drm/edid: add 8 bpc quirk to the BenQ GW2765

2023-10-13 Thread Ville Syrjälä
On Thu, Oct 12, 2023 at 02:49:27PM -0400, Hamza Mahfooz wrote: > The BenQ GW2765 reports that it supports higher (> 8) bpc modes, but > when trying to set them we end up with a black screen. So, limit it to 8 > bpc modes. Bad cable/etc was ruled out as the cause? > > Cc: sta...@vger.kernel.org #

[PATCH] drm/i915: Flush WC GGTT only on required platforms

2023-10-13 Thread Nirmoy Das
gen8_ggtt_invalidate() is only needed for limitted set of platforms where GGTT is mapped as WC otherwise this can cause unwanted side-effects on XE_HP platforms where GFX_FLSH_CNTL_GEN6 is not valid. Fixes: d2eae8e98d59 ("drm/i915/dg2: Drop force_probe requirement") Cc: Rodrigo Vivi Cc: Tvrtko Ur

Re: [PATCH] drm/i915: Flush WC GGTT only on required platforms

2023-10-13 Thread Andi Shyti
Hi Nirmoy, On Fri, Oct 13, 2023 at 12:31:40PM +0200, Nirmoy Das wrote: > gen8_ggtt_invalidate() is only needed for limitted set of platforms /limitted/limited/ > where GGTT is mapped as WC otherwise this can cause unwanted > side-effects on XE_HP platforms where GFX_FLSH_CNTL_GEN6 is not > valid

Re: [PATCH] drm/i915/gvt: Optimize mmio_offset_compare() for efficiency

2023-10-13 Thread Ville Syrjälä
On Fri, Oct 13, 2023 at 07:04:49AM +0800, Kuan-Wei Chiu wrote: > The original code used conditional branching in the mmio_offset_compare > function to compare two values and return -1, 1, or 0 based on the > result. However, the list_sort comparison function only needs results > <0, >0, or =0. This

Re: [PATCH] drm/i915: Flush WC GGTT only on required platforms

2023-10-13 Thread Nirmoy Das
On 10/13/2023 12:35 PM, Andi Shyti wrote: Hi Nirmoy, On Fri, Oct 13, 2023 at 12:31:40PM +0200, Nirmoy Das wrote: gen8_ggtt_invalidate() is only needed for limitted set of platforms /limitted/limited/ Added " autocmd FileType gitcommit setlocal spell" to my vim config. Wish I knew about it

Re: [PATCH] drm/i915: Flush WC GGTT only on required platforms

2023-10-13 Thread Ville Syrjälä
On Fri, Oct 13, 2023 at 12:31:40PM +0200, Nirmoy Das wrote: > gen8_ggtt_invalidate() is only needed for limitted set of platforms > where GGTT is mapped as WC I know there is supposed to be some kind hw snooping of the ggtt pte writes to invalidate the tlb, but are we sure GFX_FLSH_CNTL has no oth

Re: [PATCH] drm/edid: add 8 bpc quirk to the BenQ GW2765

2023-10-13 Thread Hamza Mahfooz
On 10/13/23 06:30, Ville Syrjälä wrote: On Thu, Oct 12, 2023 at 02:49:27PM -0400, Hamza Mahfooz wrote: The BenQ GW2765 reports that it supports higher (> 8) bpc modes, but when trying to set them we end up with a black screen. So, limit it to 8 bpc modes. Bad cable/etc was ruled out as the cau

Re: [PATCH drm-misc-next v6 1/6] drm/gpuvm: add common dma-resv per struct drm_gpuvm

2023-10-13 Thread Thomas Hellström
On Mon, 2023-10-09 at 01:32 +0200, Danilo Krummrich wrote: > Provide a common dma-resv for GEM objects not being used outside of > this > GPU-VM. This is used in a subsequent patch to generalize dma-resv, > external and evicted object handling and GEM validation. > > Signed-off-by: Danilo Krummric

Re: [PATCH drm-misc-next v6 2/6] drm/gpuvm: add drm_gpuvm_flags to drm_gpuvm

2023-10-13 Thread Thomas Hellström
On Mon, 2023-10-09 at 01:32 +0200, Danilo Krummrich wrote: > Introduce flags for struct drm_gpuvm, this required by subsequent > commits. > > Signed-off-by: Danilo Krummrich > --- >  drivers/gpu/drm/drm_gpuvm.c    |  4 +++- >  drivers/gpu/drm/nouveau/nouveau_uvmm.c |  2 +- >  include/drm/

Re: [PATCH drm-misc-next v6 1/6] drm/gpuvm: add common dma-resv per struct drm_gpuvm

2023-10-13 Thread Danilo Krummrich
On 10/13/23 13:38, Thomas Hellström wrote: On Mon, 2023-10-09 at 01:32 +0200, Danilo Krummrich wrote: Provide a common dma-resv for GEM objects not being used outside of this GPU-VM. This is used in a subsequent patch to generalize dma-resv, external and evicted object handling and GEM validatio

Re: [PATCH drm-misc-next v6 4/6] drm/gpuvm: track/lock/validate external/evicted objects

2023-10-13 Thread Danilo Krummrich
On 10/10/23 08:26, Thomas Hellström wrote: On 10/9/23 16:45, Danilo Krummrich wrote: On 10/9/23 15:36, Thomas Hellström wrote: On 10/9/23 01:32, Danilo Krummrich wrote: Currently the DRM GPUVM offers common infrastructure to track GPU VA allocations and mappings, generically connect GPU VA m

Re: [PATCH drm-misc-next v6 4/6] drm/gpuvm: track/lock/validate external/evicted objects

2023-10-13 Thread Danilo Krummrich
On 10/10/23 08:40, Thomas Hellström wrote: On 10/9/23 01:32, Danilo Krummrich wrote: Currently the DRM GPUVM offers common infrastructure to track GPU VA allocations and mappings, generically connect GPU VA mappings to their backing buffers and perform more complex mapping operations on the GPU

Re: [PATCH v1] drm/msm/dp: do not reinitialize phy unless retry during link training

2023-10-13 Thread Johan Hovold
On Tue, Oct 03, 2023 at 11:10:59AM +0200, Johan Hovold wrote: > On Tue, Aug 08, 2023 at 03:19:50PM -0700, Kuogee Hsieh wrote: > > DP PHY re-initialization done using dp_ctrl_reinitialize_mainlink() will > > cause PLL unlocked initially and then PLL gets locked at the end of > > initialization. PLL_

Re: [PATCH v3 06/16] platform/x86/amd/pmf: Add support to get inputs from other subsystems

2023-10-13 Thread Ilpo Järvinen
On Tue, 10 Oct 2023, Shyam Sundar S K wrote: > PMF driver sends changing inputs from each subystem to TA for evaluating > the conditions in the policy binary. > > Add initial support of plumbing in the PMF driver for Smart PC to get > information from other subsystems in the kernel. > > Signed-o

[PATCH v2 0/4] Some cleanup of vop2 driver

2023-10-13 Thread Andy Yan
From: Andy Yan This is a preparation for the upcoming support for rk3588 vop. Patch 1 remove unused struct Patch 2 remove NR_LAYERS macro to support more layers on rk3588 Patch 3 are plane format fix Patch 4 is a format rename Changes in v2: - split rename to another patch Andy Yan (4): drm/r

[PATCH v2 1/4] drm/rockchip: remove unused struct in vop2

2023-10-13 Thread Andy Yan
From: Andy Yan These structs are undefined and un used. Fixes: 604be85547ce ("drm/rockchip: Add VOP2 driver") Signed-off-by: Andy Yan Reviewed-by: Sascha Hauer --- (no changes since v1) drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 2 -- drivers/gpu/drm/rockchip/rockchip_drm_vop2.h | 3 --

[PATCH v2 2/4] drm/rockchip: remove NR_LAYERS macro on vop2

2023-10-13 Thread Andy Yan
From: Andy Yan There are 8 layers on rk3588, so a fix defined macro is not appropriate. Signed-off-by: Andy Yan Reviewed-by: Sascha Hauer --- (no changes since v1) drivers/gpu/drm/rockchip/rockchip_drm_vop2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/

[PATCH v2 3/4] drm/rockchip: fix the plane format defination of rk3568/6

2023-10-13 Thread Andy Yan
From: Andy Yan Add the missing 10 bit RGB format for cluster window. The cluster windows on rk3568/6 only support afbc format, so change the linear yuv format NV12/16/24 to non-Linear YUV420_8BIT/YUV420_10BIT/YUYV/Y210. Add NV15 for esmart windows. Also add some comments. Signed-off-by: Andy

[PATCH v2 4/4] drm/rockchip: rename windows format for vop2

2023-10-13 Thread Andy Yan
From: Andy Yan formats_win_full_10bit is for cluster window, formats_win_full_10bit_yuyv is for rk356x esmart, rk3588 esmart window will support more format. formats_win_lite is for smart window. Rename it based the windows type may let meaning is clearer Signed-off-by: Andy Yan --- (no chang

Re: [PATCH] drm/i915: Flush WC GGTT only on required platforms

2023-10-13 Thread Nirmoy Das
Hi Ville, On 10/13/2023 12:50 PM, Ville Syrjälä wrote: On Fri, Oct 13, 2023 at 12:31:40PM +0200, Nirmoy Das wrote: gen8_ggtt_invalidate() is only needed for limitted set of platforms where GGTT is mapped as WC I know there is supposed to be some kind hw snooping of the ggtt pte writes to inval

Re: [PATCH drm-misc-next v6 3/6] drm/gpuvm: add an abstraction for a VM / BO combination

2023-10-13 Thread Thomas Hellström
On Mon, 2023-10-09 at 01:32 +0200, Danilo Krummrich wrote: > Add an abstraction layer between the drm_gpuva mappings of a > particular > drm_gem_object and this GEM object itself. The abstraction represents > a > combination of a drm_gem_object and drm_gpuvm. The drm_gem_object > holds > a list of

Re: [PATCH drm-misc-next v6 3/6] drm/gpuvm: add an abstraction for a VM / BO combination

2023-10-13 Thread Thomas Hellström
On Mon, 2023-10-09 at 01:32 +0200, Danilo Krummrich wrote: > Add an abstraction layer between the drm_gpuva mappings of a > particular > drm_gem_object and this GEM object itself. The abstraction represents > a > combination of a drm_gem_object and drm_gpuvm. The drm_gem_object > holds > a list of

Re: [PATCH v7 11/20] drm/imagination: Add GEM and VM related code

2023-10-13 Thread kernel test robot
ode config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20231013/202310132017.ss9eaovp-...@intel.com/config) compiler: aarch64-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231013/202310132017.ss9eaovp-...@intel.com/reproduce)

Re: [PATCH] drm/i915: Flush WC GGTT only on required platforms

2023-10-13 Thread Ville Syrjälä
On Fri, Oct 13, 2023 at 02:28:21PM +0200, Nirmoy Das wrote: > Hi Ville, > > On 10/13/2023 12:50 PM, Ville Syrjälä wrote: > > On Fri, Oct 13, 2023 at 12:31:40PM +0200, Nirmoy Das wrote: > >> gen8_ggtt_invalidate() is only needed for limitted set of platforms > >> where GGTT is mapped as WC > > I kn

Re: [PATCH drm-misc-next v6 1/6] drm/gpuvm: add common dma-resv per struct drm_gpuvm

2023-10-13 Thread Thomas Hellström
On Fri, 2023-10-13 at 13:51 +0200, Danilo Krummrich wrote: > On 10/13/23 13:38, Thomas Hellström wrote: > > On Mon, 2023-10-09 at 01:32 +0200, Danilo Krummrich wrote: > > > Provide a common dma-resv for GEM objects not being used outside > > > of > > > this > > > GPU-VM. This is used in a subsequen

Re: [PATCH drm-misc-next v6 4/6] drm/gpuvm: track/lock/validate external/evicted objects

2023-10-13 Thread Thomas Hellström
On Fri, 2023-10-13 at 14:04 +0200, Danilo Krummrich wrote: > On 10/10/23 08:26, Thomas Hellström wrote: > > > > On 10/9/23 16:45, Danilo Krummrich wrote: > > > On 10/9/23 15:36, Thomas Hellström wrote: > > > > > > > > On 10/9/23 01:32, Danilo Krummrich wrote: > > > > > Currently the DRM GPUVM off

Re: [PATCH] drm/i915: Flush WC GGTT only on required platforms

2023-10-13 Thread Nirmoy Das
On 10/13/2023 2:55 PM, Ville Syrjälä wrote: On Fri, Oct 13, 2023 at 02:28:21PM +0200, Nirmoy Das wrote: Hi Ville, On 10/13/2023 12:50 PM, Ville Syrjälä wrote: On Fri, Oct 13, 2023 at 12:31:40PM +0200, Nirmoy Das wrote: gen8_ggtt_invalidate() is only needed for limitted set of platforms wher

[PATCH 0/4] drm/i915: Fix LUT rounding

2023-10-13 Thread Ville Syrjala
From: Ville Syrjälä The current LUT rounding is generating weird results. Adjust it to follow the OpenGL int<->float conversion rules. Ville Syrjälä (4): drm: Fix color LUT rounding drm/i915: Adjust LUT rounding rules drm/i915: s/clamp()/min()/ in i965_lut_11p6_max_pack() drm/i915: Fix g

[PATCH 1/4] drm: Fix color LUT rounding

2023-10-13 Thread Ville Syrjala
From: Ville Syrjälä The current implementation of drm_color_lut_extract() generates weird results. Eg. if we go through all the values for 16->8bpc conversion we see the following pattern: inout (count) 0 - 7f -> 0 (128) 80 - 17f -> 1 (256) 180 - 27f -> 2 (256) 280 - 3

[PATCH 2/4] drm/i915: Adjust LUT rounding rules

2023-10-13 Thread Ville Syrjala
From: Ville Syrjälä drm_color_lut_extract() rounding was changed to follow the OpenGL int<->float conversion rules. Adjust intel_color_lut_pack() to match. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_color.c | 14 ++ 1 file changed, 6 insertions(+), 8 deleti

[PATCH 3/4] drm/i915: s/clamp()/min()/ in i965_lut_11p6_max_pack()

2023-10-13 Thread Ville Syrjala
From: Ville Syrjälä Use min() instead of clamp() since the color values involved are unsigned. No functional changes. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_color.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/int

[PATCH 4/4] drm/i915: Fix glk+ degamma LUT conversions

2023-10-13 Thread Ville Syrjala
From: Ville Syrjälä The current implementation of change_lut_val_precision() is just a convoluted way of shifting by 8. Implement the proper rounding by just using drm_color_lut_extract() and intel_color_lut_pack() like everyone else does. And as the uapi can't handle >=1.0 values but the hardwa

Re: [PATCH drm-misc-next v6 4/6] drm/gpuvm: track/lock/validate external/evicted objects

2023-10-13 Thread Thomas Hellström
Hi, On Mon, 2023-10-09 at 01:32 +0200, Danilo Krummrich wrote: > Currently the DRM GPUVM offers common infrastructure to track GPU VA > allocations and mappings, generically connect GPU VA mappings to > their > backing buffers and perform more complex mapping operations on the > GPU VA > space. >

Re: [PATCH] drm/amdgpu/vkms: fix a possible null pointer dereference

2023-10-13 Thread Alex Deucher
On Thu, Oct 12, 2023 at 10:32 PM Ma Ke wrote: > > In amdgpu_vkms_conn_get_modes(), the return value of drm_cvt_mode() > is assigned to mode, which will lead to a NULL pointer dereference > on failure of drm_cvt_mode(). Add a check to avoid null pointer > dereference. > > Signed-off-by: Ma Ke App

[PATCH v2] drm/i915: Flush WC GGTT only on required platforms

2023-10-13 Thread Nirmoy Das
gen8_ggtt_invalidate() is only needed for limited set of platforms where GGTT is mapped as WC otherwise this can cause unwanted side-effects on XE_HP platforms where GFX_FLSH_CNTL_GEN6 is not valid. v2: Add a func to detect wc ggtt detection (Ville) Fixes: d2eae8e98d59 ("drm/i915/dg2: Drop force_

Re: [PATCH] drm/atomic: Perform blocking commits on workqueue

2023-10-13 Thread Ray Strode
Hi On Fri, Oct 13, 2023 at 5:41 AM Daniel Vetter wrote: > > I mean we're not talking about scientific computing, or code > > compilation, or seti@home. We're talking about nearly the equivalent > > of `while (1) __asm__ ("nop");` > > I don't think anyone said this shouldn't be fixed or improved.

Re: [PATCH v3 1/2] drm/bridge: megachips-stdpxxxx-ge-b850v3-fw: switch to drm_do_get_edid()

2023-10-13 Thread Robert Foss
On Thu, Sep 21, 2023 at 12:48 PM Ian Ray wrote: > > Migrate away from custom EDID parsing and validity checks. > > Note: This is a follow-up to the original RFC by Jani [1]. The first > submission in this series should have been marked v2. > > [1] > https://patchwork.freedesktop.org/patch/msgid

Re: [PATCH v3 2/2] MAINTAINERS: Update entry for megachips-stdpxxxx-ge-b850v3-fw

2023-10-13 Thread Robert Foss
On Thu, Sep 21, 2023 at 12:48 PM Ian Ray wrote: > > Replace Martin, who has left GE. > > Signed-off-by: Ian Ray > --- > MAINTAINERS | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > index bf0f54c..31bb835 100644 > --- a/MAINTAINERS > +++ b/MAINT

Re: [PATCH v3 1/2] drm/bridge: megachips-stdpxxxx-ge-b850v3-fw: switch to drm_do_get_edid()

2023-10-13 Thread Robert Foss
On Thu, 21 Sep 2023 13:47:50 +0300, Ian Ray wrote: > Migrate away from custom EDID parsing and validity checks. > > Note: This is a follow-up to the original RFC by Jani [1]. The first > submission in this series should have been marked v2. > > [1] > https://patchwork.freedesktop.org/patch/msg

Re: DRM FB emulation initialisation leaving the display disabled

2023-10-13 Thread Dave Stevenson
Hi Thomas Thanks for the response. On Thu, 12 Oct 2023 at 08:03, Thomas Zimmermann wrote: > > Hi Dave > > Am 11.10.23 um 17:52 schrieb Dave Stevenson: > > Hi Thomas (and everyone else) > > > > Maxime has suggested you're the person for DRM framebuffer emulation. > > > > I'm getting some unexpect

[PATCH] drm/ttm: Drain workqueue before sys manager release

2023-10-13 Thread Karolina Stolarek
In rare cases, a delayed destruction of a BO with a system resource could stay in the workqueue until drain_workqueue() is called in ttm_device_fini(). An attempt to free a resource from an already released manager results in NULL pointer dereference. Move the step of draining and destroying the wo

[PATCH libdrm v4 0/9] util, modetest: add support for low-color frame buffer formats

2023-10-13 Thread Geert Uytterhoeven
Hi all, A long outstanding issue with the DRM subsystem has been the lack of support for low-color displays, as used typically on older desktop systems, and on small embedded displays. This patch series adds support for color-indexed frame buffer formats with 2, 4, and 16 colors. It has

[PATCH libdrm v4 3/9] util: add support for DRM_FORMAT_C[124]

2023-10-13 Thread Geert Uytterhoeven
Add support for creating buffers using the new color-indexed frame buffer formats with two, four, and sixteen colors. Signed-off-by: Geert Uytterhoeven Acked-by: Sam Ravnborg --- v4: - No changes, v3: - Add Acked-by, v2: - Split off changes to tests/util/format.c. --- tests/util/format.

[PATCH libdrm v4 8/9] modetest: add support for DRM_FORMAT_C[124]

2023-10-13 Thread Geert Uytterhoeven
Add support for creating buffers using the new color-indexed frame buffer formats with two, four, and sixteen colors. Signed-off-by: Geert Uytterhoeven Acked-by: Sam Ravnborg --- v4: - No changes, v3: - Add Acked-by, v2: - Split off changes to tests/modetest/buffers.c. --- tests/modetes

[PATCH libdrm v4 5/9] util: add SMPTE pattern support for C4 format

2023-10-13 Thread Geert Uytterhoeven
Add support for drawing the SMPTE pattern in a buffer using the C4 indexed format. Signed-off-by: Geert Uytterhoeven Acked-by: Sam Ravnborg --- v4: - No changes, v3: - Add Acked-by, v2: - Use new smpte_top[], - Split off changes to tests/util/pattern.c. --- tests/util/pattern.c | 42 +

[PATCH libdrm v4 6/9] util: add SMPTE pattern support for C1 format

2023-10-13 Thread Geert Uytterhoeven
Add support for drawing the SMPTE pattern in a buffer using the C1 indexed format. As only two colors are available, the pattern is drawn in black and white, using Floyd-Steinberg dithering[1]. [1] https://en.wikipedia.org/wiki/Floyd%E2%80%93Steinberg_dithering Signed-off-by: Geert Uytterhoeven

[PATCH libdrm v4 7/9] util: add SMPTE pattern support for C2 format

2023-10-13 Thread Geert Uytterhoeven
Add support for drawing the SMPTE pattern in a buffer using the C2 indexed format. As only four colors are available, resolution is halved, and the pattern is drawn in a PenTile RG-GB matrix, using Floyd-Steinberg dithering. The magnitude of the green subpixels is reduced, as there are twice as ma

[PATCH libdrm v4 2/9] util: factor out and optimize C8 SMPTE color LUT

2023-10-13 Thread Geert Uytterhoeven
The color LUT for the SMPTE pattern in indexed mode contains 22 entries, although only 13 are non-unique. Reduce the size of the color LUT by dropping duplicate entries, so it can be reused for formats supporting e.g. 16 colors. Rename the function util_smpte_c8_gamma() to util_smpte_fill_lut(),

[PATCH libdrm v4 4/9] util: store number of colors for indexed formats

2023-10-13 Thread Geert Uytterhoeven
Store the number of available colors for color-indexed frame buffer formats in the format_info[] array. This avoids the need of test code for having to use switch statements all the time to obtain the number of colors, or to check if a mode is color-indexed or not. Signed-off-by: Geert Uytterhoev

[PATCH libdrm v4 9/9] modetest: add SMPTE pattern support for C[124] formats

2023-10-13 Thread Geert Uytterhoeven
Add support for drawing the SMPTE pattern in buffers using a color-indexed frame buffer formats with two, four, or sixteen colors. Note that this still uses 256 as the CLUT size, as DRM_IOCTL_MODE_SETGAMMA enforces that the size matches against the (fixed) gamma size, while the CLUT size depends o

[PATCH libdrm v4 1/9] util: improve SMPTE color LUT accuracy

2023-10-13 Thread Geert Uytterhoeven
Fill in the LSB when converting color components from 8-bit to 16-bit. Signed-off-by: Geert Uytterhoeven Acked-by: Sam Ravnborg --- v4: - No changes, v3: - Add Acked-by, v2: - New. --- tests/util/pattern.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/u

Re: [PATCH v3 4/6] drm/ssd130x: Add support for the SSD132x OLED controller family

2023-10-13 Thread Javier Martinez Canillas
Thomas Zimmermann writes: Hello Thomas, Thanks a lot for your feedback. > Hi Javier, > > thanks for this patch. > > Am 12.10.23 um 23:38 schrieb Javier Martinez Canillas: > [...] >> >> +static int ssd132x_fb_blit_rect(struct drm_framebuffer *fb, >> +const struct i

Implement per-key keyboard backlight as auxdisplay?

2023-10-13 Thread Werner Sembach
Hi, coming from the leds mailing list I'm writing with Pavel how to best handle per-key RGB keyboards. His suggestion was that it could be implemented as an aux display, but he also suggested that I ask first if this fits. The specific keyboard RGB controller I want to implement takes 6*21

Re: [PATCH v3 4/6] drm/ssd130x: Add support for the SSD132x OLED controller family

2023-10-13 Thread Thomas Zimmermann
Hi Am 13.10.23 um 16:57 schrieb Javier Martinez Canillas: Thomas Zimmermann writes: Hello Thomas, Thanks a lot for your feedback. Hi Javier, thanks for this patch. Am 12.10.23 um 23:38 schrieb Javier Martinez Canillas: [...] +static int ssd132x_fb_blit_rect(struct drm_framebuffer *fb,

Re: [PATCH v3 4/6] drm/ssd130x: Add support for the SSD132x OLED controller family

2023-10-13 Thread Javier Martinez Canillas
Thomas Zimmermann writes: Hello Thomas, [...] >> As you mention that these could be follow-up changes, I assume that you >> agree with the current approach. Should I expect your review / ack for >> this patch-set? > > Please take my ack for this patchset > > Acked-by: Thomas Zimmermann > Per

[PATCH] drm/bridge: analogix: anx78xx: Check return value

2023-10-13 Thread Artem Chernyshev
In anx78xx_start() err value of anx78xx_clear_bits() overwriting without check. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Artem Chernyshev --- drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c | 4 1 file changed, 4 insertions(+) diff --git a/driver

[PATCH v2] drm/i915/gvt: Optimize mmio_offset_compare() for efficiency

2023-10-13 Thread Kuan-Wei Chiu
The original code used conditional branching in the mmio_offset_compare function to compare two values and return -1, 1, or 0 based on the result. However, the list_sort comparison function only needs results <0, >0, or =0. This patch optimizes the code to make the comparison branchless, improving

Re: [PATCH v2] drm/i915: Flush WC GGTT only on required platforms

2023-10-13 Thread Matt Roper
On Fri, Oct 13, 2023 at 03:44:39PM +0200, Nirmoy Das wrote: > gen8_ggtt_invalidate() is only needed for limited set of platforms > where GGTT is mapped as WC otherwise this can cause unwanted > side-effects on XE_HP platforms where GFX_FLSH_CNTL_GEN6 is not > valid. > > v2: Add a func to detect wc

Re: [PATCH] drm/i915: Flush WC GGTT only on required platforms

2023-10-13 Thread Daniel Vetter
On Fri, Oct 13, 2023 at 02:28:21PM +0200, Nirmoy Das wrote: > Hi Ville, > > On 10/13/2023 12:50 PM, Ville Syrjälä wrote: > > On Fri, Oct 13, 2023 at 12:31:40PM +0200, Nirmoy Das wrote: > > > gen8_ggtt_invalidate() is only needed for limitted set of platforms > > > where GGTT is mapped as WC > > I

Re: [PATCH v7 04/23] dt-bindings: display: mediatek: padding: Add MT8188

2023-10-13 Thread Daniel Stone
Hi Shawn, On Fri, 6 Oct 2023 at 08:38, Hsiao Chien Sung wrote: > + Padding provides ability to add pixels to width and height of a layer with > + specified colors. Due to hardware design, Mixer in VDOSYS1 requires > + width of a layer to be 2-pixel-align, or 4-pixel-align when ETHDR is > enab

Re: [PATCH] drm/ci: Default to UART for logging

2023-10-13 Thread Daniel Stone
On Fri, 6 Oct 2023 at 18:32, Rob Clark wrote: > ssh logging is the default for mesa, as it is generally more reliable. > But if there are kernel issues, especially at boot, UART logging is > infinitely more useful. Hmm, we should still be capturing the UART boot logs regardless. Those go into a c

Re: Warning notice "Memory manager not clean during takedown" on RB5 runs

2023-10-13 Thread Dmitry Baryshkov
Hello Aishwarya, On Fri, 13 Oct 2023 at 19:05, Aishwarya TCV wrote: > > Hi Dmitry > > > On 17/08/2023 15:59, Dmitry Baryshkov wrote: > > Add displayport altmode declaration to the Type-C controller node to > > enable DP altmode negotiation. > > > > Signed-off-by: Dmitry Baryshkov > > --- > > ar

Re: [v3 2/3] drm/panel: ili9882t: Avoid blurred screen from fast sleep

2023-10-13 Thread Doug Anderson
Hi, On Thu, Oct 12, 2023 at 8:56 PM cong yang wrote: > > Hi, > > On Fri, Oct 13, 2023 at 10:28 AM Doug Anderson wrote: > > > > Hi, > > > > On Thu, Oct 12, 2023 at 6:12 PM cong yang > > wrote: > > > > > > Hi, > > > > > > On Thu, Oct 12, 2023 at 11:15 PM Doug Anderson > > > wrote: > > > > > > >

Re: [PATCH v5 6/7] drm/ssd130x: Fix atomic_check for disabled planes

2023-10-13 Thread Javier Martinez Canillas
Thomas Zimmermann writes: Hello Thomas, > The plane's atomic_check returns -EINVAL if the CRTC has not been > set. This is the case for disabled planes, for which atomic_check > should return 0. For disabled planes, it also omits the mandatory > call to drm_atomic_helper_check_plane_state(). > >

Re: [PATCH v5 3/7] drm/sched: Move schedule policy to scheduler

2023-10-13 Thread Luben Tuikov
On 2023-10-11 19:58, Matthew Brost wrote: > Rather than a global modparam for scheduling policy, move the scheduling > policy to scheduler so user can control each scheduler policy. > > v2: > - s/DRM_SCHED_POLICY_MAX/DRM_SCHED_POLICY_COUNT (Luben) > - Only include policy in scheduler (Luben) >

[pull] amdgpu, amdkfd, radeon, UAPI drm-next-6.7

2023-10-13 Thread Alex Deucher
Hi Dave, Daniel, New stuff for 6.7. The following changes since commit 3698a75f5a98d0a6599e2878ab25d30a82dd836a: Merge tag 'drm-intel-next-fixes-2023-08-24' of git://anongit.freedesktop.org/drm/drm-intel into drm-next (2023-08-25 12:55:55 +1000) are available in the Git repository at: ht

Re: [PATCH] drm/ci: Default to UART for logging

2023-10-13 Thread Rob Clark
On Fri, Oct 13, 2023 at 9:28 AM Daniel Stone wrote: > > On Fri, 6 Oct 2023 at 18:32, Rob Clark wrote: > > ssh logging is the default for mesa, as it is generally more reliable. > > But if there are kernel issues, especially at boot, UART logging is > > infinitely more useful. > > Hmm, we should s

BUG: KASAN: slab-use-after-free in drm_connector_cleanup

2023-10-13 Thread Naresh Kamboju
Following kasan bug was noticed on arm64 bcm2711-rpi-4-b device running Linux next 6.6.0-rc5-next-20231011 with given config. This was first noticed on 6.6.0-rc2-next-20230918. This is an intermittent issue. Links to build and test logs provided. Reported-by: Linux Kernel Functional Testing Boo

[PATCH 0/5] Add Support for RK3566 Powkiddy RGB30

2023-10-13 Thread Chris Morgan
From: Chris Morgan Add support for the Powkiddy RGB30 handheld gaming console. Chris Morgan (5): dt-bindings: vendor-prefixes: document Powkiddy dt-bindings: panel: Add Powkiddy RGB30 panel compatible drm/panel: st7703: Add Powkiddy RGB30 Panel Support dt-bindings: arm64: rockchip: add P

[PATCH 2/5] dt-bindings: panel: Add Powkiddy RGB30 panel compatible

2023-10-13 Thread Chris Morgan
From: Chris Morgan The Powkiddy RGB30 panel is a 4 inch 720x720 MIPI-DSI LCD panel. It appears to be based on the ST7703 LCD controller (this is assumed from the init sequence similarity between this and other displays). Powkiddy would not share the part number or name for the display from the bi

[PATCH 4/5] dt-bindings: arm64: rockchip: add Powkiddy RGB30

2023-10-13 Thread Chris Morgan
From: Chris Morgan The Powkiddy RGB30 is a portable handheld console from Powkiddy which uses the Rockchip RK3566 SoC. Signed-off-by: Chris Morgan --- Documentation/devicetree/bindings/arm/rockchip.yaml | 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/

[PATCH 1/5] dt-bindings: vendor-prefixes: document Powkiddy

2023-10-13 Thread Chris Morgan
From: Chris Morgan Document Powkiddy (https://powkiddy.com/). Signed-off-by: Chris Morgan --- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings

[PATCH 5/5] arm64: dts: rockchip: add support for Powkiddy RGB30

2023-10-13 Thread Chris Morgan
From: Chris Morgan The Powkiddy RGB30 is a portable game device based on the Rockchip RK3566 SoC. It has GPIO buttons on the face and sides for input, stereo speakers, a 720x720 4 inch DSI display, a USB-C host port and a USB-C peripheral port, dual SD card slots, WiFi, Bluetooth, and 1GB of RAM.

[PATCH 3/5] drm/panel: st7703: Add Powkiddy RGB30 Panel Support

2023-10-13 Thread Chris Morgan
From: Chris Morgan The Powkiddy RGB30 4 inch panel is a 4 inch 720x720 DSI panel used in the Powkiddy RGB30 handheld gaming device. Add support for it. TODO: The panel seems to not resume properly from suspend. I've confirmed on the other ST7703 based devices it works correctly. Signed-off-by:

Re: [PATCH 5/9] dma-buf: heaps: mtk_sec_heap: Initialise tee session

2023-10-13 Thread Jeffrey Kardatzke
Sorry for the delayed reply, needed to get some more info. This really wouldn't be possible due to the limitation on the number of regions...for example only 32 regions can be defined on some SoCs, and you'd run out of regions really fast trying to do this. That's why this is creating heaps for tho

Re: [PATCH 5/9] dma-buf: heaps: mtk_sec_heap: Initialise tee session

2023-10-13 Thread Jeffrey Kardatzke
Sorry for the delayed reply, needed to get some more info. This really wouldn't be possible due to the limitation on the number of regions...for example only 32 regions can be defined on some SoCs, and you'd run out of regions really fast trying to do this. That's why this is creating heaps for tho

Re: [PATCH 5/7] drm/sun4i: dw-hdmi: Split driver registration

2023-10-13 Thread Jernej Škrabec
Dne četrtek, 05. oktober 2023 ob 10:43:14 CEST je Maxime Ripard napisal(a): > On Mon, Sep 25, 2023 at 05:07:45PM +0200, Jernej Škrabec wrote: > > Dne ponedeljek, 25. september 2023 ob 09:47:15 CEST je Maxime Ripard > > napisal(a): > > > On Sun, Sep 24, 2023 at 09:26:02PM +0200, Jernej Skrabec wrot

Re: Implement per-key keyboard backlight as auxdisplay?

2023-10-13 Thread Pavel Machek
Hi! > > The specific keyboard RGB controller I want to implement takes 6*21 rgb > > values. However not every one is actually mapped to a physical key. e.g. the > > bottom row needs less entries because of the space bar. Additionally the > > keys are ofc not in a straight line from top to bottom.

Re: Implement per-key keyboard backlight as auxdisplay?

2023-10-13 Thread Pavel Machek
Hi! > coming from the leds mailing list I'm writing with Pavel how to best handle > per-key RGB keyboards. > > His suggestion was that it could be implemented as an aux display, but he > also suggested that I ask first if this fits. Thanks for doing this. > The specific keyboard RGB controller

[PATCH v2 1/2] video: fbdev: core: cfbcopyarea: fix sloppy typing

2023-10-13 Thread Sergey Shtylyov
In cfb_copyarea(), the local variable bits_per_line is needlessly typed as *unsigned long* -- which is a 32-bit type on the 32-bit arches and a 64-bit type on the 64-bit arches; that variable's value is derived from the __u32 typed fb_fix_screeninfo::line_length field (multiplied by 8u) and a 32-bi

[PATCH v2 0/2] Fix sloppy typing in the FB area copying routines

2023-10-13 Thread Sergey Shtylyov
Here are 2 patches against the 'master' branch of Linus' 'linux.git' repo... In {cfb|sys}_copyarea(), the local variable bits_per_line is needlessly typed as *unsigned long* -- which is a 32-bit type on the 32-bit arches and a 64-bit type on the 64-bit arches;; that variable's value is derived fro

  1   2   >