Re: [PATCH v11, 09/19] media: mtk-vcodec: Add irq interface for multi hardware

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Il 29/11/21 04:41, Yunfei Dong ha scritto:
Adds irq interface for multi hardware.

Signed-off-by: Yunfei Dong <yunfei.dong@xxxxxxxxxxxx>
---
  .../platform/mtk-vcodec/mtk_vcodec_dec_drv.c  | 33 ++++++++++++++++---
  .../platform/mtk-vcodec/mtk_vcodec_dec_hw.c   |  2 +-
  .../platform/mtk-vcodec/mtk_vcodec_drv.h      | 25 ++++++++++----
  .../platform/mtk-vcodec/mtk_vcodec_enc_drv.c  |  4 +--
  .../platform/mtk-vcodec/mtk_vcodec_intr.c     | 27 +++++++--------
  .../platform/mtk-vcodec/mtk_vcodec_intr.h     |  4 +--
  .../platform/mtk-vcodec/vdec/vdec_h264_if.c   |  2 +-
  .../mtk-vcodec/vdec/vdec_h264_req_if.c        |  2 +-
  .../platform/mtk-vcodec/vdec/vdec_vp8_if.c    |  2 +-
  .../platform/mtk-vcodec/vdec/vdec_vp9_if.c    |  2 +-
  .../platform/mtk-vcodec/venc/venc_h264_if.c   |  2 +-
  .../platform/mtk-vcodec/venc/venc_vp8_if.c    |  2 +-
  12 files changed, 70 insertions(+), 37 deletions(-)

diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c
index 95fbe9be3f6d..ac279c2a3f8a 100644
--- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c
+++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c
@@ -52,6 +52,20 @@ static int mtk_vcodec_subdev_device_check(struct mtk_vcodec_dev *vdec_dev)
  	return 0;
  }
+static int mtk_vcodec_get_hw_count(struct mtk_vcodec_dev *dev)
+{
+	switch (dev->vdec_pdata->hw_arch) {
+	case MTK_VDEC_PURE_SINGLE_CORE:
+		 return MTK_VDEC_ONE_CORE;
+	case MTK_VDEC_LAT_SINGLE_CORE:
+		return MTK_VDEC_ONE_LAT_ONE_CORE;
+	default:
+		mtk_v4l2_err("not support hw arch:%d",
+			dev->vdec_pdata->hw_arch);

There's no need to break this line... also, what about changing the message to
"hw arch %d not supported"?


Apart from that,
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux