Re: Re: [PATCH] Fixes: fc2a69f3903d ("drm/atomic: Handling the case when, setting old crtc for plane")

2018-09-06 Thread Satendra Singh Thakur
On Wed, 05 Sep 2018 at 10:37:39 +0100 Eric Engestrom wrote: > Hey Karsten, thanks for the patch! I don't know if it's correct or not, > but I'll comment on a few other things. > > The title of the commit should be a description of what your commit does; > in this case you should probably keep

[PATCH v1] drm/kms/crtc: Improving the func drm_mode_setcrtc

2018-08-06 Thread Satendra Singh Thakur
. If mode_valid is clear, mode and fb will be NULL. Therefore, we just check mode_valid and NOT mode or fb. 4. Moved kfree inside if statement Signed-off-by: Satendra Singh Thakur --- v1: Hi Mr Maarten, Thanks for the comments. I have fixed some of them and done more modifications to the pat

[PATCH v1] drm/kms/atomic: Improved the func drm_atomic_set_crtc_for_connector

2018-08-06 Thread Satendra Singh Thakur
1. Currently conn_state->crtc is getting assigned a value at two places We can just reduce this assignment to one Signed-off-by: Satendra Singh Thakur --- v1: Hi Mr Maarten, Thanks for the comments. I have modified the patch suitably. Please review. drivers/gpu/drm/drm_atomic.c

Re: Re: [PATCH] drm/kms/crtc: Saving crtc->primary into a drm_plane pointer instead of dereferencing it every time.

2018-08-06 Thread Satendra Singh Thakur
On Mon, 30 Jul 2018 at 09:33:55 -0400 Sean Paul wrote: >Maybe this is simpler, but not overwhelmingly so. >To be honest, I'm a bit concerned with the volume of no-op patches you're >sending to the list. I so appreciate and encourage your participation, >but perhaps we could redirect your

[PATCH] drm/kms/atomic: Improved the func drm_atomic_set_crtc_for_connector

2018-07-30 Thread Satendra Singh Thakur
. Currently conn_state->crtc is getting assigned a value at two places We can just reduce this assignment to one Signed-off-by: Satendra Singh Thakur --- drivers/gpu/drm/drm_atomic.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/drm_atomic.

[PATCH] drm/kms/plane: Avoiding redundant checks in case of EDEADLK retries

2018-07-30 Thread Satendra Singh Thakur
check Signed-off-by: Satendra Singh Thakur --- drivers/gpu/drm/drm_plane.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c index 0350544..ed42cd4 100644 --- a/drivers/gpu/drm/drm_plane.c +++ b/drivers/g

[PATCH] drm/kms/crtc: Saving crtc->primary into a drm_plane pointer instead of dereferencing it every time.

2018-07-30 Thread Satendra Singh Thakur
dra Singh Thakur --- drivers/gpu/drm/drm_crtc.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 98a36e6..9644f5b 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crt

[PATCH] drm/kms/crtc: Improving the func drm_mode_setcrtc

2018-07-27 Thread Satendra Singh Thakur
ill be required. Thus shifting of if (ret == -EDEADLK) right after out label won't affect normal case. 5. Also, kfree is moved inside if (connector_set). 6. Also, if major error checks are in the beginning of the func and if user supplied invalid params, we will exit the func sooner without wasting much

[PATCH v1] drm/kms/atomic: Using existing func for checking framebuffer dimensions

2018-07-27 Thread Satendra Singh Thakur
In the func drm_atomic_plane_check, the fb geometry checking code can be replaced by func drm_framebuffer_check_src_coords, this will remove several redundant lines of code. Signed-off-by: Satendra Singh Thakur --- v1: Hi Mr Maarten, Thanks for the comments. I have splitted them into two

[PATCH] drm/kms/atomic: Used existing func for checking fb geometry

2018-07-27 Thread Satendra Singh Thakur
ns. first we check whether crtc and fb both are NULL if (!state->crtc && !state->fb) then we check either crtc or fb is NULL if (!state->crtc || !state->fb) Signed-off-by: Satendra Singh Thakur --- drivers/gpu/drm/drm_atomic.c | 37 + 1 file ch

[PATCH v1] drm/kms/atomic: Improving func drm_atomic_plane_check

2018-07-27 Thread Satendra Singh Thakur
is NULL (and fb is also NULL) if (!state->crtc) The same code can be re-written using 2 if statements and 4 conditions. first we check whether crtc and fb both are NULL if (!state->crtc && !state->fb) then we check either crtc or fb is NULL if (!state->crtc || !state->fb) S

Re: [PATCH 00/13] drm/kms/mode: using helper func drm_display_mode_to/from_videomode for calculating timing parameters

2018-05-10 Thread Satendra Singh Thakur
On Thu, May 08, 2018 at 16:28:30 +0530, Satendra Singh Thakur wrote: > On Thu, May 07, 2018 at 15:46:02 +0200, Daniel Vetter wrote: > > On Thu, May 03, 2018 at 01:53:55PM +0530, Satendra Singh Thakur wrote: > > > 1.There is a function in drm-core to calculate display

Re: [PATCH 00/13] drm/kms/mode: using helper func drm_display_mode_to/from_videomode for calculating timing parameters

2018-05-09 Thread Satendra Singh Thakur
On Thu, May 07, 2018 at 15:46:02 +0200, Daniel Vetter wrote: > On Thu, May 03, 2018 at 01:53:55PM +0530, Satendra Singh Thakur wrote: > > 1.There is a function in drm-core to calculate display timing parameters: > > horizontal front porch, back porch, sync length, > > verti

[PATCH v1 04/13] drm/kms/mode/fsl-dcu: using helper func drm_display_mode_to_videomode for calculating timing parameters

2018-05-08 Thread Satendra Singh Thakur
-Using drm_display_mode_to_videomode to avoid duplicate logic -Removed index = drm_crtc_index(crtc) as it is unused -Replaced DRM_MODE_FLAG_* flags with DISPLAY_FLAGS_* flags -Replaced mode->h/vdisplay with vm.h/vactive Acked-by: Stefan Agner <ste...@agner.ch> Signed-off-by: Satendra Sin

[PATCH v2 03/13] drm/kms/mode/exynos-dsi: using helper func drm_display_mode_to_videomode for calculating timing parameters

2018-05-07 Thread Satendra Singh Thakur
To avoid duplicate logic for the same Signed-off-by: Satendra Singh Thakur <satendr...@samsung.com> Acked-by: Madhur Verma <madhur.ve...@samsung.com> Cc: Hemanshu Srivastava <hemansh...@samsung.com> --- v2: Removed Mr Robin from reviewed-by field drivers/gpu/drm/exyno

[PATCH v2] drm/kms/mode: added a new helper for calculating videomode from crtc's display mode

2018-05-07 Thread Satendra Singh Thakur
drivers will be using this new helper -arm hdlcd -atmel hlcdc -exynos 5433 decon -exynos7 decon -exynos fimd 4. -This change reduces several redundant lines of code for many drivers Acked-by: Liviu Dudau <liviu.du...@arm.com> Signed-off-by: Satendra Singh Thakur <satendr...@samsung.c

[PATCH 04/13] drm/kms/mode/fsl-dcu: using helper func drm_display_mode_to_videomode for calculating timing parameters

2018-05-05 Thread Satendra Singh Thakur
To avoid duplicate logic for the same Signed-off-by: Satendra Singh Thakur <satendr...@samsung.com> Cc: Madhur Verma <madhur.ve...@samsung.com> Cc: Hemanshu Srivastava <hemansh...@samsung.com> --- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_crtc.c | 29 -

[PATCH 12/13] drm/kms/mode/mtk_dpi_dsi: using helper func drm_display_mode_to_videomode for calculating timing parameters

2018-05-05 Thread Satendra Singh Thakur
-Duplicate logic for the timing params is avoided -Arithmatic operator *,/ are replaced by logical >>, << operators -The flags DRM_MODE_FLAG_* are replaced with DISPLAY_FLAGS_* flags Signed-off-by: Satendra Singh Thakur <satendr...@samsung.com> Cc: Madhur Verma <madhur.

[PATCH 01/13] drm/kms/mode/atmel-hlcdc: using helper func drm_display_mode_to_videomode for calculating timing parameters

2018-05-05 Thread Satendra Singh Thakur
. Therefore, there is a duplication of the code. This patch series replaces this redundant code with the function drm_display_mode_to_videomode. This removes nearly 100 redundant lines from the related drivers. Signed-off-by: Satendra Singh Thakur <satendr...@samsung.com> Cc: Madhur Verma <

Re: [PATCH v1] drm/kms/mode: added a new helper for calculating videomode from crtc's display mode

2018-05-05 Thread Satendra Singh Thakur
On Thu, May 03, 2018 at 11:36:39 +0100, Liviu Dudau wrote: > On Thu, May 03, 2018 at 11:28:37AM +0530, Satendra Singh Thakur wrote: > > 1. > > -Added a new helper drm_display_mode_crtc_to_videomode > > -This helper calculates mode parameters like > > horizontal fr

[PATCH 10/13] drm/kms/mode/ti-lcdc: using helper func drm_display_mode_to_videomode for calculating timing parameters

2018-05-05 Thread Satendra Singh Thakur
To avoid duplicate logic for the same Signed-off-by: Satendra Singh Thakur <satendr...@samsung.com> Cc: Madhur Verma <madhur.ve...@samsung.com> Cc: Hemanshu Srivastava <hemansh...@samsung.com> --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 60

[PATCH v1 03/13] drm/kms/mode/exynos-dsi: using helper func drm_display_mode_to_videomode for calculating timing parameters

2018-05-05 Thread Satendra Singh Thakur
To avoid duplicate logic for the same Reviewed-by: Robin Murphy <robin.mur...@arm.com> Signed-off-by: Satendra Singh Thakur <satendr...@samsung.com> Acked-by: Madhur Verma <madhur.ve...@samsung.com> Cc: Hemanshu Srivastava <hemansh...@samsung.com> --- drivers/gpu/drm/exyn

[PATCH 02/13] drm/kms/mode/bridge-tc358767: using helper func drm_display_mode_to_videomode for calculating timing parameters

2018-05-05 Thread Satendra Singh Thakur
To avoid duplicate logic for timing parameters Signed-off-by: Satendra Singh Thakur <satendr...@samsung.com> Cc: Madhur Verma <madhur.ve...@samsung.com> Cc: Hemanshu Srivastava <hemansh...@samsung.com> --- drivers/gpu/drm/bridge/tc358767.c | 42 ++---

[PATCH v1 09/13] drm/kms/mode/sun4i-tv: using helper func drm_display_mode_from_videomode for calculating timing parameters

2018-05-05 Thread Satendra Singh Thakur
To avoid duplicate logic for horizonal/vertical sync_start/end helper func drm_display_mode_from_videomode is used Acked-by: Maxime Ripard <maxime.rip...@bootlin.com> Signed-off-by: Satendra Singh Thakur <satendr...@samsung.com> Acked-by: Madhur Verma <madhur.ve...@samsung.co

[PATCH 05/13] drm/kms/mode/gma500-mdfld_dsi_dpi: using helper function drm_display_mode_to_videomode for calculating timing parameters

2018-05-05 Thread Satendra Singh Thakur
To avoid duplicate logic for the same Signed-off-by: Satendra Singh Thakur <satendr...@samsung.com> Cc: Madhur Verma <madhur.ve...@samsung.com> Cc: Hemanshu Srivastava <hemansh...@samsung.com> --- drivers/gpu/drm/gma500/mdfld_dsi_dpi.c | 28 ++--

[PATCH 11/13] drm/kms/mode/tegra: using helper func drm_display_mode_to_videomode for calculating timing parameters

2018-05-05 Thread Satendra Singh Thakur
To avoid duplicate logic for the same Signed-off-by: Satendra Singh Thakur <satendr...@samsung.com> Cc: Madhur Verma <madhur.ve...@samsung.com> Cc: Hemanshu Srivastava <hemansh...@samsung.com> --- drivers/gpu/drm/tegra/dc.c | 15 +++ 1 file changed, 7 insertio

[PATCH 09/13] drm/kms/mode/sun4i-tv: using helper func drm_display_mode_from_videomode for calculating timing parameters

2018-05-05 Thread Satendra Singh Thakur
To avoid duplicate logic for horizonal/vertical sync_start/end helper func drm_display_mode_from_videomode is used Signed-off-by: Satendra Singh Thakur <satendr...@samsung.com> Cc: Madhur Verma <madhur.ve...@samsung.com> Cc: Hemanshu Srivastava <hemansh...@samsung.com> --- dri

[PATCH 08/13] drm/kms/mode/pl111-display: using helper function drm_display_mode_to_videomode for calculating timing parameters

2018-05-05 Thread Satendra Singh Thakur
To avoid duplicate logic for the same Signed-off-by: Satendra Singh Thakur <satendr...@samsung.com> Cc: Madhur Verma <madhur.ve...@samsung.com> Cc: Hemanshu Srivastava <hemansh...@samsung.com> --- drivers/gpu/drm/pl111/pl111_display.c | 40 +--

[PATCH v1] drm/kms/mode: added a new helper for calculating videomode from crtc's display mode

2018-05-05 Thread Satendra Singh Thakur
; Signed-off-by: Satendra Singh Thakur <satendr...@samsung.com> Acked-by: Madhur Verma <madhur.ve...@samsung.com> Cc: Hemanshu Srivastava <hemansh...@samsung.com> --- v1: Fixed review comments by Mr Jani Initialized with 0 the struct videomode so that stack garbage won't come

[PATCH 07/13] drm/kms/mode/meson-encoder: using helper function drm_display_mode_to_videomode for calculating timing parameters

2018-05-05 Thread Satendra Singh Thakur
-Duplicate logic for the timing params is avoided -Arithmatic operator *,/ are replaced by logical >>, << operators -The flags DRM_MODE_FLAG_* are replaced with DISPLAY_FLAGS_* flags -Combined similar if statements Signed-off-by: Satendra Singh Thakur <satendr...@samsung.com>

[PATCH 00/13] drm/kms/mode: using helper func drm_display_mode_to/from_videomode for calculating timing parameters

2018-05-05 Thread Satendra Singh Thakur
ncoder pl111-display sun4i-tv ti lcdc tegra dc mediatek dpi dsi bridge-adv7533 Satendra Singh Thakur (13): drm/kms/mode/atmel-hlcdc: using helper func drm_display_mode_to_videomode for calculating timing parameters drm/kms/mode/bridge-tc358767: using helper func drm_display_mode_

[PATCH 06/13] drm/kms/mode/hisilicon-kirin-dsi-ade: using helper function drm_display_mode_to_videomode for calculating timing parameters

2018-05-05 Thread Satendra Singh Thakur
-Avoidded duplicate logic for the timing calculations -Removed func ade_set_pix_clk and combined it with func ade_ldi_set_mode Signed-off-by: Satendra Singh Thakur <satendr...@samsung.com> Cc: Madhur Verma <madhur.ve...@samsung.com> Cc: Hemanshu Srivastava <hemansh...@samsung.co

[PATCH 13/13] drm/kms/mode/bridge-adv7533: using helper func drm_display_mode_to_videomode for calculating timing parameters

2018-05-05 Thread Satendra Singh Thakur
. Therefore, there is a duplication of the code. This patch series replaces this redundant code with the function drm_display_mode_to_videomode. This removes nearly 100 redundant lines from the related drivers. Signed-off-by: Satendra Singh Thakur <satendr...@samsung.com> Cc: Madhur Verma <

[PATCH 03/13] drm/kms/mode/exynos-dsi: using helper func drm_display_mode_to_videomode for calculating timing parameters

2018-05-05 Thread Satendra Singh Thakur
To avoid duplicate logic for the same Signed-off-by: Satendra Singh Thakur <satendr...@samsung.com> Cc: Madhur Verma <madhur.ve...@samsung.com> Cc: Hemanshu Srivastava <hemansh...@samsung.com> --- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 9 + 1 file changed, 1 inserti

[PATCH] drm/kms/mode: added a new helper for calculating videomode from crtc's display mode

2018-05-03 Thread Satendra Singh Thakur
drivers will be using this new helper -arm hdlcd -atmel hlcdc -exynos 5433 decon -exynos7 decon -exynos fimd 4. -This patch removes related duplicate code from above mentioned drivers Signed-off-by: Satendra Singh Thakur <satendr...@samsung.com> Cc: Madhur Verma <madhur.ve...@samsun

[PATCH] drm/atomic: Handling the case when setting old crtc for plane

2018-05-03 Thread Satendra Singh Thakur
. Ideally, we should do nothing in this case, this patch handles the same, and causes the program to return without doing anything in such scenario. Signed-off-by: Satendra Singh Thakur <satendr...@samsung.com> Cc: Madhur Verma <madhur.ve...@samsung.com> Cc: Hemanshu Srivast

[PATCH] [DRM][KMS][MODE][MEDIATEK] Using the function drm_display_mode_to_videomode

2018-04-03 Thread Satendra Singh Thakur
This patch uses existing method drm_display_mode_to_videomode for calculating front/back porches, sync lengths for mediatek dsi/dpi drivers; instead of manually calculating them Signed-off-by: Satendra Singh Thakur <thakursatendra2...@yahoo.co.in> --- drivers/gpu/drm/mediatek/mtk_dpi.

RE: Re: [RFC] [GPU][DRM][PROPERTY] -Added a new ioctl in Linux DRM KMS driver.

2017-01-23 Thread Satendra Singh Thakur
ux DRM KMS driver.  Hi Satendra, On 20 January 2017 at 08:12, Satendra Singh Thakur <satendr...@samsung.com> wrote: > -Added a new ioctl in Linux DRM KMS driver. > This ioctl allows user to set the values of an object’s multiple > properties in one go. > -In the absence o

[RFC] [GPU][DRM][PROPERTY] -Added a new ioctl in Linux DRM KMS driver.

2017-01-20 Thread Satendra Singh Thakur
From: satendra singh thakur <satendr...@samsung.com> -Added a new ioctl in Linux DRM KMS driver. This ioctl allows user to set the values of an object’s multiple properties in one go. -In the absence of such ioctl, User would be calling one ioctl to set each property value; Thus, user