Re: [PATCH v4] drm/ast: Fixed CVE for DP501

2021-04-12 Thread Thomas Zimmermann
m_size, 0); + if (!ast->dp501_fw_buf) + drm_info(dev, "failed to map reserved buffer!\n"); + } + ret = ast_mode_config_init(ast); if (ret) return ERR_PTR(ret); -- 2.18.4 -- Thomas Zimmermann Graphics Driver Developer SUSE

Re: [syzbot] general protection fault in drm_client_buffer_vunmap

2021-04-11 Thread Thomas Zimmermann
#syz fix: drm/fb-helper: only unmap if buffer not null Am 11.04.21 um 14:01 schrieb syzbot: #syz fix: drm/fb-helper: only unmap if buffer not null -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg

Re: [PATCH v4 2/6] drm/sprd: add Unisoc's drm kms master

2021-04-09 Thread Thomas Zimmermann
ards Thomas if so, i will fix it, thks. Acked-by: Thomas Zimmermann mailto:tzimmerm...@suse.de>> > + > +     ret = platform_register_drivers(sprd_drm_drivers, > +                                     ARRAY_SIZE(sprd_drm_drivers)); > +     return ret;

Re: [PATCH v4 4/6] drm/sprd: add Unisoc's drm display controller driver

2021-04-08 Thread Thomas Zimmermann
xt *ctx, u32 offset, int index) +{ + u32 layer_offset = offset + index * DPU_LAY_REG_OFFSET; + + return readl(ctx->base + layer_offset); +} + +static inline void +layer_reg_wr(struct dpu_context *ctx, u32 offset, u32 cfg_bits, int index) +{ + u32 layer_offset = offset + index

Re: [PATCH v4 2/6] drm/sprd: add Unisoc's drm kms master

2021-04-08 Thread Thomas Zimmermann
platform_driver sprd_drm_driver = { + .probe = sprd_drm_probe, + .remove = sprd_drm_remove, + .shutdown = sprd_drm_shutdown, + .driver = { + .name = "sprd-drm-drv", + .of_match_table = drm_match_table, + }, +}; + +static struct platf

Re: [PATCH V3] drm/ast: Disable fast reset after DRAM initial

2021-03-31 Thread Thomas Zimmermann
Hi Am 31.03.21 um 08:56 schrieb Kuo-Hsiang Chou: Message-ID: <20201228030823.294147-1-kuohsiang_c...@aspeedtech.com> -Original Message- From: Thomas Zimmermann [mailto:tzimmerm...@suse.de] Sent: Monday, March 29, 2021 5:17 PM To: Kuo-Hsiang Chou ; dri-de...@lists.freedeskt

Re: [PATCH V3] drm/ast: Disable fast reset after DRAM initial

2021-03-29 Thread Thomas Zimmermann
mdelay(100); - ast_moutdwm(ast, 0x1e6e2070, 0x0080); - } - if (!ast_dram_init_2500(ast)) drm_err(dev, "DRAM init failed !\n"); -- 2.18.4 ___ dri-devel mailing list dri-de...@lists.freedesktop.org https:

Re: [PATCH v2 4/5] drm: Add and export function drm_gem_cma_sync_data

2021-03-15 Thread Thomas Zimmermann
gards Thomas -Paul -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer OpenPGP_signature Description: OpenPGP digital signature

Re: [PATCH v2 0/5] Add option to mmap GEM buffers cached

2021-03-10 Thread Thomas Zimmermann
Hi Am 10.03.21 um 20:02 schrieb Paul Cercueil: Hi Thomas, Le lun. 8 mars 2021 à 9:41, Thomas Zimmermann a écrit : Hi Paul, having individual functions for each mode only makes sense if the decision is at compile time. But in patch 5, you're working around your earlier design

Re: [PATCH v2 0/5] Add option to mmap GEM buffers cached

2021-03-08 Thread Thomas Zimmermann
| 14 +- include/drm/drm_gem_cma_helper.h | 13 ++ 5 files changed, 273 insertions(+), 30 deletions(-) -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix I

Re: [PATCH] drm/stm: ltdc: Use simple encoder

2021-03-04 Thread Thomas Zimmermann
g support */ - drm_encoder_init(ddev, encoder, _encoder_funcs, -DRM_MODE_ENCODER_DPI, NULL); + drm_simple_encoder_init(ddev, encoder, DRM_MODE_ENCODER_DPI); drm_encoder_helper_add(encoder, _encoder_helper_funcs); -- Thomas Zimmermann Graphics Driver Developer SUSE Software

Re: drm/ttm: ttm_bo_release called without lock

2021-03-03 Thread Thomas Zimmermann
man/listinfo/dri-devel -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer OpenPGP_signature Description: OpenPGP digital signature

Re: [PATCH] drm/stm: ltdc: Use simple encoder

2021-03-03 Thread Thomas Zimmermann
Am 02.03.21 um 18:57 schrieb Jagan Teki: STM ltdc driver uses an empty implementation for its encoder. Replace the code with the generic simple encoder. Signed-off-by: Jagan Teki Acked-by: Thomas Zimmermann --- drivers/gpu/drm/stm/ltdc.c | 12 ++-- 1 file changed, 2

Re: [PATCH] drm/fb-helper: only unmap if buffer not null

2021-03-02 Thread Thomas Zimmermann
Best regards Thomas Best, - Tong On Mon, Mar 1, 2021 at 3:26 AM Thomas Zimmermann wrote: Hi Am 28.02.21 um 05:46 schrieb Tong Zhang: drm_fbdev_cleanup() can be called when fb_helper->buffer is null, hence fb_helper->buffer should be checked before calling drm_client_buffer_vunm

Re: [PATCH] drm/fb-helper: only unmap if buffer not null

2021-03-01 Thread Thomas Zimmermann
(fb_helper->buffer); -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer OpenPGP_signature Description: OpenPGP digital signature

Re: udldrm does not recover from powersave? Re: udldrmfb: causes WARN in i915 on X60 (x86-32)

2021-02-26 Thread Thomas Zimmermann
___ dri-devel mailing list dri-de...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer

Re: udldrm does not recover from powersave? Re: udldrmfb: causes WARN in i915 on X60 (x86-32)

2021-02-25 Thread Thomas Zimmermann
...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer OpenPGP_signature Description: OpenPGP digital

Re: udldrmfb: causes WARN in i915 on X60 (x86-32)

2021-02-25 Thread Thomas Zimmermann
Best regards, Pavel -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer OpenPGP_sig

Re: [PATCH v3 01/11] drm/atomic: Pass the full state to planes async atomic check and update

2021-02-24 Thread Thomas Zimmermann
Hi Maxime, for the whole series: Acked-by: Thomas Zimmermann Am 19.02.21 um 13:00 schrieb Maxime Ripard: The current atomic helpers have either their object state being passed as an argument or the full atomic state. The former is the pattern that was done at first, before switching

Re: [PATCH] drm/ast: fix memory leak when unload the driver

2021-02-22 Thread Thomas Zimmermann
pci_dev *pdev) struct drm_device *dev = pci_get_drvdata(pdev); drm_dev_unregister(dev); + drm_atomic_helper_shutdown(dev); } static int ast_drm_freeze(struct drm_device *dev) -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH

Re: [PATCH v3 06/11] drm: Use state helper instead of plane state pointer in atomic_check

2021-02-22 Thread Thomas Zimmermann
viewed-by: Ville Syrjälä Signed-off-by: Maxime Ripard Acked-by: Thomas Zimmermann However, I find 'old plane state' somewhat confusing in this context, because it's actually the current plane state. Would it make sense to use drm_atomic_get_existing_plane_state() instead? Best regard

Re: [PATCH v3 05/11] drm: Use the state pointer directly in planes atomic_check

2021-02-22 Thread Thomas Zimmermann
te *state) { ... struct drm_plane_state *plane_state = drm_atomic_get_new_plane_state(state, plane); <... - plane_state->state + state ...> } Reviewed-by: Laurent Pinchart Signed-off-by: Maxime Ripard Acked-by: Thomas Zimmermann --- Changes from v1: - Fixed the formatt

Re: [PATCH v3 02/11] drm: Rename plane atomic_check state names

2021-02-22 Thread Thomas Zimmermann
Am 19.02.21 um 16:12 schrieb Maxime Ripard: Hi Thomas, Thanks for your review! On Fri, Feb 19, 2021 at 03:49:22PM +0100, Thomas Zimmermann wrote: diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3-plane.c index 075508051b5f..1873a155bb26 100644 --- a/drivers/gpu/drm

Re: [PATCH v3 04/11] drm/atomic: Pass the full state to planes atomic_check

2021-02-22 Thread Thomas Zimmermann
{ ... } @ include depends on adds_new_state @ @@ #include @ no_include depends on !include && adds_new_state @ @@ + #include #include Reviewed-by: Laurent Pinchart Signed-off-by: Maxime Ripard Acked-by: Thomas Zimmermann --- Changes from v1: - Rewording and removal of

Re: [PATCH] efifb: Ensure graphics device for efifb stays at PCI D0

2021-02-22 Thread Thomas Zimmermann
groups(>dev.kobj, efifb_groups); framebuffer_release(info); + pm_runtime_put(_pci_dev->dev); return 0; } -- 2.29.2 ___ dri-devel mailing list dri-de...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo

Re: [PATCH v3 02/11] drm: Rename plane atomic_check state names

2021-02-19 Thread Thomas Zimmermann
Am 19.02.21 um 13:00 schrieb Maxime Ripard: Most drivers call the argument to the plane atomic_check hook simply state, which is going to conflict with the global atomic state in a later rework. Let's rename it to new_plane_state (or new_state depending on the convention used in the driver).

Re: Regression: 6eb0233ec2d0 ("usb: don't inherity DMA properties for USB devices")

2021-02-18 Thread Thomas Zimmermann
Hi Am 18.02.21 um 16:07 schrieb Christoph Hellwig: On Thu, Feb 18, 2021 at 03:56:00PM +0100, Thomas Zimmermann wrote: I only have udl devices, but I expect that other DRM USB adapters are also affected. Find where the driver calls dma_map_* itself instead of using the USB wrappers and fix

Regression: 6eb0233ec2d0 ("usb: don't inherity DMA properties for USB devices")

2021-02-18 Thread Thomas Zimmermann
st disabled at (672931): [] asm_call_irq_on_stack+0x12/0x20 [ 60.458871] ---[ end trace f2f88696eb17806c ]--- -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer OpenPGP_signatur

Re: [PATCH v2 08/11] drm/qxl: fix monitors object vmap

2021-02-18 Thread Thomas Zimmermann
Am 17.02.21 um 13:32 schrieb Gerd Hoffmann: Use the correct vmap variant. We don't hold a reservation here, so we can't use the _locked variant. We can drop the pin because qxl_bo_vmap will do that for us. Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann I simply forgot to ack

Re: [PATCH v2 10/11] drm/qxl: rework cursor plane

2021-02-18 Thread Thomas Zimmermann
-by: Thomas Zimmermann for patches 9 and 10. Having the vmap calls fixed is at least worth it. Best regards Thomas So, no, I have no short-term plans for qxl beyond fixing pins + reservations + lockdep. take care, Gerd ___ dri-devel mailing list dri

Re: [PATCH v2 10/11] drm/qxl: rework cursor plane

2021-02-18 Thread Thomas Zimmermann
r_bo; + + qcrtc->cursor_bo = qxl_create_cursor(qdev, user_bo, + new_state->fb->hot_x, +new_state->fb->hot_y); + qxl_free_cursor(old_cursor_bo); + } + return qxl_bo_pin(user_bo); } -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer OpenPGP_signature Description: OpenPGP digital signature

Re: [PATCH v2 05/11] drm/qxl: rename qxl_bo_kmap -> qxl_bo_vmap_locked

2021-02-17 Thread Thomas Zimmermann
Am 17.02.21 um 13:32 schrieb Gerd Hoffmann: Append _locked to Make clear that these functions should be called with reserved bo's only. While being at it also rename kmap -> vmap. No functional change. Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann --- drivers/gpu/drm/

Re: [PATCH v2 06/11] drm/qxl: add qxl_bo_vmap/qxl_bo_vunmap

2021-02-17 Thread Thomas Zimmermann
Am 17.02.21 um 13:32 schrieb Gerd Hoffmann: Add vmap/vunmap variants which reserve (and pin) the bo. They can be used in case the caller doesn't hold a reservation for the bo. Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann --- drivers/gpu/drm/qxl/qxl_object.h | 2

Re: [PATCH v2 04/11] drm/qxl: fix lockdep issue in qxl_alloc_release_reserved

2021-02-17 Thread Thomas Zimmermann
qxl_bo_unref(_bo); + } ret = qxl_release_list_add(*release, bo); qxl_bo_unref(); -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer OpenPGP_signature Description: OpenPGP digital signature

Re: [PATCH v2 03/11] drm/qxl: use ttm bo priorities

2021-02-17 Thread Thomas Zimmermann
it *much* less likely that ttm_bo_mem_force_space() picks something which can't be evicted and throws an error after waiting a while without success. Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann --- drivers/gpu/drm/qxl/qxl_object.h | 1 + drivers/gpu/drm/qxl/qxl_cmd.c | 2

Re: [PATCH v2 02/11] drm/qxl: more fence wait rework

2021-02-17 Thread Thomas Zimmermann
_wait") Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann --- drivers/gpu/drm/qxl/qxl_release.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_release.c b/drivers/gpu/drm/qxl/qxl_release.c index 6ed673d75f9f..579c6de10

Re: [PATCH v9 0/4] Add %p4cc printk modifier for V4L2 and DRM fourcc codes

2021-02-17 Thread Thomas Zimmermann
ckpatch.pl | 6 +- 32 files changed, 164 insertions(+), 223 deletions(-) -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer OpenPGP_signature D

Re: [PATCH 09/10] drm/qxl: map/unmap framebuffers in prepare_fb+cleanup_fb callbacks.

2021-02-17 Thread Thomas Zimmermann
Hi Am 17.02.21 um 11:02 schrieb Gerd Hoffmann: On Tue, Feb 16, 2021 at 02:46:21PM +0100, Thomas Zimmermann wrote: Am 16.02.21 um 14:27 schrieb Thomas Zimmermann: Hi this is a shadow-buffered plane. Did you consider using the new helpers for shadow-buffered planes? They will map the user BO

Re: [PATCH 09/10] drm/qxl: map/unmap framebuffers in prepare_fb+cleanup_fb callbacks.

2021-02-16 Thread Thomas Zimmermann
Am 16.02.21 um 14:27 schrieb Thomas Zimmermann: Hi this is a shadow-buffered plane. Did you consider using the new helpers for shadow-buffered planes? They will map the user BO for you and provide the mapping in the plane state. From there, you should implement your own plane state

Re: [PATCH 10/10] drm/qxl: add lock asserts to qxl_bo_kmap_locked + qxl_bo_kunmap_locked

2021-02-16 Thread Thomas Zimmermann
Hi Am 16.02.21 um 12:37 schrieb Gerd Hoffmann: Try avoid re-introducing locking bugs. Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann IMHO this should eventually be done in the rsp TTM functions. But so far, I'd expect this to break some drivers. Best regards Thomas

Re: [PATCH 09/10] drm/qxl: map/unmap framebuffers in prepare_fb+cleanup_fb callbacks.

2021-02-16 Thread Thomas Zimmermann
if (old_state->fb != plane->state->fb && user_bo->shadow) { qxl_bo_unpin(user_bo->shadow); -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäft

Re: [PATCH 08/10] drm/qxl: fix monitors object kmap

2021-02-16 Thread Thomas Zimmermann
Am 16.02.21 um 12:37 schrieb Gerd Hoffmann: Use the correct kmap variant. We don't hold a reservation here, so we can't use the _locked variant. We can drop the pin because qxl_bo_kmap will do that for us. Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann --- drivers/gpu/drm

Re: [PATCH 06/10] drm/qxl: add qxl_bo_kmap/qxl_bo_kunmap

2021-02-16 Thread Thomas Zimmermann
erve(bo); + return 0; +} + void qxl_bo_kunmap_atomic_page(struct qxl_device *qdev, struct qxl_bo *bo, void *pmap) { -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG

Re: [PATCH 07/10] drm/qxl: fix prime kmap

2021-02-16 Thread Thomas Zimmermann
oid qxl_gem_prime_vunmap(struct drm_gem_object *obj, { struct qxl_bo *bo = gem_to_qxl_bo(obj); - qxl_bo_kunmap_locked(bo); + qxl_bo_kunmap(bo); } int qxl_gem_prime_mmap(struct drm_gem_object *obj, -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany G

Re: [PATCH 05/10] drm/qxl: rename qxl_bo_kmap -> qxl_bo_kmap_locked

2021-02-16 Thread Thomas Zimmermann
71,7 +71,7 @@ void qxl_gem_prime_vunmap(struct drm_gem_object *obj, { struct qxl_bo *bo = gem_to_qxl_bo(obj); - qxl_bo_kunmap(bo); + qxl_bo_kunmap_locked(bo); } int qxl_gem_prime_mmap(struct drm_gem_object *obj, -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions

Re: [PATCH 01/10] drm/qxl: properly handle device init failures

2021-02-16 Thread Thomas Zimmermann
Am 16.02.21 um 12:37 schrieb Gerd Hoffmann: Specifically do not try release resources which where not allocated in the first place. I still think this should eventually be resolved by using managed code. But for now Acked-by: Thomas Zimmermann Cc: Tong Zhang Tested-by: Tong Zhang

Re: [PATCH v7 3/3] drm: Switch to %p4cc format modifier

2021-02-16 Thread Thomas Zimmermann
/drm/drm_fourcc.h | 1 - 27 files changed, 64 insertions(+), 157 deletions(-) This is a nice patchset. For the driver-related changes: Acked-by: Thomas Zimmermann But landing this patch will certainly give us build errors. There are at least 3 git trees involved: drm-misc

Re: [RFC v3 10/10] drm/dp: Extract i915's eDP backlight code into DRM helpers

2021-02-15 Thread Thomas Zimmermann
* @max: The maximum backlight level that may be set + * @lsb_reg_used: Do we also write values to the DP_EDP_BACKLIGHT_BRIGHTNESS_LSB register? + * @aux_enable: Does the panel support the AUX enable cap? + * + * This structure contains various data about an eDP backlight, which can be populated by

Re: DMA-buf and uncached system memory

2021-02-15 Thread Thomas Zimmermann
Hi Am 15.02.21 um 10:49 schrieb Thomas Zimmermann: Hi Am 15.02.21 um 09:58 schrieb Christian König: Hi guys, we are currently working an Freesync and direct scan out from system memory on AMD APUs in A+A laptops. On problem we stumbled over is that our display hardware needs to scan out

Re: DMA-buf and uncached system memory

2021-02-15 Thread Thomas Zimmermann
/mailman/listinfo/dri-devel -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer OpenPGP_signature Description: OpenPGP digital signature

Re: [PATCH v3] kcmp: Support selection of SYS_kcmp without CHECKPOINT_RESTORE

2021-02-15 Thread Thomas Zimmermann
with transactional programming in userspace system code. So FWIW Acked-by: Thomas Zimmermann Note that some distributions such as Ubuntu are already enabling CHECKPOINT_RESTORE in their configs and so, by extension, SYS_kcmp. References: https://gitlab.freedesktop.org/drm/intel/-/issues/3046 Signed-off

Re: [RFC v3 10/10] drm/dp: Extract i915's eDP backlight code into DRM helpers

2021-02-08 Thread Thomas Zimmermann
alues to the DP_EDP_BACKLIGHT_BRIGHTNESS_LSB register? + * @aux_enable: Does the panel support the AUX enable cap? + * + * This structure contains various data about an eDP backlight, which can be populated by using + * drm_edp_backlight_init(). + */ +struct drm_edp_backlight_info { + u8 pwmgen_bit_

Re: [PATCH][V2] drm/mgag200: make a const array static, makes object smaller

2021-02-05 Thread Thomas Zimmermann
9978 drivers/gpu/drm/mgag200/mgag200_mode.o After: text data bss dechex filename 34625 4616 0 39241 9949 drivers/gpu/drm/mgag200/mgag200_mode.o (gcc version 10.2.0) Signed-off-by: Colin Ian King Reviewed-by: Thomas Zimmermann --- V2: move static

Re: [PATCH v6 02/10] Revert "drm/qxl: do not run release if qxl failed to init"

2021-02-04 Thread Thomas Zimmermann
nit() fails. I see two solutions: either roll-back manually, or use our new managed DRM interfaces. This is what the other drivers do. Best regards Thomas qxl_modeset_fini(qdev); qxl_device_fini(qdev); Thanks, - Tong On Feb 4, 2021, at 1:34 PM, Thomas Zimmermann wrote: Hi

Re: [PATCH v6 02/10] Revert "drm/qxl: do not run release if qxl failed to init"

2021-02-04 Thread Thomas Zimmermann
red correctly. With the citation style address: Acked-by: Thomas Zimmermann qxl_modeset_fini(qdev); qxl_device_fini(qdev); } -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäfts

Re: [PATCH] drm/mgag200: make a const array static, makes object smaller

2021-02-04 Thread Thomas Zimmermann
figure this out automatically. When I once tested this (in userspace) it did so. Maybe the kernel is different? For style reasons, I would have moved the static definition to the top of the function; before the variable declarations. In any case: Reviewed-by: Thomas Zimmermann If I don't

Re: [PATCH v6 10/10] drm/qxl: allocate dumb buffers in ram

2021-02-04 Thread Thomas Zimmermann
go into system ram by default, and only move into device memory when they have to. Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann --- drivers/gpu/drm/qxl/qxl_dumb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/qxl/qxl_dumb.c b/drivers

Re: [PATCH v6 06/10] drm/qxl: properly pin/unpin shadow

2021-02-04 Thread Thomas Zimmermann
Am 04.02.21 um 15:57 schrieb Gerd Hoffmann: Suggested-by: Thomas Zimmermann Signed-off-by: Gerd Hoffmann Thanks for this. Acked-by: Thomas Zimmermann --- drivers/gpu/drm/qxl/qxl_display.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b

Re: [PATCH v6 05/10] drm/qxl: release shadow on shutdown

2021-02-04 Thread Thomas Zimmermann
Am 04.02.21 um 15:57 schrieb Gerd Hoffmann: In case we have a shadow surface on shutdown release it so it doesn't leak. Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann --- drivers/gpu/drm/qxl/qxl_display.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu

Re: [PATCH v5 6/6] drm/qxl: simplify qxl_fence_wait

2021-02-03 Thread Thomas Zimmermann
Am 03.02.21 um 14:16 schrieb Gerd Hoffmann: Now that we have the new release_event wait queue we can just use that in qxl_fence_wait() and simplify the code alot. Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann --- drivers/gpu/drm/qxl/qxl_release.c | 42

Re: [PATCH v5 5/6] drm/qxl: properly free qxl releases

2021-02-03 Thread Thomas Zimmermann
qxl_device *qdev, unsigned long size, *rbo = NULL; return idr_ret; } + atomic_inc(>release_count); mutex_lock(>release_mutex); if (qdev->current_release_bo_offset[cur_idx] + 1 >= releases_per_bo[cur_idx]) { -- T

Re: [PATCH v5 4/6] drm/qxl: handle shadow in primary destroy

2021-02-03 Thread Thomas Zimmermann
Am 03.02.21 um 14:16 schrieb Gerd Hoffmann: qxl_primary_atomic_disable must check whenever the framebuffer bo has a shadow surface and in case it has check the shadow primary status. I believe you :) Acked-by: Thomas Zimmermann Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl

Re: [PATCH v5 3/6] drm/qxl: release shadow on shutdown

2021-02-03 Thread Thomas Zimmermann
lane_prepare_fb()? Best regards Thomas qxl_destroy_monitors_object(qdev); } -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer OpenPGP_signature Descr

Re: [PATCH v5 2/6] drm/qxl: unpin release objects

2021-02-03 Thread Thomas Zimmermann
Am 03.02.21 um 14:16 schrieb Gerd Hoffmann: Balances the qxl_create_bo(..., pinned=true, ...); call in qxl_release_bo_alloc(). Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann --- drivers/gpu/drm/qxl/qxl_release.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers

Re: [PATCH] drm/nouveau: remove set but not used variable ‘pdev’ in nouveau_bios_init

2021-02-03 Thread Thomas Zimmermann
ces */ if (!dev_is_pci(dev->dev)) return 0; - pdev = to_pci_dev(dev->dev); if (!NVInitVBIOS(dev)) return -ENODEV; -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG

Re: fbcon: remove soft scrollback code (missing Doc. patch)

2021-02-03 Thread Thomas Zimmermann
hen scrolls aways because it's getting buried under further fail. Your locking needs to be minimally good enough to not make the situation worse. When an oops happens, all bets are off... Gr{oetje,eeting}s, Geert -- Thomas Zimmermann Graphics Driver Developer SUSE Softw

Re: [PATCH v3 3/4] drm/qxl: release shadow on shutdown

2021-01-22 Thread Thomas Zimmermann
->dumb_shadow_bo) { Wrt to my comment on patch 2, this might be the place to unpin the BO. + drm_gem_object_put(>dumb_shadow_bo->tbo.base); + qdev->dumb_shadow_bo = NULL; + } qxl_destroy_monitors_object(qdev); } -- Thomas Zimmermann Graphics Driv

Re: [PATCH v3 2/4] drm/qxl: unpin release objects

2021-01-22 Thread Thomas Zimmermann
qxl_bo_unref(); list_del(>tv.head); kfree(entry); -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer OpenPGP_signature Description: OpenPGP digital signature

Re: [PATCH v3 1/4] drm/qxl: use drmm_mode_config_init

2021-01-22 Thread Thomas Zimmermann
Am 20.01.21 um 12:12 schrieb Gerd Hoffmann: Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Acked-by: Thomas Zimmermann --- drivers/gpu/drm/qxl/qxl_display.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers

Re: [PATCH] drm/ast: Update the sequence of Clearing Fast-reset

2021-01-21 Thread Thomas Zimmermann
; } while (data != 1); ast_moutdwm(ast, 0x1e6e207c, 0x0800); /* clear fast reset */ } -- 2.18.4 ___ dri-devel mailing list dri-de...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Thomas

Re: Change eats memory on my server

2021-01-18 Thread Thomas Zimmermann
Hi Am 18.01.21 um 14:23 schrieb Christian König: Am 18.01.21 um 14:22 schrieb Eli Cohen: On Mon, Jan 18, 2021 at 02:20:49PM +0100, Thomas Zimmermann wrote: Hi Am 18.01.21 um 14:16 schrieb Eli Cohen: On Mon, Jan 18, 2021 at 10:30:56AM +0100, Thomas Zimmermann wrote: Here's the patch against

Re: Change eats memory on my server

2021-01-18 Thread Thomas Zimmermann
Hi Am 18.01.21 um 14:16 schrieb Eli Cohen: On Mon, Jan 18, 2021 at 10:30:56AM +0100, Thomas Zimmermann wrote: Here's the patch against the latest DRM tree. v5.11-rc3 should work as well. I was able to reproduce the memory leak locally and found that the patch fixes it. Please give it a try

Re: Change eats memory on my server

2021-01-18 Thread Thomas Zimmermann
Hi Am 18.01.21 um 10:13 schrieb Eli Cohen: On Mon, Jan 18, 2021 at 08:54:07AM +0100, Thomas Zimmermann wrote: Hi Am 18.01.21 um 08:43 schrieb Christian König: Hi Eli, have you already tried using kmemleak? This sounds like a leak of memory allocated using kmalloc(), so kmemleak should

Re: [PATCH v2] drm/ast: Disable fast reset after DRAM initial

2021-01-18 Thread Thomas Zimmermann
} - if (!ast_dram_init_2500(ast)) drm_err(dev, "DRAM init failed !\n"); -- 2.18.4 ___ dri-devel mailing list dri-de...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Thomas Zim

Re: Change eats memory on my server

2021-01-17 Thread Thomas Zimmermann
, 2021 at 10:03:50AM +0100, Thomas Zimmermann wrote: Could you please double-check that 3fb91f56aea4 ("drm/udl: Retrieve USB device from struct drm_device.dev") works correctly Checked again, it does not seem to leak. and that 823efa922102 ("drm/cma-helper: Remove empty drm_gem_c

Re: [PATCH v3] drm: Improve the output_poll_changed description

2021-01-17 Thread Thomas Zimmermann
nvolvement by +* the driver. */ void (*output_poll_changed)(struct drm_device *dev); -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix I

Re: [PATCH 02/10] drm: Rename plane atomic_check state names

2021-01-15 Thread Thomas Zimmermann
Hi Am 15.01.21 um 13:56 schrieb Maxime Ripard: diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3-plane.c index 8a4235d9d9f1..2cb09e9d9306 100644 --- a/drivers/gpu/drm/imx/ipuv3-plane.c +++ b/drivers/gpu/drm/imx/ipuv3-plane.c @@ -344,12 +344,12 @@ static const struct

Re: [PATCH 01/10] drm/atomic: Pass the full state to planes async atomic check and update

2021-01-15 Thread Thomas Zimmermann
|| old_vc4_state->pos2_offset != new_vc4_state->pos2_offset || old_vc4_state->ptr0_offset != new_vc4_state->ptr0_offset || - vc4_lbm_size(plane->state) != vc4_lbm_size(state)) + vc4_lbm_size(plane->state) != vc4_lbm_size(new_plane_state))

Re: Change eats memory on my server

2021-01-15 Thread Thomas Zimmermann
(cc'ing dri-devel) Hi Am 14.01.21 um 16:15 schrieb Eli Cohen: Hi Thomas, After long bisecting I found that this patch, commit 1086db71a1dbbfb32ffb42cf0d540b69956f951e Author: Thomas Zimmermann Date: Tue Nov 3 10:30:06 2020 +0100 drm/vram-helper: Remove invariant parameters from

Re: linux-next: build failure after merge of the drm-misc tree

2021-01-14 Thread Thomas Zimmermann
y. Sorry for the breakage. Fixed in drm-misc-next. Best regards Thomas -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer OpenPGP_signature Description: OpenP

Re: [PATCH] drm/hisilicon: Use drm_crtc_mask()

2021-01-10 Thread Thomas Zimmermann
Hi Am 11.01.21 um 04:30 schrieb Tian Tao: Use drm_crtc_mask() where appropriate. Signed-off-by: Tian Tao Looks like the right thing to do. Acked-by: Thomas Zimmermann Best regards Thomas --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c | 3 ++- 1 file changed, 2 insertions(+), 1

Re: [PATCH] drm/ast: Disable fast reset after DRAM initial

2021-01-10 Thread Thomas Zimmermann
if (!ast_dram_init_2500(ast)) drm_err(dev, "DRAM init failed !\n"); -- 2.18.4 ___ dri-devel mailing list dri-de...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Thomas Zimmermann

Re: [PATCH] drm/hisilicon: Use simple encoder

2021-01-04 Thread Thomas Zimmermann
Hi Am 28.12.20 um 08:35 schrieb Tian Tao: The hibmc driver uses empty implementations for its encoders. Replace the code with the generic simple encoder. Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann Thanks for the patch. --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_vdac.c

Re: [PATCH v2] drm/hisilicon: Add load and unload callback functions

2021-01-04 Thread Thomas Zimmermann
static const struct pci_device_id hibmc_pci_table[] = { -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfeldstr. 5, 90409 Nürnberg, Germany (HRB 36809, AG Nürnberg) Geschäftsführer: Felix Imendörffer OpenPGP_signature Description: OpenPGP digital signature

Re: [PATCH] drm/hisilicon: Fix rmmod hibmc_drm failed

2020-12-14 Thread Thomas Zimmermann
MSI failed: %d\n", ret); } else { - ret = devm_drm_irq_install(dev, dev->pdev->irq); + ret = drm_irq_install(dev, dev->pdev->irq); if (ret) drm_warn(dev, "install irq failed: %d\n", ret);

Re: [PATCH] drm/drv: switch to using devm_add_action_or_reset()

2020-12-07 Thread Thomas Zimmermann
Am 07.12.20 um 02:04 schrieb Tian Tao: switch to using devm_add_action_or_reset() instead of devm_add_action. Signed-off-by: Tian Tao I'm surprised that devm_drm_dev_init() didn't already use devm_add_action_or_reset(). But it doesn't look special, so Acked-by: Thomas Zimmermann

Re: [PATCH drm/hisilicon v2 1/2] drm/hisilicon: Use managed mode-config init

2020-12-07 Thread Thomas Zimmermann
Hi Am 07.12.20 um 10:29 schrieb tiantao (H): 在 2020/12/7 17:22, Thomas Zimmermann 写道: Hi Am 07.12.20 um 10:05 schrieb Tian Tao: Using drmm_mode_config_init() sets up managed release of modesetting resources. Individual patches usually contain a changelog to highlight the difference

Re: [PATCH drm/hisilicon v2 1/2] drm/hisilicon: Use managed mode-config init

2020-12-07 Thread Thomas Zimmermann
for the series already does this correctly. Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann Thanks for all these updates. --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 14 +++--- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h | 1 - 2 files changed, 3 insertions(+), 12

Re: [PATCH drm/hisilicon 1/2] drm/hisilicon: Use managed mode-config init

2020-12-07 Thread Thomas Zimmermann
c int hibmc_unload(struct drm_device *dev) drm_atomic_helper_shutdown(dev); pci_disable_msi(dev->pdev); - hibmc_kms_fini(priv); dev->dev_private = NULL; return 0; } -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Maxfe

Re: [PATCH drm/hisilicon 2/2] drm/hisilicon: Delete unused local parameters

2020-12-07 Thread Thomas Zimmermann
Am 07.12.20 um 01:49 schrieb Tian Tao: delete unused variable ‘priv’ to avoid warning. Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm

Re: [PATCH] drm/hisilicon: Deletted the entire file hibmc_ttm.c

2020-12-03 Thread Thomas Zimmermann
Tao Code changes look good. Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/hisilicon/hibmc/Makefile| 2 +- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.c | 21 ++- drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h | 4 -- drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c |

Re: [drm/fb] 1d46491d4a: WARNING:at_drivers/gpu/drm/drm_fb_helper.c:#drm_fb_helper_damage_work[drm_kms_helper]

2020-12-03 Thread Thomas Zimmermann
Hi Am 03.12.20 um 09:36 schrieb Oliver Sang: On Thu, Dec 03, 2020 at 08:41:49AM +0100, Thomas Zimmermann wrote: Hi there should be a line in the kernel log that says something like "Damage blitter failed" with an error code. Is there any chance of recovering it? Hi Thomas, w

Re: [drm/fb] 1d46491d4a: WARNING:at_drivers/gpu/drm/drm_fb_helper.c:#drm_fb_helper_damage_work[drm_kms_helper]

2020-12-02 Thread Thomas Zimmermann
gcc-9 ARCH=i386 INSTALL_MOD_PATH= modules_install cd find lib/ | cpio -o -H newc --quiet | gzip > modules.cgz git clone https://github.com/intel/lkp-tests.git cd lkp-tests bin/lkp qemu -k -m modules.cgz job-script # job-script is attached in this email

Re: [PATCH] drm/hisilicon: Use managed VRAM-helper initialization

2020-12-02 Thread Thomas Zimmermann
Hi Am 03.12.20 um 04:09 schrieb Tian Tao: updated to use drmm_vram_helper_init() Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann As a good follow-up patch, I would suggest to get rig of the entire file hibmc_ttm.c. drmm_vram_helper_init() can be called directly from hibmc_load

Re: [PATCH drm/hisilicon v2 2/3] drm/irq: Add the new api to install irq

2020-12-02 Thread Thomas Zimmermann
Am 02.12.20 um 10:26 schrieb Tian Tao: Add new api devm_drm_irq_install() to register interrupts, no need to call drm_irq_uninstall() when the drm module is removed. Signed-off-by: Tian Tao Reviewed-by: Thomas Zimmermann --- drivers/gpu/drm/drm_irq.c | 32

Re: [PATCH drm/hisilicon 1/3] drm/hisilicon: Code refactoring for hibmc_drm_drv

2020-12-02 Thread Thomas Zimmermann
Am 02.12.20 um 09:47 schrieb Tian Tao: Use the devm_drm_dev_alloc provided by the drm framework to alloc a structure hibmc_drm_private. Signed-off-by: Tian Tao This looks good now. Thanks for sticking to it. Acked-by: Thomas Zimmermann --- drivers/gpu/drm/hisilicon/hibmc

Re: [PATCH drm/hisilicon 2/3] drm/irq: Add the new api to install irq

2020-12-02 Thread Thomas Zimmermann
q.h @@ -28,5 +28,5 @@ struct drm_device; int drm_irq_install(struct drm_device *dev, int irq); int drm_irq_uninstall(struct drm_device *dev); - +int devm_drm_irq_install(struct drm_device *dev, int irq); #endif -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany G

Re: [PATCH drm/hisilicon v2 1/4] drm/hisilicon: Assgin local variable to drm_device

2020-12-01 Thread Thomas Zimmermann
Hi Am 02.12.20 um 03:54 schrieb tiantao (H): 在 2020/12/2 10:06, tiantao (H) 写道: 在 2020/12/1 21:44, Thomas Zimmermann 写道: Hi Am 01.12.20 um 14:05 schrieb tiantao (H): 在 2020/12/1 20:36, Thomas Zimmermann 写道: Hi Am 01.12.20 um 13:26 schrieb tiantao (H): 在 2020/12/1 20:17, Thomas

Re: [PATCH drm/hisilicon v2 1/4] drm/hisilicon: Assgin local variable to drm_device

2020-12-01 Thread Thomas Zimmermann
Hi Am 01.12.20 um 14:05 schrieb tiantao (H): 在 2020/12/1 20:36, Thomas Zimmermann 写道: Hi Am 01.12.20 um 13:26 schrieb tiantao (H): 在 2020/12/1 20:17, Thomas Zimmermann 写道: Hi Am 01.12.20 um 12:55 schrieb Tian Tao: Assign local variable to struct drm_device *dev because they are used

Re: [PATCH drm/hisilicon v2 1/4] drm/hisilicon: Assgin local variable to drm_device

2020-12-01 Thread Thomas Zimmermann
Hi Am 01.12.20 um 13:26 schrieb tiantao (H): 在 2020/12/1 20:17, Thomas Zimmermann 写道: Hi Am 01.12.20 um 12:55 schrieb Tian Tao: Assign local variable to struct drm_device *dev because they are used multiple times within a function. Signed-off-by: Tian Tao ---   drivers/gpu/drm/hisilicon

  1   2   3   >