mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
media: cedrus: Allow different mod clock rates
Some VPU variants may run at higher clock speeds. They actually need extra speed to be capable of decoding more complex codecs like HEVC or bigger image sizes (4K). Expand variant structure with mod_rate information. Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
This commit is contained in:
parent
b65f1e6546
commit
9d7a1bed07
@ -369,36 +369,41 @@ static int cedrus_remove(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
static const struct cedrus_variant sun4i_a10_cedrus_variant = {
|
||||
/* No particular capability. */
|
||||
.mod_rate = 320000000,
|
||||
};
|
||||
|
||||
static const struct cedrus_variant sun5i_a13_cedrus_variant = {
|
||||
/* No particular capability. */
|
||||
.mod_rate = 320000000,
|
||||
};
|
||||
|
||||
static const struct cedrus_variant sun7i_a20_cedrus_variant = {
|
||||
/* No particular capability. */
|
||||
.mod_rate = 320000000,
|
||||
};
|
||||
|
||||
static const struct cedrus_variant sun8i_a33_cedrus_variant = {
|
||||
.capabilities = CEDRUS_CAPABILITY_UNTILED,
|
||||
.mod_rate = 320000000,
|
||||
};
|
||||
|
||||
static const struct cedrus_variant sun8i_h3_cedrus_variant = {
|
||||
.capabilities = CEDRUS_CAPABILITY_UNTILED,
|
||||
.mod_rate = 402000000,
|
||||
};
|
||||
|
||||
static const struct cedrus_variant sun50i_a64_cedrus_variant = {
|
||||
.capabilities = CEDRUS_CAPABILITY_UNTILED,
|
||||
.mod_rate = 402000000,
|
||||
};
|
||||
|
||||
static const struct cedrus_variant sun50i_h5_cedrus_variant = {
|
||||
.capabilities = CEDRUS_CAPABILITY_UNTILED,
|
||||
.mod_rate = 402000000,
|
||||
};
|
||||
|
||||
static const struct cedrus_variant sun50i_h6_cedrus_variant = {
|
||||
.capabilities = CEDRUS_CAPABILITY_UNTILED,
|
||||
.quirks = CEDRUS_QUIRK_NO_DMA_OFFSET,
|
||||
.mod_rate = 600000000,
|
||||
};
|
||||
|
||||
static const struct of_device_id cedrus_dt_match[] = {
|
||||
|
@ -94,6 +94,7 @@ struct cedrus_dec_ops {
|
||||
struct cedrus_variant {
|
||||
unsigned int capabilities;
|
||||
unsigned int quirks;
|
||||
unsigned int mod_rate;
|
||||
};
|
||||
|
||||
struct cedrus_dev {
|
||||
|
@ -236,7 +236,7 @@ int cedrus_hw_probe(struct cedrus_dev *dev)
|
||||
goto err_sram;
|
||||
}
|
||||
|
||||
ret = clk_set_rate(dev->mod_clk, CEDRUS_CLOCK_RATE_DEFAULT);
|
||||
ret = clk_set_rate(dev->mod_clk, variant->mod_rate);
|
||||
if (ret) {
|
||||
dev_err(dev->dev, "Failed to set clock rate\n");
|
||||
|
||||
|
@ -16,8 +16,6 @@
|
||||
#ifndef _CEDRUS_HW_H_
|
||||
#define _CEDRUS_HW_H_
|
||||
|
||||
#define CEDRUS_CLOCK_RATE_DEFAULT 320000000
|
||||
|
||||
int cedrus_engine_enable(struct cedrus_dev *dev, enum cedrus_codec codec);
|
||||
void cedrus_engine_disable(struct cedrus_dev *dev);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user