mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
drm/vc4: Reformat and the binner bo allocation helper
In preparation for wrapping the binner bo allocation helper with put/get helpers, pass the vc4 dev directly and drop the vc4 prefix. Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com> Reviewed-by: Eric Anholt <eric@anholt.net> Link: https://patchwork.freedesktop.org/patch/msgid/20190516145544.29051-2-paul.kocialkowski@bootlin.com
This commit is contained in:
parent
1f1635b187
commit
66fafd3387
1 changed files with 5 additions and 6 deletions
|
@ -213,7 +213,7 @@ try_again:
|
|||
}
|
||||
|
||||
/**
|
||||
* vc4_allocate_bin_bo() - allocates the memory that will be used for
|
||||
* bin_bo_alloc() - allocates the memory that will be used for
|
||||
* tile binning.
|
||||
*
|
||||
* The binner has a limitation that the addresses in the tile state
|
||||
|
@ -234,9 +234,8 @@ try_again:
|
|||
* overall CMA pool before they make scenes complicated enough to run
|
||||
* out of bin space.
|
||||
*/
|
||||
static int vc4_allocate_bin_bo(struct drm_device *drm)
|
||||
static int bin_bo_alloc(struct vc4_dev *vc4)
|
||||
{
|
||||
struct vc4_dev *vc4 = to_vc4_dev(drm);
|
||||
struct vc4_v3d *v3d = vc4->v3d;
|
||||
uint32_t size = 16 * 1024 * 1024;
|
||||
int ret = 0;
|
||||
|
@ -251,7 +250,7 @@ static int vc4_allocate_bin_bo(struct drm_device *drm)
|
|||
INIT_LIST_HEAD(&list);
|
||||
|
||||
while (true) {
|
||||
struct vc4_bo *bo = vc4_bo_create(drm, size, true,
|
||||
struct vc4_bo *bo = vc4_bo_create(vc4->dev, size, true,
|
||||
VC4_BO_TYPE_BIN);
|
||||
|
||||
if (IS_ERR(bo)) {
|
||||
|
@ -333,7 +332,7 @@ static int vc4_v3d_runtime_resume(struct device *dev)
|
|||
struct vc4_dev *vc4 = v3d->vc4;
|
||||
int ret;
|
||||
|
||||
ret = vc4_allocate_bin_bo(vc4->dev);
|
||||
ret = bin_bo_alloc(vc4);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
@ -403,7 +402,7 @@ static int vc4_v3d_bind(struct device *dev, struct device *master, void *data)
|
|||
if (ret != 0)
|
||||
return ret;
|
||||
|
||||
ret = vc4_allocate_bin_bo(drm);
|
||||
ret = bin_bo_alloc(vc4);
|
||||
if (ret) {
|
||||
clk_disable_unprepare(v3d->clk);
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue