Skip to content

Commit d534e6c

Browse files
buluessrkhuangtao
authored andcommitted
driver: video: rockchip: fix vepu build fail and can not work
1.vepu need core_clk define 2.there is no ION_HEAP function,replace it with the same definition Change-Id: I7cf02c9e446976f0424d9489e081c9614b7e7e0c Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
1 parent df50e22 commit d534e6c

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

drivers/video/rockchip/vpu/mpp_dev_vepu.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,8 @@ static void rockchip_mpp_vepu_power_on(struct rockchip_mpp_dev *mpp)
287287
clk_prepare_enable(enc->aclk);
288288
if (enc->hclk)
289289
clk_prepare_enable(enc->hclk);
290+
if (enc->cclk)
291+
clk_prepare_enable(enc->cclk);
290292
}
291293

292294
static void rockchip_mpp_vepu_power_off(struct rockchip_mpp_dev *mpp)
@@ -297,6 +299,8 @@ static void rockchip_mpp_vepu_power_off(struct rockchip_mpp_dev *mpp)
297299
clk_disable_unprepare(enc->hclk);
298300
if (enc->aclk)
299301
clk_disable_unprepare(enc->aclk);
302+
if (enc->cclk)
303+
clk_disable_unprepare(enc->cclk);
300304
}
301305

302306
static int rockchip_mpp_vepu_probe(struct rockchip_mpp_dev *mpp)
@@ -318,6 +322,12 @@ static int rockchip_mpp_vepu_probe(struct rockchip_mpp_dev *mpp)
318322
goto fail;
319323
}
320324

325+
enc->cclk = devm_clk_get(mpp->dev, "clk_core");
326+
if (IS_ERR_OR_NULL(enc->cclk)) {
327+
dev_err(mpp->dev, "failed on clk_get cclk\n");
328+
goto fail;
329+
}
330+
321331
if (of_property_read_bool(np, "mode_ctrl")) {
322332
of_property_read_u32(np, "mode_bit", &enc->mode_bit);
323333
of_property_read_u32(np, "mode_ctrl", &enc->mode_ctrl);

drivers/video/rockchip/vpu/mpp_dev_vepu.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ struct rockchip_vepu_dev {
2727

2828
struct clk *aclk;
2929
struct clk *hclk;
30+
struct clk *cclk;
3031

3132
struct reset_control *rst_a;
3233
struct reset_control *rst_h;

drivers/video/rockchip/vpu/vpu_iommu_ion.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,9 @@ static int vpu_ion_alloc(struct vpu_iommu_session_info *session_info,
240240
unsigned int heap_id_mask;
241241

242242
if (iommu_info->mmu_dev)
243-
heap_id_mask = ION_HEAP(ION_VMALLOC_HEAP_ID);
243+
heap_id_mask = ION_HEAP_TYPE_SYSTEM;
244244
else
245-
heap_id_mask = ION_HEAP(ION_CMA_HEAP_ID);
245+
heap_id_mask = ION_HEAP_TYPE_DMA;
246246

247247
ion_buffer = kzalloc(sizeof(*ion_buffer), GFP_KERNEL);
248248
if (!ion_buffer)

0 commit comments

Comments
 (0)