We added some more lines of code to this if statement but forgot to add
curly braces.
Fixes: 0c24e7ef233b ("drm/amd/powerplay: add specific changes for VEGAM in
smu7_hwmgr.c")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/gpu/drm/amd/powerplay/hw
for this to be bigger than the number of GPUs in the system. The
> maximum number of GPUs supported due to device minor limit in DRM is 128.
>
128 is sort of a magic number. Is there a MAX_GPU define or something?
regards,
dan carpenter
___
a
args->n_devices is a u32 that comes from the user. The multiplication
could overflow on 32 bit systems possibly leading to privilege
escalation.
Fixes: 5ec7e02854b3 ("drm/amdkfd: Add ioctls for GPUVM memory management")
Signed-off-by: Dan Carpenter dan.carpen...@oracle.com>
diff
e should be using table->entries[0] here?
1487 return 0;
1488 }
1489 }
1490 return -EINVAL;
1491 }
regards,
dan carpenter
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
his.
>
> It's complex to have to remember the preferences for every subsystem.
> Preferences should be expressed in the MAINTAINERS file in some way.
> Also, since no one reads lkml, does it hurt to have even trivial patches?
I always tell people not to CC lkml when there
This has a static checker warning because "frev" and "crev" can be
uninitialized if "info" is NULL. I just changed the order of the checks
so that we check "info" first.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drive
return -EINVAL;
4830 }
4831 }
4832 return 0;
4833 }
regards,
dan carpenter
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
i++;
541 }
542
543 if (seg_distr[k] != -1)
^^
then this would be a problem.
544 lut_params->arr_curve_points[k].segments_num =
seg_distr[k];
545
regards,
dan carpenter
___
amd-g
c->crtc_id;
321
322 drm_handle_vblank(adev->ddev, crtc_index);
323 amdgpu_dm_crtc_handle_crc_irq(>base);
^^^
The new code dereferences without checking (inside the function call).
324 }
325
reg
because pp_late_fini() frees the parameter. The
amdgpu_pp_late_fini() function doesn't so that's a bit weird.
1504 adev->ip_blocks[i].status.late_initialized = false;
^^^
Dereference.
1505 }
1506
regards,
dan carpenter
_
Hi Samuel,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on drm/drm-next]
[also build test WARNING on v4.15-rc7 next-20180110]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system]
url:
(ent->d_inode, adev->rmmio_size);
debugfs_create_file() returns ERR_PTR(-ENODEV) if it's not enabled in
the .config or it returns a NULL pointer.
697 adev->debugfs_regs[i] = ent;
698 }
699
700 ret
F,
0x);
3769 mutex_unlock(>grbm_idx_mutex);
3770
3771 while (size) {
3772 uint32_t value;
3773
3774 value = data[offset++];
^^
We're possibly reading beyond the end of the ar
We assign "v_init = asic_blank_start;" a few lines earlier so there is
no need to do it again inside the if statements. Also "v_init" is
unsigned so it can't be less than zero.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/gp
backlight_device_register() never returns NULL, it returns error
pointers on error so the check here is wrong.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
selves because it scales better than relying on me to do it.
regards,
dan carpenter
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:2224 amdgpu_device_init() warn:
'adev->rio_mem' was not released on error
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:2395 amdgpu_device_init() warn:
'adev->rio_mem' was
plane_state->plane_size.video.luma_pitch = awidth;
regards,
dan carpenter
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
hole
function is a no-op? My Brian is melting???
1369 }
regards,
dan carpenter
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
not really appropriate here so it should be removed
as well.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
v2: in v1 I just added a tab
diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c
b/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_resource.c
index d91159
On Sat, Nov 04, 2017 at 10:16:23AM +0100, walter harms wrote:
>
>
> Am 04.11.2017 07:12, schrieb Dan Carpenter:
> > The if statement wasn't indented so it makes static analysis tools and
> > probably very recent GCC versions complain.
> >
> > Signed-
spin_unlock_irqrestore(>dev->event_lock, flags);
^^
Double unlock.
3896
3897 if (!pflip_needed) {
regards,
dan carpenter
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
EGIONS_NUMBER then we're reading beyond the end of the array
1697 regamma_params->arr_curve_points[k].segments_num =
1698 seg_distr[k];
1699
regards,
dan carpenter
___
amd-gfx mailin
The if statement wasn't indented so it makes static analysis tools and
probably very recent GCC versions complain.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
I went over 80 characters because other lines do already and it seemed
like the cleanest thing here.
diff --git a/d
On Tue, Oct 24, 2017 at 01:11:07PM +0300, Jani Nikula wrote:
> On Tue, 24 Oct 2017, Dan Carpenter <dan.carpen...@oracle.com> wrote:
> > We accidentally inverted an if statement and turned amd_powerplay_reset()
> > into a no-op.
> >
> > Fixes: ae97988fc89e ("
We accidentally inverted an if statement and turned amd_powerplay_reset()
into a no-op.
Fixes: ae97988fc89e ("drm/amd/powerplay: tidy up ret checks in amd_powerplay.c
(v3)")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
IMHO, tidying unreadable double negatives is
also possible I may have missed something.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
index b46280c1279f..2918de2f39ec 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
+++ b/
ISCRETE_MC_REGISTER_ARRAY_SIZE".
The "table->last" value can't possibly be greater than the array size
and it is allowed to be equal to it. So let's just remove that test
entirely.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
Not tested. Please review this one care
ISCRETE_MC_REGISTER_ARRAY_SIZE".
The "table->last" value can't possibly be greater than the array size
and it is allowed to be equal to it. So let's just remove that test
entirely.
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
---
Not tested. Please review this one c
On Thu, Aug 10, 2017 at 03:02:53PM +0200, Christian König wrote:
> Am 10.08.2017 um 14:53 schrieb Dan Carpenter:
> > On Thu, Aug 10, 2017 at 02:30:15PM +0200, Christian König wrote:
> > > Am 10.08.2017 um 14:16 schrieb Dan Carpenter:
> > > > "frag_align"
On Thu, Aug 10, 2017 at 02:30:15PM +0200, Christian König wrote:
> Am 10.08.2017 um 14:16 schrieb Dan Carpenter:
> > "frag_align" is a u64, so presumably we want to use the high bits as
> > well instead of shift wrapping.
> >
> > Fixes: 6be7adb37d9b (&qu
On Thu, Aug 10, 2017 at 02:30:15PM +0200, Christian König wrote:
> Am 10.08.2017 um 14:16 schrieb Dan Carpenter:
> > "frag_align" is a u64, so presumably we want to use the high bits as
> > well instead of shift wrapping.
> >
> > Fixes: 6be7adb37d9b (&qu
"frag_align" is a u64, so presumably we want to use the high bits as
well instead of shift wrapping.
Fixes: 6be7adb37d9b ("drm/amdgpu: increase fragmentation size for Vega10 v2")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/gpu/drm
My static checker complains that it's possible for "r" to be
uninitialized. It used to be set to zero so this returns it to the old
behavior.
Fixes: 98a7f88ce9a9 ("drm/amdgpu: bind BOs with GTT space allocated directly
v2")
Signed-off-by: Dan Carpenter <dan.carpen...@
qpd, q);
194 *allocated_vmid = 0;
195 }
196 mutex_unlock(>lock);
197 return retval;
198 }
regards,
dan carpenter
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
This is just future proofing code, not something that can be triggered
in real life. We're testing to make sure we don't shift wrap when we
do "1ull << i" so "i" has to be in the 0-63 range. If it's 64 then we
have gone too far.
Signed-off-by: Dan Carpenter <da
We accidentally return ERR_PTR(0) which is NULL. The caller is not
expecting that and it leads to an Oops.
Fixes: dd59239a9862 ("amdkfd: init aperture once per process")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process.
I sent a patch for this bug earlier. There is a second bug later in the
function which my patch fixes as well.
regards,
dan carpenter
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Smatch complains about a signedness bug here:
vega10_hwmgr.c:4202 vega10_force_clock_level()
warn: always true condition '(i >= 0) => (0-u32max >= 0)'
Fixes: 7b52db39a4c2 ("drm/amd/powerplay: fix bug sclk/mclk level can't be set
on vega10.")
Signed-of
return -ENOMEM;
324 }
regards,
dan carpenter
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
k_dep_table->entries[i].usCKSVOffsetandDisable & 0x7F);
439 clk_table->entries[i].sclk_offset =
440 clk_dep_table->entries[i].usAVFSOffset;
441 }
442
regards,
dan carpenter
__
If we added an:
else
BUG();
that would silence the warning.
regards,
dan carpenter
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
On Mon, Apr 03, 2017 at 03:12:31PM -0400, Alex Deucher wrote:
> On Mon, Apr 3, 2017 at 2:53 PM, Dan Carpenter <dan.carpen...@oracle.com>
> wrote:
> > Hello Ken Wang,
> >
> > The patch 220ab9bd1ccf: "drm/amdgpu: soc15 enable (v3)" from Mar 6,
> > 2017,
tate_adjust_rules() error: uninitialized symbol
'stable_pstate_sclk_dpm_percentage'.
regards,
dan carpenter
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
We should return unlock on the error path in pp_dpm_dispatch_tasks()
and there is a double lock bug in pp_dpm_set_sclk_od().
Fixes: 2a5071056e6a ("drm/amd/powerplay: add global PowerPlay mutex.")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/gpu/d
This switch statement is missing breaks.
Fixes: 2a5071056e6a ("drm/amd/powerplay: add global PowerPlay mutex.")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
in
We accidentally dereference "cb" if the kmalloc() fails.
Fixes: 451bc8eb8fe6 ("drm/amdgpu: fix PRT teardown on VM fini v3")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
b/drivers/gpu/drm/amd/amdgpu/amdg
tch is trying to do or why it exists...
> adev->gfx.config.max_shader_engines is set in gfx_v6_0_gpu_init() and
> it must be < 4 so we'll never be beyond the end of the array.
Could you remove the condition then? We should either check it always
or not at all. We shouldn't check it half
(i * 16 + j * 8));
3749 }
3750 }
3751
3752 gfx_v6_0_select_se_sh(adev, 0x, 0x, 0x);
3753 mutex_unlock(>grbm_idx_mutex);
3754
3755 cu_info->number = active_cu_number;
3756
reak;
425 mdelay(1);
426 }
427 break;
^^
428 }
429
regards,
dan carpenter
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
The amdgpu_vm_bo_rmv() function frees "bo_va" so we shouldn't free it
a second time.
Fixes: 4e4bbe7343a6 ("drm/amdgpu:add new file for SRIOV")
Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c
b/drivers/gpu/dr
e.\n");
BUG_ON() takes a condition argument, not a format string.
311 break;
312 }
313 }
regards,
dan carpenter
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
301 - 351 of 351 matches
Mail list logo