[PATCH] accel/ivpu: Delete the TODO file

2023-10-18 Thread Deepak R Varma
The work items listed in the TODO file of this driver file are either completed or dropped. The file is no more significant according to the maintainers. Hence removing it from the sources. Suggested-by: Stanislaw Gruszka Signed-off-by: Deepak R Varma --- drivers/accel/ivpu/TODO | 11

Re: ivpu TODO list items

2023-10-18 Thread Deepak R Varma
On Wed, Oct 18, 2023 at 09:50:53AM +0200, Stanislaw Gruszka wrote: > Hi > > On Tue, Oct 17, 2023 at 10:25:19PM +0530, Deepak R Varma wrote: > > On Fri, Oct 13, 2023 at 12:54:43PM +0530, Deepak R Varma wrote: > > > Hello, > > > I am shortlisted as a mentee for the L

Re: [PATCH] drm/amd/display: Simplify same effect if/else blocks

2023-03-03 Thread Deepak R Varma
On Thu, Mar 02, 2023 at 11:37:30AM -0500, Harry Wentland wrote: > > > On 3/1/23 15:21, Deepak R Varma wrote: > > On Mon, Jan 23, 2023 at 12:23:19AM +0530, Deepak R Varma wrote: > >> On Sun, Jan 15, 2023 at 12:52:10PM -0800, Joe Perches wrote: > >>> On Sun,

Re: [PATCH] drm/amd/display: Simplify same effect if/else blocks

2023-03-01 Thread Deepak R Varma
On Mon, Jan 23, 2023 at 12:23:19AM +0530, Deepak R Varma wrote: > On Sun, Jan 15, 2023 at 12:52:10PM -0800, Joe Perches wrote: > > On Sun, 2023-01-15 at 15:30 +0530, Deepak R Varma wrote: > > > The if / else block code has same effect irrespective of the logical > > >

[PATCH RESEND] drm/sti: Avoid full proxy f_ops for sti debug attributes

2023-03-01 Thread Deepak R Varma
/coccinelle/api/debugfs/debugfs_simple_attr.cocci Signed-off-by: Deepak R Varma --- Note: Change cross compile tested using stm32_defconfig for arm Resending patch for review and feedback. Initially sent on Jan 11 2023 drivers/gpu/drm/sti/sti_drv.c | 8 1 file changed, 4 insertions

[PATCH RESEND] drm/tegra: sor: Remove redundant error logging

2023-03-01 Thread Deepak R Varma
using platform_get_irq.cocci coccicheck script. Signed-off-by: Deepak R Varma --- Note: Resending the patch for review and feedback. Originally sent on Dec 12 2022. drivers/gpu/drm/tegra/sor.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/tegra/sor.c

[PATCH RESEND] drm/nouveau/hwmon: Use sysfs_emit in show function callsbacks

2023-03-01 Thread Deepak R Varma
According to Documentation/filesystems/sysfs.rst, the show() callback function of kobject attributes should strictly use sysfs_emit() instead of sprintf() family functions. So, make this change. Issue identified using the coccinelle device_attr_show.cocci script. Signed-off-by: Deepak R Varma

Re: [PATCH] drm/amd/display: Remove duplicate/repeating expression

2023-02-10 Thread Deepak R Varma
On Fri, Feb 10, 2023 at 10:22:00AM -0500, Harry Wentland wrote: > On 2/10/23 05:11, Deepak R Varma wrote: > > Remove duplicate or repeating expressions in the if condition > > evaluation. Issue identified using doubletest.cocci Coccinelle semantic > > patch. > > > &

[PATCH] drm/amd/display: Remove duplicate/repeating expression

2023-02-10 Thread Deepak R Varma
Remove duplicate or repeating expressions in the if condition evaluation. Issue identified using doubletest.cocci Coccinelle semantic patch. Signed-off-by: Deepak R Varma --- .../gpu/drm/amd/display/dc/dml/dcn314/display_rq_dlg_calc_314.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH] drm/amd/display: Remove duplicate/repeating expressions

2023-02-10 Thread Deepak R Varma
Remove duplicate or repeating expressions in the if condition evaluation. Issue identified using doubletest.cocci Coccinelle semantic patch. Signed-off-by: Deepak R Varma --- .../gpu/drm/amd/display/dc/dml/dcn32/display_mode_vba_32.c| 4 +--- 1 file changed, 1 insertion(+), 3 deletions

Re: [PATCH] drm/i915/gt: Avoid redundant pointer validity check

2023-02-06 Thread Deepak R Varma
On Tue, Feb 07, 2023 at 12:12:18AM +0530, Deepak R Varma wrote: > On Mon, Feb 06, 2023 at 10:33:13AM +, Matthew Auld wrote: > > On 06/02/2023 09:45, Tvrtko Ursulin wrote: > > > > > > Hi, > > > > > > Adding Matt & Thomas as pot

Re: [PATCH] drm/i915/gt: Avoid redundant pointer validity check

2023-02-06 Thread Deepak R Varma
On Mon, Feb 06, 2023 at 10:33:13AM +, Matthew Auld wrote: > On 06/02/2023 09:45, Tvrtko Ursulin wrote: > > > > Hi, > > > > Adding Matt & Thomas as potential candidates to review. > > > > Regards, > > > > Tvrtko > > > > On

[PATCH] drm/i915/gt: Avoid redundant pointer validity check

2023-02-03 Thread Deepak R Varma
The macro definition of gen6_for_all_pdes() expands to a for loop such that it breaks when the page table is null. Hence there is no need to again test validity of the page table entry pointers in the pde list. This change is identified using itnull.cocci semantic patch. Signed-off-by: Deepak R

[PATCH] drm/arm/malidp: use sysfs_emit in show function callback

2023-01-27 Thread Deepak R Varma
According to Documentation/filesystems/sysfs.rst, the show() callback function of kobject attributes should strictly use sysfs_emit() instead of sprintf() family functions. Issue identified using the device_attr_show.cocci Coccinelle script. Signed-off-by: Deepak R Varma --- drivers/gpu/drm/arm

[PATCH] drm/nouveau/devinit: Convert function disable() to be void

2023-01-25 Thread Deepak R Varma
of a fixed value. This change also eliminates untouched return variables. The change is identified using the returnvar.cocci Coccinelle semantic patch script. Signed-off-by: Deepak R Varma --- Please note: The change is compile build tested only. drivers/gpu/drm/nouveau/nvkm/subdev/devinit

Re: [PATCH] drm/amd/display: Simplify same effect if/else blocks

2023-01-22 Thread Deepak R Varma
On Sun, Jan 15, 2023 at 12:52:10PM -0800, Joe Perches wrote: > On Sun, 2023-01-15 at 15:30 +0530, Deepak R Varma wrote: > > The if / else block code has same effect irrespective of the logical > > evaluation. Hence, simply the implementation by removing the unnecessary > > c

Re: [PATCH 0/4] drm/amd/display: Use min()/max() helper macros

2023-01-22 Thread Deepak R Varma
On Sun, Jan 15, 2023 at 02:48:45AM +0530, Deepak R Varma wrote: > This patch series proposes using standard min() / max() helper macros instead > of > direct variable comparison using the ternary operator or if/else evaluations. > I > have tested the change using a dummy mod

Re: [PATCH] drm/sti: Avoid full proxy f_ops for sti debug attributes

2023-01-22 Thread Deepak R Varma
On Wed, Jan 11, 2023 at 01:50:06AM +0530, Deepak R Varma wrote: > Using DEFINE_SIMPLE_ATTRIBUTE macro with the debugfs_create_file() > function adds the overhead of introducing a proxy file operation > functions to wrap the original read/write inside file removal protection > function

Re: [PATCH] drm/tegra: submit: No need for Null pointer check before kfree

2023-01-22 Thread Deepak R Varma
On Mon, Jan 02, 2023 at 11:50:36PM +0530, Deepak R Varma wrote: > On Fri, Dec 30, 2022 at 12:03:25PM +0200, Mikko Perttunen wrote: > > On 12/30/22 12:01, Mikko Perttunen wrote: > > > On 12/30/22 11:15, Stanislaw Gruszka wrote: > > > > On Wed, Dec 28, 2022 at 03:17:59P

Re: [PATCH] drm/tegra: sor: Remove redundant error logging

2023-01-20 Thread Deepak R Varma
On Tue, Dec 20, 2022 at 02:27:50AM +0530, Deepak R Varma wrote: > On Mon, Dec 12, 2022 at 10:44:55AM +0530, Deepak R Varma wrote: > > Hello, > May I please request a review and feedback on this patch proposal? > > Also, I was able to build the changes for ARM arch verified us

[PATCH v2] drm/i915/gvt: Avoid full proxy f_ops for debugfs attributes

2023-01-18 Thread Deepak R Varma
/coccinelle/api/debugfs/debugfs_simple_attr.cocci Signed-off-by: Deepak R Varma Reviewed-by: Rodrigo Vivi Acked-by: Zhenyu Wang --- Changes in v2: - Following changes as suggested by Rodrigo Vivi - Combine 2 patch series in a single patch - Base the patch on the i915/gvt to avoid

Re: [Intel-gfx] [PATCH 2/2] drm/i915/gvt: Avoid full proxy f_ops for vgpu_status debug attributes

2023-01-17 Thread Deepak R Varma
On Tue, Jan 17, 2023 at 02:29:37PM -0500, Rodrigo Vivi wrote: > On Mon, Jan 16, 2023 at 01:44:46PM +0800, Zhenyu Wang wrote: > > On 2023.01.10 13:49:57 -0500, Rodrigo Vivi wrote: > > > On Wed, Jan 11, 2023 at 12:00:12AM +0530, Deepak R Varma wrote: > > > > Using DEFI

Re: [PATCH] drm/i915/display: Convert i9xx_pipe_crc_auto_source to void

2023-01-17 Thread Deepak R Varma
On Tue, Jan 17, 2023 at 02:21:59PM -0500, Rodrigo Vivi wrote: > On Sat, Jan 14, 2023 at 07:33:53PM +0530, Deepak R Varma wrote: > > Convert function i9xx_pipe_crc_auto_source() to return void instead > > of int since the current implementation always returns 0 to the caller. >

Re: nvkm_devinit_func.disable() to be made void

2023-01-16 Thread Deepak R Varma
On Sat, Jan 14, 2023 at 08:10:43PM +0530, Deepak R Varma wrote: > Hello, > It appears that the callback function disable() of struct nvkm_devinit_func > does > not need return U64 and can be transformed to be a void. This will impact a > few > drivers that have currently impl

[PATCH] drm/amd/display: Simplify same effect if/else blocks

2023-01-15 Thread Deepak R Varma
script. Signed-off-by: Deepak R Varma --- Please note: The proposed change is compile tested only. If there are any inbuilt test cases that I should run for further verification, I will appreciate guidance about it. Thank you. drivers/gpu/drm/amd/display/dc/core/dc.c | 11 +++ 1 file

[PATCH] drm/amd/display: avoid variable reinitialization

2023-01-15 Thread Deepak R Varma
The member variable set_odm_combine is already initialized and hence the reinitialization instruction can be removed. Issue identified using the dubleinit.cocci Coccinelle semantic patch script. Signed-off-by: Deepak R Varma --- drivers/gpu/drm/amd/display/dc/dcn314/dcn314_optc.c | 1 - 1 file

[PATCH] drm/amd/display: use swap() helper macro in bios_parser

2023-01-15 Thread Deepak R Varma
Use swap() helper macro instead of open coded swap instructions. The change also facilitates code cleanup and realignment for improved readability. Issue identified using swap.cocci Coccinelle semantic patch script. Signed-off-by: Deepak R Varma --- drivers/gpu/drm/amd/display/dc/bios

[PATCH 3/3] drm/amd/pm/powerplay/smumgr/ci: use bitwise or for bitmasks addition

2023-01-14 Thread Deepak R Varma
For bit mask addition, it is recommended to use or operator "|" instead of numerical addition as the former is quicker and cleaner. Change suggested by orplus.cocci Coccinelle semantic patch. Signed-off-by: Deepak R Varma --- drivers/gpu/drm/amd/pm/powerplay/smumgr/ci_smumgr.c | 2

[PATCH 2/3] drm/amd/pm/powerplay/hwmgr: use bitwise or for bitmasks addition

2023-01-14 Thread Deepak R Varma
For bit mask addition, it is recommended to use or operator "|" instead of numerical addition as the former is quicker and cleaner. Change suggested by orplus.cocci Coccinelle semantic patch. Signed-off-by: Deepak R Varma --- drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c | 8 +

[PATCH 1/3] drm/amd/pm/powerplay/smumgr: use bitwise or for addition

2023-01-14 Thread Deepak R Varma
For bit mask addition, it is recommended to use or operator "|" instead of numerical addition as the former is quicker and cleaner. Change suggested by orplus.cocci Coccinelle semantic patch. Signed-off-by: Deepak R Varma --- drivers/gpu/drm/amd/pm/powerplay/smumgr/iceland_sm

[PATCH 0/3] drm/amd/pm/powerplay: use bitwise or for bitmasks addition

2023-01-14 Thread Deepak R Varma
The patch series proposes usage of bitwise or "|" operator for addition of bitmasks instead of using numerial additions. The former is quicker and cleaner. The proposed change is compile tested. Deepak R Varma (3): drm/amd/pm/powerplay/smumgr: use bitwise or for addition drm/amd/pm

[PATCH 4/4] drm/amd/display: dcn32: Use min()/max() helper macros

2023-01-14 Thread Deepak R Varma
Use the standard min() / max() helper macros instead of direct variable comparison using if/else blocks or ternary operator. Change identified using minmax.cocci Coccinelle semantic patch. Signed-off-by: Deepak R Varma --- drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 4 ++-- 1 file

[PATCH 3/4] drm/amd/display: dcn21: Use min()/max() helper macros

2023-01-14 Thread Deepak R Varma
Use the standard min() / max() helper macros instead of direct variable comparison using if/else blocks or ternary operator. Change identified using minmax.cocci Coccinelle semantic patch. Signed-off-by: Deepak R Varma --- .../gpu/drm/amd/display/dc/dml/dcn21/display_mode_vba_21.c | 5

[PATCH 2/4] drm/amd/display: dcn20: Use min()/max() helper macros

2023-01-14 Thread Deepak R Varma
Use the standard min() / max() helper macros instead of direct variable comparison using if/else blocks or ternary operator. Change identified using minmax.cocci Coccinelle semantic patch. Signed-off-by: Deepak R Varma --- .../gpu/drm/amd/display/dc/dml/dcn20/display_mode_vba_20.c | 5

[PATCH 1/4] drm/amd/display: Use min()/max() macros in dcn_calc_math

2023-01-14 Thread Deepak R Varma
Use the standard min() / max() helper macros instead of direct variable comparison using if/else blocks or ternary operator. Change identified using minmax.cocci Coccinelle semantic patch. Signed-off-by: Deepak R Varma --- .../gpu/drm/amd/display/dc/dml/calcs/dcn_calc_math.c | 10

[PATCH 0/4] drm/amd/display: Use min()/max() helper macros

2023-01-14 Thread Deepak R Varma
This patch series proposes using standard min() / max() helper macros instead of direct variable comparison using the ternary operator or if/else evaluations. I have tested the change using a dummy module and similar simulations on my x86 machine. Deepak R Varma (4): drm/amd/display: Use min

[PATCH] drm/i915/gvt: Remove extra semicolon

2023-01-14 Thread Deepak R Varma
Remove the extra semicolon at end. Issue identified using semicolon.cocci Coccinelle semantic patch. Signed-off-by: Deepak R Varma --- drivers/gpu/drm/i915/gvt/vgpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gvt/vgpu.c b/drivers/gpu/drm/i915/gvt

[PATCH] drm/mediatek: dp: Remove extra semicolon

2023-01-14 Thread Deepak R Varma
Remove unnecessary semicolon at the end of switch block closing brace. Issue identified using semicolon Coccinelle semantic patch. Signed-off-by: Deepak R Varma --- drivers/gpu/drm/mediatek/mtk_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek

[PATCH] drm/nouveau/gr/gf100-: remove unnecessary semicolon

2023-01-14 Thread Deepak R Varma
Remove extra unnecessary semicolon. Issue identified using semcolon.cocci Coccinelle semantic patch. Signed-off-by: Deepak R Varma --- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100

nvkm_devinit_func.disable() to be made void

2023-01-14 Thread Deepak R Varma
Hello, It appears that the callback function disable() of struct nvkm_devinit_func does not need return U64 and can be transformed to be a void. This will impact a few drivers that have currently implementation of this callback since those always return 0ULL. So, Change from 8 struct nvk

[PATCH] drm/i915/display: Convert i9xx_pipe_crc_auto_source to void

2023-01-14 Thread Deepak R Varma
Convert function i9xx_pipe_crc_auto_source() to return void instead of int since the current implementation always returns 0 to the caller. Issue identified using returnvar Coccinelle semantic patch. Signed-off-by: Deepak R Varma --- Please note: The change is compile tested only. drivers/gpu

[PATCH] drm/amd/display: Conversion to bool not necessary

2023-01-12 Thread Deepak R Varma
m/amd/display: Create a file dedicated for CRTC") Reported-by: kernel test robot Signed-off-by: Deepak R Varma --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm

[PATCH v3 2/2] drm/i915/fbc: Avoid full proxy f_ops for FBC debug attributes

2023-01-11 Thread Deepak R Varma
/coccinelle/api/debugfs/debugfs_simple_attr.cocci Signed-off-by: Deepak R Varma --- Changes in v3: - None Changes in v2: - Include coccicheck make command in the patch log message for clarity. Suggested by Rodrigo Vivi drivers/gpu/drm/i915/display/intel_fbc.c | 12 ++-- 1 file

[PATCH v3 1/2] drm/i915/display: Avoid full proxy f_ops for DRRS debug attributes

2023-01-11 Thread Deepak R Varma
/coccinelle/api/debugfs/debugfs_simple_attr.cocci Signed-off-by: Deepak R Varma --- Changes in v3: - Fix checkpatch complaint around function parameter alignment Changes in v2: - Include coccicheck make command in the patch log message for clarity. Suggested by Rodrigo Vivi drivers/gpu

[PATCH v3 0/2] drm/i915: Avoid full proxy f_ops debug attributes

2023-01-11 Thread Deepak R Varma
eter alignment complaint Patch 2/2: None Changes in v2: - Individual patches clubbed in patch set - Update patch log message to include coccicheck make command Deepak R Varma (2): drm/i915/display: Avoid full proxy f_ops for DRRS debug attributes drm/i915/fbc: Avoid full proxy f_ops

Re: [PATCH 2/2] drm/i915/gvt: Avoid full proxy f_ops for vgpu_status debug attributes

2023-01-11 Thread Deepak R Varma
On Wed, Jan 11, 2023 at 10:00:11AM -0500, Rodrigo Vivi wrote: > > > Actually, could you please address the checkpatch issues before we can > > > push? > > > Sorry about that, but just noticed now when I was going to push the other > > > ones. > > > > Hello Rodrigo, > > The checkpatch warning is

Re: [PATCH v2 2/2] drm/i915/fbc: Avoid full proxy f_ops for FBC debug attributes

2023-01-11 Thread Deepak R Varma
On Tue, Jan 10, 2023 at 01:52:05PM -0500, Rodrigo Vivi wrote: > On Tue, Jan 10, 2023 at 11:45:40PM +0530, Deepak R Varma wrote: > > Using DEFINE_SIMPLE_ATTRIBUTE macro with the debugfs_create_file() > > function adds the overhead of introducing a proxy file operation > >

Re: [PATCH 2/2] drm/i915/gvt: Avoid full proxy f_ops for vgpu_status debug attributes

2023-01-11 Thread Deepak R Varma
On Wed, Jan 11, 2023 at 05:02:02AM -0500, Rodrigo Vivi wrote: > On Tue, Jan 10, 2023 at 01:49:57PM -0500, Rodrigo Vivi wrote: > > On Wed, Jan 11, 2023 at 12:00:12AM +0530, Deepak R Varma wrote: > > > Using DEFINE_SIMPLE_ATTRIBUTE macro with the debugfs_create_file() >

[PATCH] drm/panel: st7703: Avoid full proxy f_ops for st7703 debug attributes

2023-01-10 Thread Deepak R Varma
/coccinelle/api/debugfs/debugfs_simple_attr.cocci Signed-off-by: Deepak R Varma --- Note: Patch compile tested only. drivers/gpu/drm/panel/panel-sitronix-st7703.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu

[PATCH] drm/sti: Avoid full proxy f_ops for sti debug attributes

2023-01-10 Thread Deepak R Varma
/coccinelle/api/debugfs/debugfs_simple_attr.cocci Signed-off-by: Deepak R Varma --- Note: Change cross compile tested using stm32_defconfig for arm drivers/gpu/drm/sti/sti_drv.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm

[PATCH 2/2] drm/i915/gvt: Avoid full proxy f_ops for vgpu_status debug attributes

2023-01-10 Thread Deepak R Varma
/coccinelle/api/debugfs/debugfs_simple_attr.cocci Signed-off-by: Deepak R Varma --- drivers/gpu/drm/i915/gvt/debugfs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt/debugfs.c b/drivers/gpu/drm/i915/gvt/debugfs.c index 03f081c3d9a4..baccbf1761b7

[PATCH 1/2] drm/i915/gvt: Avoid full proxy f_ops for scan_nonprivbb debug attributes

2023-01-10 Thread Deepak R Varma
/coccinelle/api/debugfs/debugfs_simple_attr.cocci Signed-off-by: Deepak R Varma --- drivers/gpu/drm/i915/gvt/debugfs.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt/debugfs.c b/drivers/gpu/drm/i915/gvt/debugfs.c index 0616b73175f3

[PATCH 0/2] drm/i915/gvt: Avoid full proxy f_ops debug attributes

2023-01-10 Thread Deepak R Varma
for the scan_nonprivbb and vgpu_status f_ops debugfs attributes respectively. Following coccicheck make command helped identify this change: make coccicheck M=drivers/gpu/drm/i915/ MODE=patch COCCI=./scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci Deepak R Varma (2): drm/i915

[PATCH v2 2/2] drm/i915/fbc: Avoid full proxy f_ops for FBC debug attributes

2023-01-10 Thread Deepak R Varma
/coccinelle/api/debugfs/debugfs_simple_attr.cocci Signed-off-by: Deepak R Varma --- Changes in v2: - Include coccicheck make command in the patch log message for clarity. Suggested by Rodrigo Vivi drivers/gpu/drm/i915/display/intel_fbc.c | 12 ++-- 1 file changed, 6 insertions(+), 6

[PATCH v2 1/2] drm/i915/display: Avoid full proxy f_ops for DRRS debug attributes

2023-01-10 Thread Deepak R Varma
/coccinelle/api/debugfs/debugfs_simple_attr.cocci Signed-off-by: Deepak R Varma --- Changes in v2: - Include coccicheck make command in the patch log message for clarity. Suggested by Rodrigo Vivi drivers/gpu/drm/i915/display/intel_drrs.c | 8 1 file changed, 4 insertions(+), 4

[PATCH 0/2 v2] drm/i915: Avoid full proxy f_ops debug attributes

2023-01-10 Thread Deepak R Varma
set - Update patch log message to include coccicheck make command Deepak R Varma (2): drm/i915/display: Avoid full proxy f_ops for DRRS debug attributes drm/i915/fbc: Avoid full proxy f_ops for FBC debug attributes drivers/gpu/drm/i915/display/intel_drrs.c | 8 drivers/gpu/drm/

Re: [PATCH] drm/i915/fbc: Avoid full proxy f_ops for FBC debug attributes

2023-01-09 Thread Deepak R Varma
On Mon, Jan 09, 2023 at 02:06:13PM -0500, Rodrigo Vivi wrote: > On Sun, Jan 08, 2023 at 01:33:41AM +0530, Deepak R Varma wrote: > > On Thu, Jan 05, 2023 at 09:13:35AM +0100, Julia Lawall wrote: > > > > Hi Julia, thanks for helping here. > > > > &g

Re: [PATCH] drm/amd/display: No need for Null pointer check before kfree

2023-01-07 Thread Deepak R Varma
On Wed, Dec 28, 2022 at 12:09:51AM +0530, Deepak R Varma wrote: > kfree() & vfree() internally performs NULL check on the pointer handed > to it and take no action if it indeed is NULL. Hence there is no need > for a pre-check of the memory pointer before handing it to > kfree()/vf

Re: [PATCH] drm/nouveau/hwmon: Use sysfs_emit in show function callsbacks

2023-01-07 Thread Deepak R Varma
On Sun, Dec 25, 2022 at 02:32:08PM +0530, Deepak R Varma wrote: > According to Documentation/filesystems/sysfs.rst, the show() callback > function of kobject attributes should strictly use sysfs_emit() instead > of sprintf() family functions. So, make this change. > Issue identifi

Re: [PATCH] drm/amdkfd: Use resource_size() helper function

2023-01-07 Thread Deepak R Varma
On Fri, Dec 23, 2022 at 02:45:00AM +0530, Deepak R Varma wrote: > Use the resource_size() function instead of a open coded computation > resource size. It makes the code more readable. > > Issue identified using resource_size.cocci coccinelle semantic patch. > > Signed-off-

Re: [PATCH] drm/i915/fbc: Avoid full proxy f_ops for FBC debug attributes

2023-01-07 Thread Deepak R Varma
On Thu, Jan 05, 2023 at 09:13:35AM +0100, Julia Lawall wrote: > > Hi Julia, thanks for helping here. > > > > So, my question is why this > > > > make coccicheck M=drivers/gpu/drm/i915/ MODE=context > > COCCI=./scripts/coccinelle/api/debugfs/debugfs_simple_attr.cocci > > > > didn't catch this chunc

Re: [PATCH] drm/i915/fbc: Avoid full proxy f_ops for FBC debug attributes

2023-01-02 Thread Deepak R Varma
On Wed, Dec 28, 2022 at 06:18:12AM -0500, Rodrigo Vivi wrote: > On Tue, Dec 27, 2022 at 11:36:13PM +0530, Deepak R Varma wrote: > > On Tue, Dec 27, 2022 at 12:13:56PM -0500, Rodrigo Vivi wrote: > > > On Tue, Dec 27, 2022 at 01:30:53PM +0530, Deepak R Varma wr

Re: [PATCH] drm/tegra: submit: No need for Null pointer check before kfree

2023-01-02 Thread Deepak R Varma
On Fri, Dec 30, 2022 at 12:03:25PM +0200, Mikko Perttunen wrote: > On 12/30/22 12:01, Mikko Perttunen wrote: > > On 12/30/22 11:15, Stanislaw Gruszka wrote: > > > On Wed, Dec 28, 2022 at 03:17:59PM +0200, Mikko Perttunen wrote: > > > > On 12/28/22 15:08, Deepak R Varm

Re: [PATCH] drm/tegra: submit: No need for Null pointer check before kfree

2022-12-28 Thread Deepak R Varma
On Wed, Dec 28, 2022 at 03:48:05PM +0200, Mikko Perttunen wrote: > On 12/28/22 15:34, Deepak R Varma wrote: > > On Wed, Dec 28, 2022 at 03:17:59PM +0200, Mikko Perttunen wrote: > > > On 12/28/22 15:08, Deepak R Varma wrote: > > > > > > Hi, > > > &g

Re: [PATCH] drm/tegra: submit: No need for Null pointer check before kfree

2022-12-28 Thread Deepak R Varma
On Wed, Dec 28, 2022 at 03:17:59PM +0200, Mikko Perttunen wrote: > On 12/28/22 15:08, Deepak R Varma wrote: > > On Wed, Dec 28, 2022 at 02:28:54PM +0200, Mikko Perttunen wrote: > > > On 12/27/22 19:14, Deepak R Varma wrote: > > > > kfree() & vfree() internally

Re: [PATCH] drm/tegra: submit: No need for Null pointer check before kfree

2022-12-28 Thread Deepak R Varma
On Wed, Dec 28, 2022 at 02:28:54PM +0200, Mikko Perttunen wrote: > On 12/27/22 19:14, Deepak R Varma wrote: > > kfree() & vfree() internally perform NULL check on the pointer handed > > to it and take no action if it indeed is NULL. Hence there is no need > > for a pre-ch

[PATCH] gpu: host1x: No need for Null pointer check before kfree

2022-12-27 Thread Deepak R Varma
-off-by: Deepak R Varma --- drivers/gpu/host1x/fence.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/host1x/fence.c b/drivers/gpu/host1x/fence.c index df428bcbae69..42498902947f 100644 --- a/drivers/gpu/host1x/fence.c +++ b/drivers/gpu/host1x/fence.c @@ -93,8 +

[PATCH] drm/amd/display: No need for Null pointer check before kfree

2022-12-27 Thread Deepak R Varma
-off-by: Deepak R Varma --- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c | 3 +-- drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/dcn32_clk_mgr.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn30/dcn30_clk_mgr.c b/dri

Re: [PATCH] drm/i915/fbc: Avoid full proxy f_ops for FBC debug attributes

2022-12-27 Thread Deepak R Varma
On Tue, Dec 27, 2022 at 12:13:56PM -0500, Rodrigo Vivi wrote: > On Tue, Dec 27, 2022 at 01:30:53PM +0530, Deepak R Varma wrote: > > Using DEFINE_SIMPLE_ATTRIBUTE macro with the debugfs_create_file() > > function adds the overhead of introducing a proxy file operation > >

[PATCH] drm/tegra: submit: No need for Null pointer check before kfree

2022-12-27 Thread Deepak R Varma
-off-by: Deepak R Varma --- drivers/gpu/drm/tegra/submit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tegra/submit.c b/drivers/gpu/drm/tegra/submit.c index 066f88564169..06f836db99d0 100644 --- a/drivers/gpu/drm/tegra/submit.c +++ b/drivers/gpu/drm/t

[PATCH] drm/i915/fbc: Avoid full proxy f_ops for FBC debug attributes

2022-12-27 Thread Deepak R Varma
protect the original read and write function calls for the debug attributes. There is no need for any runtime proxy file operations to be managed by the debugfs core. This Change is reported by the debugfs_simple_attr.cocci Coccinelle semantic patch. Signed-off-by: Deepak R Varma --- drivers/gpu

[PATCH] drm/i915/display: Avoid full proxy f_ops for DRRS debug attributes

2022-12-26 Thread Deepak R Varma
protect the original read and write function calls for the debug attributes. There is no need for any runtime proxy file operations to be managed by the debugfs core. This Change is reported by the debugfs_simple_attr.cocci Coccinelle semantic patch. Signed-off-by: Deepak R Varma --- drivers/gpu

[PATCH] drm/nouveau/hwmon: Use sysfs_emit in show function callsbacks

2022-12-25 Thread Deepak R Varma
According to Documentation/filesystems/sysfs.rst, the show() callback function of kobject attributes should strictly use sysfs_emit() instead of sprintf() family functions. So, make this change. Issue identified using the coccinelle device_attr_show.cocci script. Signed-off-by: Deepak R Varma

[PATCH v2 2/2] drm/i915/selftests: Convert atomic_* API calls for i915_active.count refcount_*

2022-12-24 Thread Deepak R Varma
Handle the struct i915_active member variable count transition from atomic_t type to refcount_t type for selftest use cases. Transition the atomic_*() API calls to their equivalent refcount_*() API calls. Reported-by: kernel test robot Signed-off-by: Deepak R Varma --- Please note: 1

[PATCH v2 1/2] drm/i915: convert i915_active.count from atomic_t to refcount_t

2022-12-24 Thread Deepak R Varma
atomic_add_unless Signed-off-by: Deepak R Varma --- Please note: 1. Proposed changes are compile tested only. 2. This patch 1/2 is required to be applied before patch 2/2 due to interdependency. Changes in v2: 1. Patch added to the patch series. 2. Handle build issues Reported-by: kernel

[PATCH v2 0/2] convert i915_active.count from atomic_t to refcount_t

2022-12-24 Thread Deepak R Varma
refcount_* transition. Deepak R Varma (2): drm/i915: convert i915_active.count from atomic_t to refcount_t drm/i915/selftests: Convert atomic_* API calls for i915_active.count refcount_* drivers/gpu/drm/i915/i915_active.c | 28 +++- drivers/gpu/drm/i915

[PATCH] drm/i915: convert i915_active.count from atomic_t to refcount_t

2022-12-24 Thread Deepak R Varma
atomic_add_unless Signed-off-by: Deepak R Varma --- Please note: Proposed changes are compile tested only. drivers/gpu/drm/i915/i915_active.c | 24 +--- drivers/gpu/drm/i915/i915_active.h | 6 +++--- drivers/gpu/drm/i915/i915_active_types.h | 4 ++-- 3 files changed, 18

Re: [PATCH] drm/i915/gvt: Replace DEFINE_SIMPLE_ATTRIBUTE by DEFINE_DEBUGFS_ATTRIBUTE

2022-12-23 Thread Deepak R Varma
On Fri, Dec 16, 2022 at 09:37:47PM +0530, Deepak R Varma wrote: > The DEFINE_DEBUGFS_ATTRIBUTE macro has implementation for protecting the > read/write file operations from removal race conditions. This further > enables using debugfs_create_file_unsafe() function since there is no nee

[PATCH] drm/amdkfd: Use resource_size() helper function

2022-12-22 Thread Deepak R Varma
Use the resource_size() function instead of a open coded computation resource size. It makes the code more readable. Issue identified using resource_size.cocci coccinelle semantic patch. Signed-off-by: Deepak R Varma --- Note: Proposed change compile tested only. drivers/gpu/drm/amd/amdkfd

Re: [PATCH] drm/tegra: sor: Remove redundant error logging

2022-12-19 Thread Deepak R Varma
On Mon, Dec 12, 2022 at 10:44:55AM +0530, Deepak R Varma wrote: Hello, May I please request a review and feedback on this patch proposal? Also, I was able to build the changes for ARM arch verified using modinfo tegr-drm.ko command. Thank you, ./drv > A call to platform_get_irq() alre

Re: [PATCH] drm/sprd: remove redundant error logging

2022-12-19 Thread Deepak R Varma
On Sun, Dec 11, 2022 at 07:25:08PM +0530, Deepak R Varma wrote: Hello, May I please request a review and feedback on this patch proposal? Thank you, ./drv > A call to platform_get_irq() already prints an error on failure within > its own implementation. So printing another error based

Re: [PATCH] drm/fsl-dcu: Remove redundant error logging

2022-12-19 Thread Deepak R Varma
On Sun, Dec 11, 2022 at 03:57:47PM +0530, Deepak R Varma wrote: Hello, May I please request a review and feedback on this patch proposal? Thank you, ./drv > A call to platform_get_irq() already prints an error on failure within > its own implementation. So printing another error based

[PATCH] drm/i915/gvt: Replace DEFINE_SIMPLE_ATTRIBUTE by DEFINE_DEBUGFS_ATTRIBUTE

2022-12-16 Thread Deepak R Varma
DEFINE_SIMPLE_ATTRIBUTE macro by DEFINE_DEBUGFS_ATTRIBUTE and the debugfs_create_file() by the lightweight debugfs_create_file_unsafe() versions. This issue was identified using the coccinelle debugfs_simple_attr.cocci semantic patch. Signed-off-by: Deepak R Varma --- Please note: The changes are compile

[PATCH] drm/tegra: sor: Remove redundant error logging

2022-12-11 Thread Deepak R Varma
using platform_get_irq.cocci coccicheck script. Signed-off-by: Deepak R Varma --- Please note: I was not able to build this driver since I did not find the DRM_TEGRA option in menu config. All dependencies listed in the KConfig are enabled, however, I was still not able to find the DRM_TEGRA

[PATCH] drm/sprd: remove redundant error logging

2022-12-11 Thread Deepak R Varma
using platform_get_irq.cocci coccicheck script. Signed-off-by: Deepak R Varma --- drivers/gpu/drm/sprd/sprd_dpu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/sprd/sprd_dpu.c b/drivers/gpu/drm/sprd/sprd_dpu.c index 88f4259680f1..db0bcea1d9f4 100644 --- a

[PATCH] drm/fsl-dcu: Remove redundant error logging

2022-12-11 Thread Deepak R Varma
using platform_get_irq.cocci coccicheck script. Signed-off-by: Deepak R Varma --- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c index

Re: [PATCH] staging: fbtft: Use ARRAY_SIZE() to get argument count

2022-11-09 Thread Deepak R Varma
On Fri, Nov 04, 2022 at 08:12:11PM +0530, Deepak R Varma wrote: > On Fri, Nov 04, 2022 at 05:31:24PM +0530, Deepak R Varma wrote: > > On Mon, Oct 31, 2022 at 01:05:32PM +0100, Julia Lawall wrote: > > > > > > > > > I took a look, but it's pre

Re: [PATCH] staging: fbtft: Use ARRAY_SIZE() to get argument count

2022-11-04 Thread Deepak R Varma
On Fri, Nov 04, 2022 at 05:31:24PM +0530, Deepak R Varma wrote: > On Mon, Oct 31, 2022 at 01:05:32PM +0100, Julia Lawall wrote: > > > > > > I took a look, but it's pretty complex. You could take the code and > > reorganize it so that it is more readable, and the

Re: [PATCH] staging: fbtft: Use ARRAY_SIZE() to get argument count

2022-11-04 Thread Deepak R Varma
On Mon, Oct 31, 2022 at 01:05:32PM +0100, Julia Lawall wrote: > > > I took a look, but it's pretty complex. You could take the code and > reorganize it so that it is more readable, and then take the definition of > the ARRAY_SIZE macro, to better see what is going on. > > julia > Hello Greg, Juli

Re: [PATCH] staging: fbtft: Use ARRAY_SIZE() to get argument count

2022-10-31 Thread Deepak R Varma
On Mon, Oct 31, 2022 at 03:10:27PM +0530, Deepak Varma wrote: > On Mon, Oct 31, 2022 at 12:41:40PM +0530, Deepak Varma wrote: > > On Sat, Oct 29, 2022 at 07:34:26PM +0200, Julia Lawall wrote: > > > > > > > > > On Sat, 29 Oct 2022, Deepak R Varma wrote: > &g

Re: [PATCH] staging: fbtft: Use ARRAY_SIZE() to get argument count

2022-10-31 Thread Deepak R Varma
On Mon, Oct 31, 2022 at 12:41:40PM +0530, Deepak Varma wrote: > On Sat, Oct 29, 2022 at 07:34:26PM +0200, Julia Lawall wrote: > > > > > > On Sat, 29 Oct 2022, Deepak R Varma wrote: > > > > > On Sat, Oct 29, 2022 at 09:32:50AM +0200, Greg Kroah-Hartman wrote: &

Re: [PATCH] staging: fbtft: Use ARRAY_SIZE() to get argument count

2022-10-31 Thread Deepak R Varma
On Sat, Oct 29, 2022 at 07:34:26PM +0200, Julia Lawall wrote: > > > On Sat, 29 Oct 2022, Deepak R Varma wrote: > > > On Sat, Oct 29, 2022 at 09:32:50AM +0200, Greg Kroah-Hartman wrote: > > > On Fri, Oct 28, 2022 at 07:00:05PM +0530, Deepak R Varma wrote: > > > &

Re: [PATCH] staging: fbtft: Use ARRAY_SIZE() to get argument count

2022-10-29 Thread Deepak R Varma
On Sat, Oct 29, 2022 at 09:32:50AM +0200, Greg Kroah-Hartman wrote: > On Fri, Oct 28, 2022 at 07:00:05PM +0530, Deepak R Varma wrote: > > The ARRAY_SIZE(foo) macro should be preferred over sizeof operator > > based computation such as sizeof(foo)/sizeof(foo[0]) for finding > &g

[PATCH] staging: fbtft: Use ARRAY_SIZE() to get argument count

2022-10-28 Thread Deepak R Varma
The ARRAY_SIZE(foo) macro should be preferred over sizeof operator based computation such as sizeof(foo)/sizeof(foo[0]) for finding number of elements in an array. Issue identified using coccicheck. Signed-off-by: Deepak R Varma --- drivers/staging/fbtft/fbtft.h | 2 +- 1 file changed, 1

Re: [PATCH v2] drm/vc4: replace idr_init() by idr_init_base()

2020-11-08 Thread Deepak R Varma
On Fri, Nov 06, 2020 at 11:52:49AM +0100, Maxime Ripard wrote: > On Thu, Nov 05, 2020 at 01:24:14PM -0800, Eric Anholt wrote: > > On Thu, Nov 5, 2020 at 12:21 PM Deepak R Varma wrote: > > > > > > idr_init() uses base 0 which is an invalid identifier for this driver. &

[PATCH] drm/vmwgfx: replace idr_init() by idr_init_base()

2020-11-06 Thread Deepak R Varma
/ available. References: commit 6ce711f27500 ("idr: Make 1-based IDRs more efficient") Signed-off-by: Deepak R Varma --- drivers/gpu/drm/vmwgfx/ttm_object.c | 2 +- drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/

Re: [PATCH] drm/vc4: replace idr_init() by idr_init_base()

2020-11-06 Thread Deepak R Varma
On Thu, Nov 05, 2020 at 11:25:11AM -0800, Eric Anholt wrote: > On Thu, Nov 5, 2020 at 10:25 AM Deepak R Varma wrote: > > > > idr_init() uses base 0 which is an invalid identifier for this driver. > > The idr_alloc for this driver uses VC4_PERFMONID_MIN as start value for &

[PATCH v2] drm/vc4: replace idr_init() by idr_init_base()

2020-11-06 Thread Deepak R Varma
from 0 since 0 is always unused / available. References: commit 6ce711f27500 ("idr: Make 1-based IDRs more efficient") Signed-off-by: Deepak R Varma --- Changes since v1: - Change suggested by Eric Anholt 1. Use VC4_PERFMONID_MIN instead of magic number 1 drivers/g

[PATCH] drm/tegra: replace idr_init() by idr_init_base()

2020-11-06 Thread Deepak R Varma
cient") Signed-off-by: Deepak R Varma --- drivers/gpu/drm/tegra/drm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c index ba9d1c3e7cac..e4baf07992a4 100644 --- a/drivers/gpu/drm/tegra/drm.c +++ b/drivers/gpu

Re: [PATCH] drm/amdkfd: replace idr_init() by idr_init_base()

2020-11-06 Thread Deepak R Varma
On Wed, Nov 04, 2020 at 03:01:17PM -0500, Felix Kuehling wrote: > On 2020-11-04 10:13 a.m., Deepak R Varma wrote: > > idr_init() uses base 0 which is an invalid identifier. The new function > > idr_init_base allows IDR to set the ID lookup from base 1. This avoids > > all l

  1   2   >