Skip to content

Commit

Permalink
Merge tag 'drm-misc-fixes-2019-10-30-1' of git://anongit.freedesktop.…
Browse files Browse the repository at this point in the history
…org/drm/drm-misc into drm-fixes

 - three fixes for panfrost, one to silence a warning, one to fix
   runtime_pm and one to prevent bogus pointer dereferences
 - one fix for a memleak in v3d

Signed-off-by: Dave Airlie <airlied@redhat.com>

From: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20191030182207.evrscl7lnv42u5zu@hendrix
  • Loading branch information
Dave Airlie committed Nov 1, 2019
2 parents 6f96621 + f70744c commit ec26530
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/panfrost/panfrost_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -556,11 +556,11 @@ static int panfrost_probe(struct platform_device *pdev)
return 0;

err_out2:
pm_runtime_disable(pfdev->dev);
panfrost_devfreq_fini(pfdev);
err_out1:
panfrost_device_fini(pfdev);
err_out0:
pm_runtime_disable(pfdev->dev);
drm_dev_put(ddev);
return err;
}
Expand Down
15 changes: 8 additions & 7 deletions drivers/gpu/drm/panfrost/panfrost_mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,9 @@ static size_t get_pgsize(u64 addr, size_t size)
return SZ_2M;
}

void panfrost_mmu_flush_range(struct panfrost_device *pfdev,
struct panfrost_mmu *mmu,
u64 iova, size_t size)
static void panfrost_mmu_flush_range(struct panfrost_device *pfdev,
struct panfrost_mmu *mmu,
u64 iova, size_t size)
{
if (mmu->as < 0)
return;
Expand Down Expand Up @@ -406,11 +406,11 @@ addr_to_drm_mm_node(struct panfrost_device *pfdev, int as, u64 addr)
spin_lock(&pfdev->as_lock);
list_for_each_entry(mmu, &pfdev->as_lru_list, list) {
if (as == mmu->as)
break;
goto found_mmu;
}
if (as != mmu->as)
goto out;
goto out;

found_mmu:
priv = container_of(mmu, struct panfrost_file_priv, mmu);

spin_lock(&priv->mm_lock);
Expand All @@ -432,7 +432,8 @@ addr_to_drm_mm_node(struct panfrost_device *pfdev, int as, u64 addr)

#define NUM_FAULT_PAGES (SZ_2M / PAGE_SIZE)

int panfrost_mmu_map_fault_addr(struct panfrost_device *pfdev, int as, u64 addr)
static int panfrost_mmu_map_fault_addr(struct panfrost_device *pfdev, int as,
u64 addr)
{
int ret, i;
struct panfrost_gem_object *bo;
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/panfrost/panfrost_perfcnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "panfrost_issues.h"
#include "panfrost_job.h"
#include "panfrost_mmu.h"
#include "panfrost_perfcnt.h"
#include "panfrost_regs.h"

#define COUNTERS_PER_BLOCK 64
Expand Down
5 changes: 4 additions & 1 deletion drivers/gpu/drm/v3d/v3d_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,13 +557,16 @@ v3d_submit_cl_ioctl(struct drm_device *dev, void *data,

if (args->bcl_start != args->bcl_end) {
bin = kcalloc(1, sizeof(*bin), GFP_KERNEL);
if (!bin)
if (!bin) {
v3d_job_put(&render->base);
return -ENOMEM;
}

ret = v3d_job_init(v3d, file_priv, &bin->base,
v3d_job_free, args->in_sync_bcl);
if (ret) {
v3d_job_put(&render->base);
kfree(bin);
return ret;
}

Expand Down

0 comments on commit ec26530

Please sign in to comment.