Re: [PATCH v4] drm/fb-helper: Replace bpp/depth parameter by color mode

2023-01-06 Thread Maíra Canal
On 1/6/23 08:23, Thomas Zimmermann wrote: Replace the combination of bpp and depth with a single color-mode argument. Handle special cases in simpledrm and ofdrm. Hard-code XRGB as fallback format for cases where no given format works. The color-mode argument accepts the same values as the

Re: [PATCH] drm/vkms: introduce prepare_fb and cleanup_fb functions

2023-01-06 Thread Maíra Canal
Hi, Thanks for the review! On 1/6/23 05:10, Thomas Zimmermann wrote: Hi Am 05.01.23 um 19:43 schrieb Melissa Wen: On 01/05, Maíra Canal wrote: With commit 359c6649cd9a ("drm/gem: Implement shadow-plane {begin, end}_fb_access with vmap"), the behavior of the shadow-plane helpers changed and

Re: [PATCH 22/27] fbdev: remove tmiofb driver

2023-01-06 Thread Arnd Bergmann
On Fri, Jan 6, 2023, at 10:47, Helge Deller wrote: > On 1/5/23 14:46, Arnd Bergmann wrote: >> From: Arnd Bergmann >> >> With the TMIO MFD support removed, the framebuffer driver can be >> removed as well. >> >> Cc: Helge Deller >> Cc: linux-fb...@vger.kernel.org >> Cc:

[PATCH v4] drm/fb-helper: Replace bpp/depth parameter by color mode

2023-01-06 Thread Thomas Zimmermann
Replace the combination of bpp and depth with a single color-mode argument. Handle special cases in simpledrm and ofdrm. Hard-code XRGB as fallback format for cases where no given format works. The color-mode argument accepts the same values as the kernel's video parameter. These are mostly

Re: [RFC 3/3] drm: Update file owner during use

2023-01-06 Thread Daniel Vetter
On Fri, Jan 06, 2023 at 11:32:17AM +0100, Christian König wrote: > Am 05.01.23 um 13:32 schrieb Daniel Vetter: > > [SNIP] > > > For the case of an master fd I actually don't see the reason why we should > > > limit that? And fd can become master if it either was master before or has > > >

Re: [PATCH v4 3/7] accel/ivpu: Add GEM buffer object management

2023-01-06 Thread Daniel Vetter
On Thu, Dec 08, 2022 at 12:07:29PM +0100, Jacek Lawrynowicz wrote: > Adds four types of GEM-based BOs for the VPU: > - shmem > - userptr > - internal Uh what do you need this for? Usually the way we do these is just alloce a normal bo, and then pin them. Also, gem shmem helpers should be

Re: [PATCH v4 1/7] accel/ivpu: Introduce a new DRM driver for Intel VPU

2023-01-06 Thread Daniel Vetter
On Fri, 6 Jan 2023 at 10:56, Stanislaw Gruszka wrote: > > On Fri, Jan 06, 2023 at 10:28:15AM +0100, Daniel Vetter wrote: > > On Thu, Jan 05, 2023 at 07:38:26PM +0200, Oded Gabbay wrote: > > > On Thu, Jan 5, 2023 at 6:25 PM Jeffrey Hugo > > > wrote: > > > > > > > > On 1/5/2023 5:57 AM, Daniel

[PATCH v2] drm/i915: Do not cover all future platforms in TLB invalidation

2023-01-06 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Revert to the original explicit approach and document the reasoning behind it. v2: * DG2 needs to be covered too. (Matt) Signed-off-by: Tvrtko Ursulin Cc: Matt Roper Cc: Balasubramani Vivekanandan Cc: Andrzej Hajda Reviewed-by: Andrzej Hajda # v1 --- Matt, does DG1

Re: [RFC 3/3] drm: Update file owner during use

2023-01-06 Thread Christian König
Am 05.01.23 um 13:32 schrieb Daniel Vetter: [SNIP] For the case of an master fd I actually don't see the reason why we should limit that? And fd can become master if it either was master before or has CAP_SYS_ADMIN. Why would we want an extra check for the pid/tgid here? This is just

Re: [PATCH v3] drm/fb-helper: Replace bpp/depth parameter by color mode

2023-01-06 Thread Thomas Zimmermann
cc'ing linux-arm-...@vger.kernel.org Supposed to fix the recent console issues. [1] Please test, if possible. Best regards Thomas [1] https://lore.kernel.org/dri-devel/Y7fj1N4blo2MYZDt@phenom.ffwll.local/T/#t Am 06.01.23 um 11:16 schrieb Thomas Zimmermann: Replace the combination of bpp

Re: [PATCH] drm/i915/hwmon: Display clamped PL1 limit

2023-01-06 Thread Gupta, Anshuman
On 12/16/2022 12:47 AM, Ashutosh Dixit wrote: HW allows arbitrary PL1 limits to be set but silently clamps these values to "typical but not guaranteed" min/max values in pkg_power_sku register. Follow the same pattern for sysfs, allow arbitrary PL1 limits to be set but display clamped values

[PATCH v3] drm/fb-helper: Replace bpp/depth parameter by color mode

2023-01-06 Thread Thomas Zimmermann
Replace the combination of bpp and depth with a single color-mode argument. Handle special cases in simpledrm and ofdrm. Hard-code XRGB as fallback format for cases where no given format works. The color-mode argument accepts the same values as the kernel's video parameter. These are mostly

Re: [PATCH] drm/i915: Fix potential context UAFs

2023-01-06 Thread Tvrtko Ursulin
On 05/01/2023 16:00, Tvrtko Ursulin wrote: On 05/01/2023 15:52, Andi Shyti wrote: Hi Rob, On Tue, Jan 03, 2023 at 03:49:46PM -0800, Rob Clark wrote: From: Rob Clark gem_context_register() makes the context visible to userspace, and which point a separate thread can trigger the

[PATCH v2] drm/fb-helper: Replace bpp/depth parameter by color mode

2023-01-06 Thread Thomas Zimmermann
Replace the combination of bpp and depth with a single color-mode argument. Handle special cases in simpledrm and ofdrm. Hard-code XRGB as fallback format for cases where no given format works. The color-mode argument accepts the same values as the kernel's video parameter. These are mostly

Re: [PATCH] drm/vkms: Add a DRM render node to vkms

2023-01-06 Thread Yi Xie
I have figured out the problem with importing buffers across vgem/vkms. It's intentionally blocked by kernel here: https://github.com/torvalds/linux/blob/a140a6a2d5ec0329ad05cd3532a91ad0ce58dceb/drivers/gpu/drm/drm_gem.c#L307 >From the original patch

[PATCH] drm/radeon: free iio for atombios when driver shutdown

2023-01-06 Thread Liwei Song
Fix below kmemleak when unload radeon driver: unreferenced object 0x9f8608ede200 (size 512): comm "systemd-udevd", pid 326, jiffies 4294682822 (age 716.338s) hex dump (first 32 bytes): 00 00 00 00 c4 aa ec aa 14 ab 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Re: [PATCH v4 1/7] accel/ivpu: Introduce a new DRM driver for Intel VPU

2023-01-06 Thread Stanislaw Gruszka
On Fri, Jan 06, 2023 at 10:28:15AM +0100, Daniel Vetter wrote: > On Thu, Jan 05, 2023 at 07:38:26PM +0200, Oded Gabbay wrote: > > On Thu, Jan 5, 2023 at 6:25 PM Jeffrey Hugo wrote: > > > > > > On 1/5/2023 5:57 AM, Daniel Vetter wrote: > > > > On Thu, Dec 08, 2022 at 12:07:27PM +0100, Jacek

Re: [PATCH] drm/vkms: Add a DRM render node to vkms

2023-01-06 Thread Daniel Vetter
On Thu, Jan 05, 2023 at 01:40:28PM -0800, Tao Wu(吴涛@Eng) wrote: > Hi Daniel, > > May I know what's the requirement for adding render node support to a > "gpu"? Why we just export render node for every drm devices? > I read document here >

Re: [PATCH 22/27] fbdev: remove tmiofb driver

2023-01-06 Thread Helge Deller
On 1/5/23 14:46, Arnd Bergmann wrote: From: Arnd Bergmann With the TMIO MFD support removed, the framebuffer driver can be removed as well. Cc: Helge Deller Cc: linux-fb...@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Arnd Bergmann Acked-by: Helge Deller Arnd, I

Re: [PATCH v1 2/2] drm/virtio: Add the hotplug_mode_update property for rescanning of modes

2023-01-06 Thread Daniel Vetter
On Fri, Jan 06, 2023 at 09:56:40AM +0100, Gerd Hoffmann wrote: > On Thu, Nov 17, 2022 at 05:30:54PM -0800, Vivek Kasireddy wrote: > > Setting this property will allow the userspace to look for new modes or > > position info when a hotplug event occurs. > > This works just fine for modes today. >

[PATCH][RFC] drm/fb-helper: Replace bpp/depth parameter by color mode

2023-01-06 Thread Thomas Zimmermann
Replace the combination of bpp and depth with a single color-mode argument. Handle special cases in simpledrm and ofdrm. Hard-code XRGB as fallback format for cases where no given format works. The color-mode argument accepts the same values as the kernel's video parameter. These are mostly

Re: [PATCH] drm/i915: Add missing check and destroy for alloc_workqueue

2023-01-06 Thread Stanislaw Gruszka
On Fri, Jan 06, 2023 at 05:09:34PM +0800, Jiasheng Jiang wrote: > Add checks for the return value of alloc_workqueue and > alloc_ordered_workqueue as they may return NULL pointer and cause NULL > pointer dereference. > Moreover, destroy them when fails later in order to avoid memory leak. >

Re: [PATCH v4 1/7] accel/ivpu: Introduce a new DRM driver for Intel VPU

2023-01-06 Thread Daniel Vetter
On Thu, Jan 05, 2023 at 07:38:26PM +0200, Oded Gabbay wrote: > On Thu, Jan 5, 2023 at 6:25 PM Jeffrey Hugo wrote: > > > > On 1/5/2023 5:57 AM, Daniel Vetter wrote: > > > On Thu, Dec 08, 2022 at 12:07:27PM +0100, Jacek Lawrynowicz wrote: > > >> +static const struct drm_driver driver = { > > >> +

Re: [PATCH] drm/vkms: introduce prepare_fb and cleanup_fb functions

2023-01-06 Thread Daniel Vetter
On Fri, Jan 06, 2023 at 09:10:17AM +0100, Thomas Zimmermann wrote: > Hi > > Am 05.01.23 um 19:43 schrieb Melissa Wen: > > On 01/05, Maíra Canal wrote: > > > With commit 359c6649cd9a ("drm/gem: Implement shadow-plane {begin, > > > end}_fb_access with vmap"), the behavior of the shadow-plane

[PATCH] drm/i915: Add missing check and destroy for alloc_workqueue

2023-01-06 Thread Jiasheng Jiang
Add checks for the return value of alloc_workqueue and alloc_ordered_workqueue as they may return NULL pointer and cause NULL pointer dereference. Moreover, destroy them when fails later in order to avoid memory leak. Because in `drivers/gpu/drm/i915/i915_driver.c`, if intel_modeset_init_noirq

Re: [PATCH] drm/msm: Set preferred depth.

2023-01-06 Thread Daniel Vetter
atomic.c:1604 > > __drm_atomic_helper_set_config+0x240/0x33c > > Modules linked in: ext4 mbcache jbd2 msm mdt_loader ocmem gpu_sched > > llcc_qcom gpio_keys qrtr > > CPU: 0 PID: 73 Comm: kworker/u16:2 Not tainted 6.2.0-rc2-next-20230106 #53 > > Hardware name: LENOVO

Re: [PATCH] drm/msm: Set preferred depth.

2023-01-06 Thread Daniel Vetter
drm/drm_atomic.c:1604 > > __drm_atomic_helper_set_config+0x240/0x33c > > Modules linked in: ext4 mbcache jbd2 msm mdt_loader ocmem gpu_sched > > llcc_qcom gpio_keys qrtr > > CPU: 0 PID: 73 Comm: kworker/u16:2 Not tainted 6.2.0-rc2-next-20230106 #53 > > Hardware n

Re: [PATCH v1 2/2] drm/virtio: Add the hotplug_mode_update property for rescanning of modes

2023-01-06 Thread Gerd Hoffmann
On Thu, Nov 17, 2022 at 05:30:54PM -0800, Vivek Kasireddy wrote: > Setting this property will allow the userspace to look for new modes or > position info when a hotplug event occurs. This works just fine for modes today. I assume this is this need to have userspace also check for position info

[PATCH RESEND] drm/msm: Add missing check and destroy for alloc_ordered_workqueue

2023-01-06 Thread Jiasheng Jiang
Add check for the return value of alloc_ordered_workqueue as it may return NULL pointer. Moreover, use the destroy_workqueue in the later fails in order to avoid memory leak. Fixes: c8afe684c95c ("drm/msm: basic KMS driver for snapdragon") Signed-off-by: Jiasheng Jiang ---

[bug report] habanalabs: Timestamps buffers registration

2023-01-06 Thread Dan Carpenter
Hello farah kassabri, The patch 9158bf69e74f: "habanalabs: Timestamps buffers registration" from Dec 23, 2021, leads to the following Smatch static checker warning: drivers/accel/habanalabs/common/memory.c:2178 hl_ts_alloc_buf() warn: use 'gfp' here instead of GFP_XXX?

Re: [PATCH] drm/msm: Set preferred depth.

2023-01-06 Thread Thomas Zimmermann
0-rc2-next-20230106 #53 Hardware name: LENOVO 21BX0015US/21BX0015US, BIOS N3HET74W (1.46 ) 10/12/2022 Workqueue: events_unbound deferred_probe_work_func pstate: 8045 (Nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) pc : __drm_atomic_helper_set_config+0x240/0x33c lr : __drm_atomic_helper_set_config+

Re: [PATCH] fbcon: Use kzalloc() in fbcon_prepare_logo()

2023-01-06 Thread Tetsuo Handa
On 2023/01/05 22:22, Daniel Vetter wrote: > Oh I was more asking about the fbdev patch. This here sounds a lot more > something that needs to be discussed with kmsan people, that's definitely > not my area. > -Daniel Commit a6a00d7e8ffd ("fbcon: Use kzalloc() in fbcon_prepare_logo()") was

Re: [PATCH] fbmem: prevent potential use-after-free issues with console_lock()

2023-01-06 Thread Hang Zhang
On Thu, Jan 5, 2023 at 5:25 AM Daniel Vetter wrote: > > On Thu, 5 Jan 2023 at 11:21, Daniel Vetter wrote: > > > > Hi Helge > > > > On Mon, 2 Jan 2023 at 16:28, Helge Deller wrote: > > > > > > On 12/30/22 07:35, Hang Zhang wrote: > > > > In do_fb_ioctl(), user specified "fb_info" can be freed in

Re: [PATCH v3 0/7] drm/bridge_connector: perform HPD enablement automatically

2023-01-06 Thread Tomi Valkeinen
On 05/01/2023 14:31, Dmitry Baryshkov wrote: On 04/01/2023 11:05, Neil Armstrong wrote: On 04/01/2023 08:29, Tomi Valkeinen wrote: On 28/12/2022 23:58, Dmitry Baryshkov wrote: On 02/11/2022 20:06, Dmitry Baryshkov wrote:  From all the drivers using drm_bridge_connector only iMX/dcss and OMAP

Re: [PATCH] drm/vkms: introduce prepare_fb and cleanup_fb functions

2023-01-06 Thread Thomas Zimmermann
Hi Am 05.01.23 um 19:43 schrieb Melissa Wen: On 01/05, Maíra Canal wrote: With commit 359c6649cd9a ("drm/gem: Implement shadow-plane {begin, end}_fb_access with vmap"), the behavior of the shadow-plane helpers changed and the vunmap is now performed at the end of the current pageflip, instead

Re: [PATCH] drm/msm: Add missing check and destroy for alloc_ordered_workqueue

2023-01-06 Thread Dmitry Baryshkov
On Fri, 6 Jan 2023 at 03:38, Jiasheng Jiang wrote: > > Add check for the return value of alloc_ordered_workqueue as it may return > NULL pointer. > Moreover, use the destroy_workqueue in the later fails in order to avoid > memory leak. > > Fixes: c8afe684c95c ("drm/msm: basic KMS driver for

<    1   2