mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
gpu: nvgpu: Return -EINVAL for bad l2 flush args
When the L2 flush IOCTL gets no l2 flush and no fb flush we now return -EINVAL. This can sometimes happen if the user tries to just invalidate. Currently we do not support L2 invalidates only. Bug 1661242 Change-Id: I87f3259bfbd736b5f4222cfe7b3cfa4a6475389e Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1227125 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
bc4182afeb
commit
9d97af9e9f
@@ -330,6 +330,10 @@ static int nvgpu_gpu_ioctl_l2_fb_ops(struct gk20a *g,
|
|||||||
{
|
{
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
|
||||||
|
if ((!args->l2_flush && !args->fb_flush) ||
|
||||||
|
(!args->l2_flush && args->l2_invalidate))
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
if (args->l2_flush)
|
if (args->l2_flush)
|
||||||
g->ops.mm.l2_flush(g, args->l2_invalidate ? true : false);
|
g->ops.mm.l2_flush(g, args->l2_invalidate ? true : false);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user