Re: liboutput: thoughts about shared library on top of DRM/KMS

2019-10-08 Thread Heinrich Fink
would also really help companies behind these products to better work with the open-source community, i.e. being able to contribute to a set of shared helper libraries. - Heinrich ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v2] drm: Add high-precision time to vblank trace event

2019-09-23 Thread Heinrich Fink
On Mon, 23 Sep 2019 at 14:06, Daniel Vetter wrote: > > On Sat, Sep 21, 2019 at 10:33 AM Heinrich Fink > wrote: > > > > On Tue, 3 Sep 2019 at 11:53, Daniel Vetter wrote: > > > > > > On Tue, Sep 03, 2019 at 11:19:19AM +0200, Heinrich Fink wrote: > > &

Re: [PATCH v2] drm: Add high-precision time to vblank trace event

2019-09-22 Thread Heinrich Fink
On Tue, 3 Sep 2019 at 11:53, Daniel Vetter wrote: > > On Tue, Sep 03, 2019 at 11:19:19AM +0200, Heinrich Fink wrote: > > On Tue, 3 Sep 2019 at 09:46, Daniel Vetter wrote: > > > > > > On Mon, Sep 02, 2019 at 04:24:12PM +0200, Heinrich Fink wrote: > > > >

Re: [PATCH v2] drm: Add high-precision time to vblank trace event

2019-09-03 Thread Heinrich Fink
On Tue, 3 Sep 2019 at 09:46, Daniel Vetter wrote: > > On Mon, Sep 02, 2019 at 04:24:12PM +0200, Heinrich Fink wrote: > > Store the timestamp of the current vblank in the new field 'time' of the > > vblank trace event. If the timestamp is calculated by a driver that > >

[PATCH v2] drm: Add high-precision time to vblank trace event

2019-09-02 Thread Heinrich Fink
-by: Heinrich Fink --- drivers/gpu/drm/drm_trace.h | 14 ++ drivers/gpu/drm/drm_vblank.c | 3 ++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/drm_trace.h b/drivers/gpu/drm/drm_trace.h index 471eb927474b..11c6dd577e8e 100644 --- a/drivers/gpu/drm

Re: [PATCH] drm: Add high-precision time to vblank trace event

2019-09-02 Thread Heinrich Fink
Thanks for the review, Daniel. I noticed that my last name was missing in the initial revision (my git config was messed up). I am sending v2 of this patch to fix this, including your r/b tag. Cheers, Heinrich ___ dri-devel mailing list dri-devel

[PATCH] drm: Add high-precision time to vblank trace event

2019-08-09 Thread Heinrich
infrastructure. Tracing applications (such as GPUVis, see [0] for related discussion), can use the newly added information to conduct a more accurate analysis of display timing. [0] https://github.com/mikesart/gpuvis/issues/30 Signed-off-by: Heinrich --- drivers/gpu/drm/drm_trace.h | 14

[PATCH 1/1] drm/radeon: avoid NULL dereference, si_get_vce_clock_voltage

2016-08-22 Thread Heinrich Schuchardt
On 08/21/2016 11:06 PM, Joe Perches wrote: > On Sun, 2016-08-21 at 22:52 +0200, Heinrich Schuchardt wrote: >> It does not make sense to check if table is NULL >> and afterwards to dereference it without >> considering the result. > > This makes no sense. > >

[PATCH 1/1] drm/vmwgfx: avoid possible NULL pointer dereference

2016-08-22 Thread Heinrich Schuchardt
The comment describing function vmw_cmd_res_reloc_add explicitely mentions p_val may be NULL. We should not assign a value (NULL) to *p_val in this case. Signed-off-by: Heinrich Schuchardt --- drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions

[PATCH 1/1] virtio-gpu: avoid possible NULL pointer dereference

2016-08-22 Thread Heinrich Schuchardt
If output is NULL it is not permissable to dereference it. So we should leave the respective function in this case. The inconsistency was indicated by cppcheck. No actual NULL pointer dereference was observed. Signed-off-by: Heinrich Schuchardt --- drivers/gpu/drm/virtio/virtgpu_plane.c | 6

[PATCH 1/1] drm/radeon: avoid NULL dereference, si_get_vce_clock_voltage

2016-08-21 Thread Heinrich Schuchardt
It does not make sense to check if table is NULL and afterwards to dereference it without considering the result. The inconsistency was indicated by cppcheck. An actual NULL pointer dereference was not observed. Signed-off-by: Heinrich Schuchardt --- drivers/gpu/drm/radeon/si_dpm.c | 2 +- 1

[PATCH 1/1] drm/radeon: remove dead code, si_mc_load_microcode

2016-08-21 Thread Heinrich Schuchardt
In an if block for (running == 0) running cannot be non-zero. Signed-off-by: Heinrich Schuchardt --- drivers/gpu/drm/radeon/si.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c index 2523ca9..41da47d 100644 --- a/drivers/gpu

[PATCH 1/1] drm/gma500: dont expose stack, mrst_lvds_find_best_pll

2016-08-21 Thread Heinrich Schuchardt
All components of variable clock should be initialized to avoid bytes from the kernel stack to be exposed. Reported-by: Joe Perches Signed-off-by: Heinrich Schuchardt --- drivers/gpu/drm/gma500/oaktrail_crtc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/gma500

[PATCH 1/1] drm/radeon/cik: remove dead code

2016-08-21 Thread Heinrich Schuchardt
In an if block for (running == 0) running cannot be non-zero. Signed-off-by: Heinrich Schuchardt --- drivers/gpu/drm/radeon/cik.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/gpu/drm/radeon/cik.c b/drivers/gpu/drm/radeon/cik.c index 0c1b9ff..c8e1515 100644 --- a/drivers

[PATCH] drm/gma500: dont expose bytes from kernel stack

2016-08-21 Thread Heinrich Schuchardt
On 08/21/2016 08:46 PM, Joe Perches wrote: > On Sun, 2016-08-21 at 20:39 +0200, Heinrich Schuchardt wrote: >> Components m1, m2, p2, dot, vco of variable clock should be >> initialized to avoid bytes from the kernel stack to be >> exposed. > > How was this found? visual

[PATCH 1/1] drm/amdgpu/gmc7: remove dead code

2016-08-21 Thread Heinrich Schuchardt
On 08/21/2016 08:29 PM, Joe Perches wrote: > On Sun, 2016-08-21 at 20:06 +0200, Heinrich Schuchardt wrote: >> In an if block for (running == 0) running cannot be non-zero. > > This code could also be better unindented by one level > (all of the block would fit 80 co

[PATCH] drm/gma500: dont expose bytes from kernel stack

2016-08-21 Thread Heinrich Schuchardt
Components m1, m2, p2, dot, vco of variable clock should be initialized to avoid bytes from the kernel stack to be exposed. Signed-off-by: Heinrich Schuchardt --- drivers/gpu/drm/gma500/oaktrail_crtc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/gma500/oaktrail_crtc.c b

[PATCH 1/1] drm/amd/powerplay: avoid NULL dereference, cz_hwmgr.c

2016-08-21 Thread Heinrich Schuchardt
if (a == NULL || a->b == NULL) leads to a NULL pointer dereference if a == NULL. Signed-off-by: Heinrich Schuchardt --- drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/cz_hwmgr.c b/driv

[PATCH 1/1] drm/amd/powerplay: avoid NULL pointer dereference

2016-08-21 Thread Heinrich Schuchardt
if (a == NULL || a->b == NULL) leads to a NULL pointer dereference if a == NULL. Signed-off-by: Heinrich Schuchardt --- drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/driv

[PATCH 1/1] drm/amdgpu/gmc8: remove dead code

2016-08-21 Thread Heinrich Schuchardt
In an if block for (running == 0) running cannot be non-zero. Signed-off-by: Heinrich Schuchardt --- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c index 2aee2c6

[PATCH 1/1] drm/amdgpu/gmc7: remove dead code

2016-08-21 Thread Heinrich Schuchardt
In an if block for (running == 0) running cannot be non-zero. Signed-off-by: Heinrich Schuchardt --- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c index 0b0f086

[PATCH 1/1] drm: avoid exposing kernel stack in compat_drm_getstats

2016-08-21 Thread Heinrich Schuchardt
The C standard does not specify the size of the integer used to store an enum. Hence in structure drm_stats32_t alignment bytes may exist. To avoid exposing bytes from the kernel stack it is necessary to initialize variable s32 completely. Signed-off-by: Heinrich Schuchardt --- drivers/gpu/drm

[PATCH 1/1] drm/msm/mdp4: avoid possible null pointer dereference

2016-05-19 Thread Heinrich Schuchardt
Do not dereference pll_rate before checking if it is NULL. Signed-off-by: Heinrich Schuchardt --- drivers/gpu/drm/msm/mdp/mdp4/mdp4_lvds_pll.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_lvds_pll.c b/drivers/gpu/drm/msm/mdp/mdp4

[PATCH 1/1] drm/mediatek: do not dereference NULL

2016-05-18 Thread Heinrich Schuchardt
After having verified that dpi is NULL we should not dereference it. Signed-off-by: Heinrich Schuchardt --- drivers/gpu/drm/mediatek/mtk_dpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediatek/mtk_dpi.c index

[PATCH 1/1] drm/gma500: mdfld: avoid possible null pointer dereference

2016-05-18 Thread Heinrich Schuchardt
Only dereference sender after checking if sender is NULL. Signed-off-by: Heinrich Schuchardt --- drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/gma500/mdfld_dsi_pkg_sender.c b/drivers/gpu/drm/gma500

[PATCH] drm/mm: avoid possible null pointer dereference

2016-05-18 Thread Heinrich Schuchardt
Do not dereference node before the check if node is NULL. Signed-off-by: Heinrich Schuchardt --- drivers/gpu/drm/drm_mm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_mm.c b/drivers/gpu/drm/drm_mm.c index 04de6fd..cb39f45 100644 --- a/drivers/gpu

[PATCH] drm/nouveau: avoid memory leak

2014-06-18 Thread Heinrich Schuchardt
If ttm_dma_tt_init fails memory is leaked. Signed-off-by: Heinrich Schuchardt --- drivers/gpu/drm/nouveau/nouveau_sgdma.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_sgdma.c b/drivers/gpu/drm/nouveau/nouveau_sgdma.c index a4d22e5