linux/drivers/gpu/drm/vc4/vc4_v3d.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2014 The Linux Foundation. All rights reserved.
 * Copyright (C) 2013 Red Hat
 * Author: Rob Clark <[email protected]>
 */

#include <linux/clk.h>
#include <linux/component.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>

#include "vc4_drv.h"
#include "vc4_regs.h"

static const struct debugfs_reg32 v3d_regs[] =;

static int vc4_v3d_debugfs_ident(struct seq_file *m, void *unused)
{}

/*
 * Wraps pm_runtime_get_sync() in a refcount, so that we can reliably
 * get the pm_runtime refcount to 0 in vc4_reset().
 */
int
vc4_v3d_pm_get(struct vc4_dev *vc4)
{}

void
vc4_v3d_pm_put(struct vc4_dev *vc4)
{}

static void vc4_v3d_init_hw(struct drm_device *dev)
{}

int vc4_v3d_get_bin_slot(struct vc4_dev *vc4)
{}

/*
 * 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
 * buffer that point into the tile alloc buffer or binner overflow
 * memory only have 28 bits (256MB), and the top 4 on the bus for
 * tile alloc references end up coming from the tile state buffer's
 * address.
 *
 * To work around this, we allocate a single large buffer while V3D is
 * in use, make sure that it has the top 4 bits constant across its
 * entire extent, and then put the tile state, tile alloc, and binner
 * overflow memory inside that buffer.
 *
 * This creates a limitation where we may not be able to execute a job
 * if it doesn't fit within the buffer that we allocated up front.
 * However, it turns out that 16MB is "enough for anybody", and
 * real-world applications run into allocation failures from the
 * overall DMA pool before they make scenes complicated enough to run
 * out of bin space.
 */
static int bin_bo_alloc(struct vc4_dev *vc4)
{}

int vc4_v3d_bin_bo_get(struct vc4_dev *vc4, bool *used)
{}

static void bin_bo_release(struct kref *ref)
{}

void vc4_v3d_bin_bo_put(struct vc4_dev *vc4)
{}

#ifdef CONFIG_PM
static int vc4_v3d_runtime_suspend(struct device *dev)
{}

static int vc4_v3d_runtime_resume(struct device *dev)
{}
#endif

int vc4_v3d_debugfs_init(struct drm_minor *minor)
{}

static int vc4_v3d_bind(struct device *dev, struct device *master, void *data)
{}

static void vc4_v3d_unbind(struct device *dev, struct device *master,
			   void *data)
{}

static const struct dev_pm_ops vc4_v3d_pm_ops =;

static const struct component_ops vc4_v3d_ops =;

static int vc4_v3d_dev_probe(struct platform_device *pdev)
{}

static void vc4_v3d_dev_remove(struct platform_device *pdev)
{}

const struct of_device_id vc4_v3d_dt_match[] =;

struct platform_driver vc4_v3d_driver =;