From patchwork Fri Apr 2 10:06:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 414481 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, UPPERCASE_50_75, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68130C43462 for ; Fri, 2 Apr 2021 10:05:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 32CC061158 for ; Fri, 2 Apr 2021 10:05:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234463AbhDBKF3 (ORCPT ); Fri, 2 Apr 2021 06:05:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229605AbhDBKFZ (ORCPT ); Fri, 2 Apr 2021 06:05:25 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00113C06178A for ; Fri, 2 Apr 2021 03:05:18 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id t5-20020a1c77050000b029010e62cea9deso2156808wmi.0 for ; Fri, 02 Apr 2021 03:05:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7s5+7BK8xNEcPbMP0ljsXGekLiTrPOPpZVr6AknmyEo=; b=FObTkccKPG4KH/tIZP31XkR/nf2b6A7tB/ury4NREB1yDnAl3Y89tfPAiu4cU8199c uT9NTNbP6pSyc2EGoLB/hagEr193UxINIDfCnfj8jBf7pp5cV71fPmbEtw9sVTIdPqek ec6fjwtiJfxQYB6QROuxqC8VZlF9+RlIs/WchmHiMcmwGS/YDcK07qXk53bfwdZuVGun BD3cAAtmi5hGgs+pBaLYObiDW4GmEeG08zP9MZTecm4qYjSzHy3zl6Ug7SvZntfYQ8SA BOV1kigLrGvqWOtCI6XTea0gscOIr+KKOoYjmsrphbtVTQaDS832TdvTCD8EIoWim4sJ yYAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7s5+7BK8xNEcPbMP0ljsXGekLiTrPOPpZVr6AknmyEo=; b=oJfsEE+xPK/7Lmr4BGcXY/KpI8Qy0giEYGTiMH3t0tteeqt8dnrnBeWcMzPzzPJfY6 25DoXmHQpfcO8LeibUZ9QqWpshFlVS41QGQ2GOtnAjK5AlP6kFd3SBUzrNyaTv6M4QNu olBS2m6f4luZyXhKIrJ7pIIogvVmWdnZxorH0Xw0xf7KkuP6IhXBNp65ThoyewhFBAcA X0go+krQZI6yIBLvJCrPDfzGFL2IimXkU178xNKdmx7GvbXjksoLSSQsMz22qP6tCoZY H8ujdk1c3M/JfYlAnrnvuXY0sfaEuqLUdBofWc+l3ZlNEwijyG/L6P6kDqIVXRWqa2dp OD2w== X-Gm-Message-State: AOAM530EkVR5QYILxpwc0vBBrh/5/yTzuc114OBcCLDuOjA7gZHEPQqK kJjjqwpCaRjECr11fj7/3DlxnQ== X-Google-Smtp-Source: ABdhPJy+C8LlnsirjCBdjgtkLqhRBECjcJgVhyQjCFSJZMKNgbSnlYbOZC8V9MsVRHvN98V4k5AGzg== X-Received: by 2002:a1c:ed0d:: with SMTP id l13mr2525245wmh.78.1617357917625; Fri, 02 Apr 2021 03:05:17 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id v18sm15466618wrf.41.2021.04.02.03.05.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Apr 2021 03:05:17 -0700 (PDT) From: Bryan O'Donoghue To: stanimir.varbanov@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, mchehab@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: bryan.odonoghue@linaro.org, dikshita@codeaurora.org, jonathan@marek.ca, vgarodia@codeaurora.org Subject: [PATCH v3 01/25] media: venus: Update v6 buffer descriptors Date: Fri, 2 Apr 2021 11:06:24 +0100 Message-Id: <20210402100648.1815854-2-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> References: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Currently hfi_platform_v6.c adds a bunch of capability parameters. Reviewing downstream we can see a number of these need to be updated. techpack/video/msm/vidc/msm_vidc_platform.c :: kona_capabilities[] Signed-off-by: Bryan O'Donoghue Acked-by: Stanimir Varbanov --- .../platform/qcom/venus/hfi_platform_v6.c | 138 +++++++++--------- 1 file changed, 69 insertions(+), 69 deletions(-) diff --git a/drivers/media/platform/qcom/venus/hfi_platform_v6.c b/drivers/media/platform/qcom/venus/hfi_platform_v6.c index 2278be13cb90..dd1a03911b6c 100644 --- a/drivers/media/platform/qcom/venus/hfi_platform_v6.c +++ b/drivers/media/platform/qcom/venus/hfi_platform_v6.c @@ -9,15 +9,15 @@ static const struct hfi_plat_caps caps[] = { .codec = HFI_VIDEO_CODEC_H264, .domain = VIDC_SESSION_TYPE_DEC, .cap_bufs_mode_dynamic = true, - .caps[0] = {HFI_CAPABILITY_FRAME_WIDTH, 96, 5760, 1}, - .caps[1] = {HFI_CAPABILITY_FRAME_HEIGHT, 96, 5760, 1}, + .caps[0] = {HFI_CAPABILITY_FRAME_WIDTH, 128, 8192, 1}, + .caps[1] = {HFI_CAPABILITY_FRAME_HEIGHT, 128, 8192, 1}, /* ((5760 * 2880) / 256) */ - .caps[2] = {HFI_CAPABILITY_MBS_PER_FRAME, 36, 64800, 1}, - .caps[3] = {HFI_CAPABILITY_BITRATE, 1, 200000000, 1}, + .caps[2] = {HFI_CAPABILITY_MBS_PER_FRAME, 64, 138240, 1}, + .caps[3] = {HFI_CAPABILITY_BITRATE, 1, 220000000, 1}, .caps[4] = {HFI_CAPABILITY_SCALE_X, 65536, 65536, 1}, .caps[5] = {HFI_CAPABILITY_SCALE_Y, 65536, 65536, 1}, - .caps[6] = {HFI_CAPABILITY_MBS_PER_SECOND, 36, 1958400, 1}, - .caps[7] = {HFI_CAPABILITY_FRAMERATE, 1, 480, 1}, + .caps[6] = {HFI_CAPABILITY_MBS_PER_SECOND, 64, 7833600, 1}, + .caps[7] = {HFI_CAPABILITY_FRAMERATE, 1, 960, 1}, .caps[8] = {HFI_CAPABILITY_MAX_VIDEOCORES, 0, 1, 1}, .num_caps = 9, .pl[0] = {HFI_H264_PROFILE_BASELINE, HFI_H264_LEVEL_52}, @@ -35,15 +35,15 @@ static const struct hfi_plat_caps caps[] = { .codec = HFI_VIDEO_CODEC_HEVC, .domain = VIDC_SESSION_TYPE_DEC, .cap_bufs_mode_dynamic = true, - .caps[0] = {HFI_CAPABILITY_FRAME_WIDTH, 96, 4096, 1}, - .caps[1] = {HFI_CAPABILITY_FRAME_HEIGHT, 96, 4096, 1}, - .caps[2] = {HFI_CAPABILITY_MBS_PER_FRAME, 1, 36864, 1}, - .caps[3] = {HFI_CAPABILITY_BITRATE, 1, 120000000, 1}, - .caps[4] = {HFI_CAPABILITY_SCALE_X, 4096, 65536, 1}, - .caps[5] = {HFI_CAPABILITY_SCALE_Y, 4096, 65536, 1}, - .caps[6] = {HFI_CAPABILITY_MBS_PER_SECOND, 1, 2073600, 1}, - .caps[7] = {HFI_CAPABILITY_FRAMERATE, 1, 480, 1}, - .caps[8] = {HFI_CAPABILITY_MAX_VIDEOCORES, 1, 2, 1}, + .caps[0] = {HFI_CAPABILITY_FRAME_WIDTH, 128, 8192, 1}, + .caps[1] = {HFI_CAPABILITY_FRAME_HEIGHT, 128, 8192, 1}, + .caps[2] = {HFI_CAPABILITY_MBS_PER_FRAME, 64, 138240, 1}, + .caps[3] = {HFI_CAPABILITY_BITRATE, 1, 220000000, 1}, + .caps[4] = {HFI_CAPABILITY_SCALE_X, 65536, 65536, 1}, + .caps[5] = {HFI_CAPABILITY_SCALE_Y, 65536, 65536, 1}, + .caps[6] = {HFI_CAPABILITY_MBS_PER_SECOND, 64, 7833600, 1}, + .caps[7] = {HFI_CAPABILITY_FRAMERATE, 1, 960, 1}, + .caps[8] = {HFI_CAPABILITY_MAX_VIDEOCORES, 0, 1, 1}, .caps[9] = {HFI_CAPABILITY_MAX_WORKMODES, 1, 3, 1}, .num_caps = 10, .pl[0] = {HFI_HEVC_PROFILE_MAIN, HFI_HEVC_LEVEL_6 | HFI_HEVC_TIER_HIGH0}, @@ -61,15 +61,15 @@ static const struct hfi_plat_caps caps[] = { .codec = HFI_VIDEO_CODEC_VP8, .domain = VIDC_SESSION_TYPE_DEC, .cap_bufs_mode_dynamic = true, - .caps[0] = {HFI_CAPABILITY_FRAME_WIDTH, 96, 4096, 1}, - .caps[1] = {HFI_CAPABILITY_FRAME_HEIGHT, 96, 4096, 1}, - .caps[2] = {HFI_CAPABILITY_MBS_PER_FRAME, 1, 36864, 1}, - .caps[3] = {HFI_CAPABILITY_BITRATE, 1, 120000000, 1}, - .caps[4] = {HFI_CAPABILITY_SCALE_X, 4096, 65536, 1}, - .caps[5] = {HFI_CAPABILITY_SCALE_Y, 4096, 65536, 1}, - .caps[6] = {HFI_CAPABILITY_MBS_PER_SECOND, 1, 2073600, 1}, - .caps[7] = {HFI_CAPABILITY_FRAMERATE, 1, 480, 1}, - .caps[8] = {HFI_CAPABILITY_MAX_VIDEOCORES, 1, 2, 1}, + .caps[0] = {HFI_CAPABILITY_FRAME_WIDTH, 128, 4096, 1}, + .caps[1] = {HFI_CAPABILITY_FRAME_HEIGHT, 128, 4096, 1}, + .caps[2] = {HFI_CAPABILITY_MBS_PER_FRAME, 64, 36864, 1}, + .caps[3] = {HFI_CAPABILITY_BITRATE, 1, 100000000, 1}, + .caps[4] = {HFI_CAPABILITY_SCALE_X, 65536, 65536, 1}, + .caps[5] = {HFI_CAPABILITY_SCALE_Y, 65536, 65536, 1}, + .caps[6] = {HFI_CAPABILITY_MBS_PER_SECOND, 64, 4423680, 1}, + .caps[7] = {HFI_CAPABILITY_FRAMERATE, 1, 120, 1}, + .caps[8] = {HFI_CAPABILITY_MAX_VIDEOCORES, 0, 1, 1}, .caps[9] = {HFI_CAPABILITY_MAX_WORKMODES, 1, 3, 1}, .num_caps = 10, .pl[0] = {HFI_VPX_PROFILE_MAIN, HFI_VPX_LEVEL_VERSION_0}, @@ -86,15 +86,15 @@ static const struct hfi_plat_caps caps[] = { .codec = HFI_VIDEO_CODEC_VP9, .domain = VIDC_SESSION_TYPE_DEC, .cap_bufs_mode_dynamic = true, - .caps[0] = {HFI_CAPABILITY_FRAME_WIDTH, 96, 4096, 1}, - .caps[1] = {HFI_CAPABILITY_FRAME_HEIGHT, 96, 4096, 1}, - .caps[2] = {HFI_CAPABILITY_MBS_PER_FRAME, 1, 36864, 1}, - .caps[3] = {HFI_CAPABILITY_BITRATE, 1, 120000000, 1}, - .caps[4] = {HFI_CAPABILITY_SCALE_X, 4096, 65536, 1}, - .caps[5] = {HFI_CAPABILITY_SCALE_Y, 4096, 65536, 1}, - .caps[6] = {HFI_CAPABILITY_MBS_PER_SECOND, 1, 2073600, 1}, - .caps[7] = {HFI_CAPABILITY_FRAMERATE, 1, 480, 1}, - .caps[8] = {HFI_CAPABILITY_MAX_VIDEOCORES, 1, 2, 1}, + .caps[0] = {HFI_CAPABILITY_FRAME_WIDTH, 128, 8192, 1}, + .caps[1] = {HFI_CAPABILITY_FRAME_HEIGHT, 128, 8192, 1}, + .caps[2] = {HFI_CAPABILITY_MBS_PER_FRAME, 64, 138240, 1}, + .caps[3] = {HFI_CAPABILITY_BITRATE, 1, 220000000, 1}, + .caps[4] = {HFI_CAPABILITY_SCALE_X, 65536, 65536, 1}, + .caps[5] = {HFI_CAPABILITY_SCALE_Y, 65536, 65536, 1}, + .caps[6] = {HFI_CAPABILITY_MBS_PER_SECOND, 64, 7833600, 1}, + .caps[7] = {HFI_CAPABILITY_FRAMERATE, 1, 960, 1}, + .caps[8] = {HFI_CAPABILITY_MAX_VIDEOCORES, 0, 1, 1}, .caps[9] = {HFI_CAPABILITY_MAX_WORKMODES, 1, 3, 1}, .num_caps = 10, .pl[0] = {HFI_VP9_PROFILE_P0, 200}, @@ -112,15 +112,15 @@ static const struct hfi_plat_caps caps[] = { .codec = HFI_VIDEO_CODEC_MPEG2, .domain = VIDC_SESSION_TYPE_DEC, .cap_bufs_mode_dynamic = true, - .caps[0] = {HFI_CAPABILITY_FRAME_WIDTH, 96, 1920, 1}, - .caps[1] = {HFI_CAPABILITY_FRAME_HEIGHT, 96, 1920, 1}, - .caps[2] = {HFI_CAPABILITY_MBS_PER_FRAME, 1, 8160, 1}, + .caps[0] = {HFI_CAPABILITY_FRAME_WIDTH, 128, 1920, 1}, + .caps[1] = {HFI_CAPABILITY_FRAME_HEIGHT, 128, 1920, 1}, + .caps[2] = {HFI_CAPABILITY_MBS_PER_FRAME, 64, 8160, 1}, .caps[3] = {HFI_CAPABILITY_BITRATE, 1, 40000000, 1}, - .caps[4] = {HFI_CAPABILITY_SCALE_X, 4096, 65536, 1}, - .caps[5] = {HFI_CAPABILITY_SCALE_Y, 4096, 65536, 1}, - .caps[6] = {HFI_CAPABILITY_MBS_PER_SECOND, 1, 244800, 1}, + .caps[4] = {HFI_CAPABILITY_SCALE_X, 65536, 65536, 1}, + .caps[5] = {HFI_CAPABILITY_SCALE_Y, 65536, 65536, 1}, + .caps[6] = {HFI_CAPABILITY_MBS_PER_SECOND, 64, 7833600, 1}, .caps[7] = {HFI_CAPABILITY_FRAMERATE, 1, 30, 1}, - .caps[8] = {HFI_CAPABILITY_MAX_VIDEOCORES, 1, 2, 1}, + .caps[8] = {HFI_CAPABILITY_MAX_VIDEOCORES, 0, 1, 1}, .caps[9] = {HFI_CAPABILITY_MAX_WORKMODES, 1, 1, 1}, .num_caps = 10, .pl[0] = {HFI_MPEG2_PROFILE_SIMPLE, HFI_MPEG2_LEVEL_H14}, @@ -135,21 +135,21 @@ static const struct hfi_plat_caps caps[] = { .codec = HFI_VIDEO_CODEC_H264, .domain = VIDC_SESSION_TYPE_ENC, .cap_bufs_mode_dynamic = true, - .caps[0] = {HFI_CAPABILITY_FRAME_WIDTH, 96, 4096, 16}, - .caps[1] = {HFI_CAPABILITY_FRAME_HEIGHT, 96, 4096, 16}, - .caps[2] = {HFI_CAPABILITY_MBS_PER_FRAME, 1, 36864, 1}, - .caps[3] = {HFI_CAPABILITY_BITRATE, 1, 120000000, 1}, + .caps[0] = {HFI_CAPABILITY_FRAME_WIDTH, 128, 8192, 1}, + .caps[1] = {HFI_CAPABILITY_FRAME_HEIGHT, 128, 8192, 1}, + .caps[2] = {HFI_CAPABILITY_MBS_PER_FRAME, 64, 138240, 1}, + .caps[3] = {HFI_CAPABILITY_BITRATE, 1, 220000000, 1}, .caps[4] = {HFI_CAPABILITY_SCALE_X, 8192, 65536, 1}, .caps[5] = {HFI_CAPABILITY_SCALE_Y, 8192, 65536, 1}, - .caps[6] = {HFI_CAPABILITY_MBS_PER_SECOND, 1, 1036800, 1}, - .caps[7] = {HFI_CAPABILITY_FRAMERATE, 1, 480, 1}, - .caps[8] = {HFI_CAPABILITY_MAX_VIDEOCORES, 1, 3, 1}, + .caps[6] = {HFI_CAPABILITY_MBS_PER_SECOND, 64, 7833600, 1}, + .caps[7] = {HFI_CAPABILITY_FRAMERATE, 1, 960, 1}, + .caps[8] = {HFI_CAPABILITY_MAX_VIDEOCORES, 0, 1, 1}, .caps[9] = {HFI_CAPABILITY_PEAKBITRATE, 32000, 160000000, 1}, - .caps[10] = {HFI_CAPABILITY_HIER_P_NUM_ENH_LAYERS, 0, 5, 1}, - .caps[11] = {HFI_CAPABILITY_ENC_LTR_COUNT, 0, 4, 1}, + .caps[10] = {HFI_CAPABILITY_HIER_P_NUM_ENH_LAYERS, 0, 6, 1}, + .caps[11] = {HFI_CAPABILITY_ENC_LTR_COUNT, 0, 2, 1}, .caps[12] = {HFI_CAPABILITY_LCU_SIZE, 16, 16, 1}, .caps[13] = {HFI_CAPABILITY_BFRAME, 0, 1, 1}, - .caps[14] = {HFI_CAPABILITY_HIER_P_HYBRID_NUM_ENH_LAYERS, 0, 5, 1}, + .caps[14] = {HFI_CAPABILITY_HIER_P_HYBRID_NUM_ENH_LAYERS, 0, 6, 1}, .caps[15] = {HFI_CAPABILITY_I_FRAME_QP, 0, 51, 1}, .caps[16] = {HFI_CAPABILITY_P_FRAME_QP, 0, 51, 1}, .caps[17] = {HFI_CAPABILITY_B_FRAME_QP, 0, 51, 1}, @@ -172,24 +172,24 @@ static const struct hfi_plat_caps caps[] = { .codec = HFI_VIDEO_CODEC_HEVC, .domain = VIDC_SESSION_TYPE_ENC, .cap_bufs_mode_dynamic = true, - .caps[0] = {HFI_CAPABILITY_FRAME_WIDTH, 96, 4096, 16}, - .caps[1] = {HFI_CAPABILITY_FRAME_HEIGHT, 96, 4096, 16}, - .caps[2] = {HFI_CAPABILITY_MBS_PER_FRAME, 1, 36864, 1}, - .caps[3] = {HFI_CAPABILITY_BITRATE, 1, 120000000, 1}, + .caps[0] = {HFI_CAPABILITY_FRAME_WIDTH, 128, 8192, 16}, + .caps[1] = {HFI_CAPABILITY_FRAME_HEIGHT, 128, 8192, 16}, + .caps[2] = {HFI_CAPABILITY_MBS_PER_FRAME, 64, 138240, 1}, + .caps[3] = {HFI_CAPABILITY_BITRATE, 1, 160000000, 1}, .caps[4] = {HFI_CAPABILITY_SCALE_X, 8192, 65536, 1}, .caps[5] = {HFI_CAPABILITY_SCALE_Y, 8192, 65536, 1}, - .caps[6] = {HFI_CAPABILITY_MBS_PER_SECOND, 1, 1036800, 1}, - .caps[7] = {HFI_CAPABILITY_FRAMERATE, 1, 480, 1}, - .caps[8] = {HFI_CAPABILITY_MAX_VIDEOCORES, 1, 3, 1}, + .caps[6] = {HFI_CAPABILITY_MBS_PER_SECOND, 64, 7833600, 1}, + .caps[7] = {HFI_CAPABILITY_FRAMERATE, 1, 960, 1}, + .caps[8] = {HFI_CAPABILITY_MAX_VIDEOCORES, 0, 1, 1}, .caps[9] = {HFI_CAPABILITY_PEAKBITRATE, 32000, 160000000, 1}, .caps[10] = {HFI_CAPABILITY_HIER_P_NUM_ENH_LAYERS, 0, 5, 1}, - .caps[11] = {HFI_CAPABILITY_ENC_LTR_COUNT, 0, 4, 1}, + .caps[11] = {HFI_CAPABILITY_ENC_LTR_COUNT, 0, 2, 1}, .caps[12] = {HFI_CAPABILITY_LCU_SIZE, 32, 32, 1}, .caps[13] = {HFI_CAPABILITY_BFRAME, 0, 1, 1}, .caps[14] = {HFI_CAPABILITY_HIER_P_HYBRID_NUM_ENH_LAYERS, 0, 5, 1}, - .caps[15] = {HFI_CAPABILITY_I_FRAME_QP, 0, 63, 1}, - .caps[16] = {HFI_CAPABILITY_P_FRAME_QP, 0, 63, 1}, - .caps[17] = {HFI_CAPABILITY_B_FRAME_QP, 0, 63, 1}, + .caps[15] = {HFI_CAPABILITY_I_FRAME_QP, 0, 51, 1}, + .caps[16] = {HFI_CAPABILITY_P_FRAME_QP, 0, 51, 1}, + .caps[17] = {HFI_CAPABILITY_B_FRAME_QP, 0, 51, 1}, .caps[18] = {HFI_CAPABILITY_MAX_WORKMODES, 1, 2, 1}, .caps[19] = {HFI_CAPABILITY_RATE_CONTROL_MODES, 0x1000001, 0x1000005, 1}, .caps[20] = {HFI_CAPABILITY_COLOR_SPACE_CONVERSION, 0, 2, 1}, @@ -209,20 +209,20 @@ static const struct hfi_plat_caps caps[] = { .codec = HFI_VIDEO_CODEC_VP8, .domain = VIDC_SESSION_TYPE_ENC, .cap_bufs_mode_dynamic = true, - .caps[0] = {HFI_CAPABILITY_FRAME_WIDTH, 96, 4096, 16}, - .caps[1] = {HFI_CAPABILITY_FRAME_HEIGHT, 96, 4096, 16}, - .caps[2] = {HFI_CAPABILITY_MBS_PER_FRAME, 1, 36864, 1}, - .caps[3] = {HFI_CAPABILITY_BITRATE, 1, 120000000, 1}, + .caps[0] = {HFI_CAPABILITY_FRAME_WIDTH, 128, 4096, 16}, + .caps[1] = {HFI_CAPABILITY_FRAME_HEIGHT, 128, 4096, 16}, + .caps[2] = {HFI_CAPABILITY_MBS_PER_FRAME, 64, 36864, 1}, + .caps[3] = {HFI_CAPABILITY_BITRATE, 1, 74000000, 1}, .caps[4] = {HFI_CAPABILITY_SCALE_X, 8192, 65536, 1}, .caps[5] = {HFI_CAPABILITY_SCALE_Y, 8192, 65536, 1}, - .caps[6] = {HFI_CAPABILITY_MBS_PER_SECOND, 1, 1036800, 1}, - .caps[7] = {HFI_CAPABILITY_FRAMERATE, 1, 240, 1}, - .caps[8] = {HFI_CAPABILITY_MAX_VIDEOCORES, 1, 3, 1}, + .caps[6] = {HFI_CAPABILITY_MBS_PER_SECOND, 64, 4423680, 1}, + .caps[7] = {HFI_CAPABILITY_FRAMERATE, 1, 120, 1}, + .caps[8] = {HFI_CAPABILITY_MAX_VIDEOCORES, 0, 1, 1}, .caps[9] = {HFI_CAPABILITY_PEAKBITRATE, 32000, 160000000, 1}, .caps[10] = {HFI_CAPABILITY_HIER_P_NUM_ENH_LAYERS, 0, 3, 1}, .caps[11] = {HFI_CAPABILITY_ENC_LTR_COUNT, 0, 2, 1}, .caps[12] = {HFI_CAPABILITY_LCU_SIZE, 16, 16, 1}, - .caps[13] = {HFI_CAPABILITY_BFRAME, 0, 1, 1}, + .caps[13] = {HFI_CAPABILITY_BFRAME, 0, 0, 1}, .caps[14] = {HFI_CAPABILITY_HIER_P_HYBRID_NUM_ENH_LAYERS, 0, 5, 1}, .caps[15] = {HFI_CAPABILITY_I_FRAME_QP, 0, 127, 1}, .caps[16] = {HFI_CAPABILITY_P_FRAME_QP, 0, 127, 1}, From patchwork Fri Apr 2 10:06:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 414327 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1283877jai; Fri, 2 Apr 2021 03:05:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy9Af4sweDiX/fl4xQpPfRGa8Y7+RxwncF96i6FdtntR6d1fNmXfvvA6fsKuEm6GG5iGBNZ X-Received: by 2002:a02:cd33:: with SMTP id h19mr11998478jaq.88.1617357959906; Fri, 02 Apr 2021 03:05:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617357959; cv=none; d=google.com; s=arc-20160816; b=cAFKukLx07eHK12OmsWnpGpbDxybUFy8xRQsloK0H/Lv3kYXqxdkUFZAkddG7HR2I2 qLDxggQgcoFPN4yz2ABxV/5dRArEQoMaakzrZHR6l+Dx0sLL1lgne1nyculvRHmUzHCj p6zHDcu+gi5gtSNpGAHv2Blf1VDY1VAZ7fGnJSj+0tTgWQ1WxCRM1l1dzYP9ATvrzGPg TvtfWl0oYHGacWnrD2Jpm9JCIAdtzc2hHKRcnon/3C1qnX7VkY7tC7TGXGwB+fALNTjt HyRl+lfPYPhSvDHWSrABn+lB8YgwmvL4iMnkfVogVagDtqKp+dHBXp1v1FDvnMDq6ub2 G6jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Gu1aUpypBdZ1g5qKxxRYnsFtYrUSNKGTe+yXVLDDZJw=; b=rxiBNWzZyBa1MkSfN99j6UJEzX/MqrggGhRnBlr3Ql/yP3seFPVH6hfPRdJwOkfJM0 M1ka33FjMSodqYPhsfIECtjS3Zoa7Mzdjx+FQBSU6VCGlvN2PGWrmFlwL2HlXBhOa21B VSgV6ejpT3SOd3N5uuf50oYFeKy2PDY7G8PxJnDPZiz8szdmzi7Y35yle+At9vDVxeir X3dfNqVpB7keRtiC2ot++9w57pflCkFIY9qewg3C+5so/eigi1N/xngMDL73k+uKGZvK CjazPm3xp17DvhKARKiwOU5IRkAqr78nQJ6QzHuJT+9HOCx4FvMx5jhsLLTYOzwkJOBv jTOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ksnOHVig; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g2si6942838ile.30.2021.04.02.03.05.49; Fri, 02 Apr 2021 03:05:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ksnOHVig; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234448AbhDBKF2 (ORCPT + 17 others); Fri, 2 Apr 2021 06:05:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45410 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229924AbhDBKFZ (ORCPT ); Fri, 2 Apr 2021 06:05:25 -0400 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15461C061793 for ; Fri, 2 Apr 2021 03:05:20 -0700 (PDT) Received: by mail-wm1-x332.google.com with SMTP id b2-20020a7bc2420000b029010be1081172so2149030wmj.1 for ; Fri, 02 Apr 2021 03:05:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Gu1aUpypBdZ1g5qKxxRYnsFtYrUSNKGTe+yXVLDDZJw=; b=ksnOHVigXlc06+QGymJwGypYZ0yHUSBjvgJ9S5ox1SFQaJuQX67kRqXCPyqRTy75cp KYE2Gq2pwsfTlbvQluFyIispAcWQ/O7+PljGRqxk6K6IWsl9gOtRV3Pt29TXpFmI1DJt DuXpDPsplc36VdxUb5nsn4wJ826xjsJNIzh9vq/XbjFkKFpT84ndzDsxTfdHSL2kmOEO rdDXOX80pWt5dgCIdzuz0YsjT39e6DIArQzXXnbHe7rqnOiGJwrGtgqAvNk9NHpsTTdw HOefLyGda9up2QVD9cpVzIgfWnMB/Zteng29+f23vahUwwSPDfgA7U5YnhkMNfYmsQ7i e7uQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Gu1aUpypBdZ1g5qKxxRYnsFtYrUSNKGTe+yXVLDDZJw=; b=l/2w+TsrmgFD5hcp3MBgg2GDqgdVcyydOIzdZ2AXsByHWNJtUo/mNPqA4+RKNk5dCA jnCq3siYvOTAX0oJHrz3wRMKzEWfv5/JsQ+S/shDxRseeCybiPkpvp8/OwvotYai6DKp pxR9M0f6qDAtoQ7iJUjMKpbPgr4uj3rwvbiSKkWmmqvGzyr8yfBBeZRJI9lbTWvvGCJH iZPW1AhNJLUq2ReM+N0N9pk50qKM9mcGeUiyG2K1CbY7d+vn8rX6hEXxO2jPIYRyywPY UNTQqsGu6MtlHwsKWZk5xB7Vso9Wms5ookUoWDj16LGV6auSqH1G37hLBzVPCooZTHcy bs8g== X-Gm-Message-State: AOAM530Y8hzqUP7CGW2R5ltHUBelELvtil8HHlA0+M/cuW2kVsmedZEo JLd9fQfHapxicLcnnE3QCBaVjw== X-Received: by 2002:a1c:6855:: with SMTP id d82mr12367791wmc.169.1617357918717; Fri, 02 Apr 2021 03:05:18 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id v18sm15466618wrf.41.2021.04.02.03.05.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Apr 2021 03:05:18 -0700 (PDT) From: Bryan O'Donoghue To: stanimir.varbanov@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, mchehab@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: bryan.odonoghue@linaro.org, dikshita@codeaurora.org, jonathan@marek.ca, vgarodia@codeaurora.org Subject: [PATCH v3 02/25] media: venus: core,pm: Add handling for resets Date: Fri, 2 Apr 2021 11:06:25 +0100 Message-Id: <20210402100648.1815854-3-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> References: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Stanimir Varbanov The Venus driver has to control two reset signals related to gcc video_axi0 and videocc mvs0c for v6. Add it. Signed-off-by: Stanimir Varbanov Signed-off-by: Bryan O'Donoghue Acked-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/core.h | 4 ++ .../media/platform/qcom/venus/pm_helpers.c | 60 +++++++++++++++++++ 2 files changed, 64 insertions(+) -- 2.30.1 diff --git a/drivers/media/platform/qcom/venus/core.h b/drivers/media/platform/qcom/venus/core.h index 13c18c49714d..0a90cd79104b 100644 --- a/drivers/media/platform/qcom/venus/core.h +++ b/drivers/media/platform/qcom/venus/core.h @@ -24,6 +24,7 @@ #define VIDC_CLKS_NUM_MAX 4 #define VIDC_VCODEC_CLKS_NUM_MAX 2 #define VIDC_PMDOMAINS_NUM_MAX 3 +#define VIDC_RESETS_NUM_MAX 2 extern int venus_fw_debug; @@ -64,6 +65,8 @@ struct venus_resources { unsigned int vcodec_pmdomains_num; const char **opp_pmdomain; unsigned int vcodec_num; + const char * const resets[VIDC_RESETS_NUM_MAX]; + unsigned int resets_num; enum hfi_version hfi_version; u32 max_load; unsigned int vmem_id; @@ -130,6 +133,7 @@ struct venus_core { struct device *pmdomains[VIDC_PMDOMAINS_NUM_MAX]; struct device_link *opp_dl_venus; struct device *opp_pmdomain; + struct reset_control *resets[VIDC_RESETS_NUM_MAX]; struct video_device *vdev_dec; struct video_device *vdev_enc; struct v4l2_device v4l2_dev; diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c index 95b4d40ff6a5..794c2d6f0543 100644 --- a/drivers/media/platform/qcom/venus/pm_helpers.c +++ b/drivers/media/platform/qcom/venus/pm_helpers.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -847,6 +848,52 @@ static void vcodec_domains_put(struct venus_core *core) dev_pm_opp_detach_genpd(core->opp_table); } +static int core_resets_reset(struct venus_core *core) +{ + const struct venus_resources *res = core->res; + unsigned char i; + int ret; + + if (!res->resets_num) + return 0; + + for (i = 0; i < res->resets_num; i++) { + ret = reset_control_assert(core->resets[i]); + if (ret) + goto err; + + usleep_range(150, 250); + ret = reset_control_deassert(core->resets[i]); + if (ret) + goto err; + } + +err: + return ret; +} + +static int core_resets_get(struct venus_core *core) +{ + struct device *dev = core->dev; + const struct venus_resources *res = core->res; + unsigned char i; + int ret; + + if (!res->resets_num) + return 0; + + for (i = 0; i < res->resets_num; i++) { + core->resets[i] = + devm_reset_control_get_exclusive(dev, res->resets[i]); + if (IS_ERR(core->resets[i])) { + ret = PTR_ERR(core->resets[i]); + return ret; + } + } + + return 0; +} + static int core_get_v4(struct venus_core *core) { struct device *dev = core->dev; @@ -870,6 +917,10 @@ static int core_get_v4(struct venus_core *core) if (ret) return ret; + ret = core_resets_get(core); + if (ret) + return ret; + if (legacy_binding) return 0; @@ -929,6 +980,13 @@ static int core_power_v4(struct venus_core *core, int on) } } + ret = core_resets_reset(core); + if (ret) { + if (pmctrl) + pm_runtime_put_sync(pmctrl); + return ret; + } + ret = core_clks_enable(core); if (ret < 0 && pmctrl) pm_runtime_put_sync(pmctrl); @@ -939,6 +997,8 @@ static int core_power_v4(struct venus_core *core, int on) core_clks_disable(core); + ret = core_resets_reset(core); + if (pmctrl) pm_runtime_put_sync(pmctrl); } From patchwork Fri Apr 2 10:06:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 414479 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DE5ABC43617 for ; Fri, 2 Apr 2021 10:05:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BE73161152 for ; Fri, 2 Apr 2021 10:05:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234361AbhDBKFa (ORCPT ); Fri, 2 Apr 2021 06:05:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231160AbhDBKF2 (ORCPT ); Fri, 2 Apr 2021 06:05:28 -0400 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A611C0617A7 for ; Fri, 2 Apr 2021 03:05:21 -0700 (PDT) Received: by mail-wr1-x42a.google.com with SMTP id c8so4290490wrq.11 for ; Fri, 02 Apr 2021 03:05:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=baSMqShP5W3Zw4aCNa6SmZHYgWuL3HOZVO7fD1Vf2tE=; b=IAJ0j9xoidGT7X+eYT9122hmZsO7UM3ShiMGETqd6mQe2MfrOP952P92lOr/Jdesk2 2HEy2gx+UFDCbu2QgYFWoYG6vdM4OQLlq96Ru03udlVVYGS6M4up3QnoObnW6LCtY46+ MYAhU2yLE052wIiPM6c5QP7mkd51BLzZF46mT/CzT/CwwUE8QKFaxXi8x4BubZwLUUAF fY9NN6FJOpm/rMW8Aud9NHJELT5VGBiXmoiBEFBjCI8Ajm3x5BVSOgZzAw6j7Xk/mcNz Daw8A/rSfrHf+hHD9lKVDebDuxiicPCbLaImJxK8M3P5edjl15aGaXCS2ocu/UcAkcjN KLEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=baSMqShP5W3Zw4aCNa6SmZHYgWuL3HOZVO7fD1Vf2tE=; b=aceWFRZ0o8D6h5ctQBI1tBJsE6OLAHdanxbrIz0lOBtx2ZdguUxKZmTUJ4+ChJ2mR/ FCS4TlptEdjgMPNqbd8upmEf7dXNWYNKQXCNXdDAdXQLga9jrooHOADDQQe1Dez9sqfL bbplRmvUYrJW+3kElYyu7ue9S2zB8Rjcu0zlw0zbcDEb2GvexPwgWtjHfKf/H8ZfMAHg lgMButt6cCVL7rtDgEA/+rZfsc1EzmNIgvv/nmPo6jacDudKf1ioFRy6O8u7NIF6oA1U R5NbADkH8ip2nTy1/bo1tIQMoLCAg800qmqCXVWcimNfcEUcE40DDsovvV9BzamwBqLK Xy0w== X-Gm-Message-State: AOAM530LBv9Z+p7527stbjxvUHNeJnh3DKuPHzrENj59c6Ys+S7BQhHp E8foE2cJHkdXGWeYrCH919w2ig== X-Google-Smtp-Source: ABdhPJyGNHN8yKXmSCFPQl0rc7nkd0AGHq6GyCf9+6zcr6X53LAhUKACmSCHMHUS+lDITNIf8/Xhhw== X-Received: by 2002:a5d:6cd2:: with SMTP id c18mr14497543wrc.330.1617357919949; Fri, 02 Apr 2021 03:05:19 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id v18sm15466618wrf.41.2021.04.02.03.05.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Apr 2021 03:05:19 -0700 (PDT) From: Bryan O'Donoghue To: stanimir.varbanov@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, mchehab@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: bryan.odonoghue@linaro.org, dikshita@codeaurora.org, jonathan@marek.ca, vgarodia@codeaurora.org Subject: [PATCH v3 03/25] media: venus: core: add sm8250 DT compatible and resource data Date: Fri, 2 Apr 2021 11:06:26 +0100 Message-Id: <20210402100648.1815854-4-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> References: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Adds an sm8250 compatible binding to the venus core. Co-developed-by: Jonathan Marek Signed-off-by: Jonathan Marek Co-developed-by: Dikshita Agarwal Signed-off-by: Dikshita Agarwal Signed-off-by: Bryan O'Donoghue Acked-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/core.c | 54 ++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c index 00d6883d3859..68358a9f3cda 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -627,12 +627,66 @@ static const struct venus_resources sc7180_res = { .fwname = "qcom/venus-5.4/venus.mdt", }; +static const struct freq_tbl sm8250_freq_table[] = { + { 0, 444000000 }, + { 0, 366000000 }, + { 0, 338000000 }, + { 0, 240000000 }, +}; + +static const struct bw_tbl sm8250_bw_table_enc[] = { + { 1944000, 1954000, 0, 3711000, 0 }, /* 3840x2160@60 */ + { 972000, 996000, 0, 1905000, 0 }, /* 3840x2160@30 */ + { 489600, 645000, 0, 977000, 0 }, /* 1920x1080@60 */ + { 244800, 332000, 0, 498000, 0 }, /* 1920x1080@30 */ +}; + +static const struct bw_tbl sm8250_bw_table_dec[] = { + { 2073600, 2403000, 0, 4113000, 0 }, /* 4096x2160@60 */ + { 1036800, 1224000, 0, 2079000, 0 }, /* 4096x2160@30 */ + { 489600, 812000, 0, 998000, 0 }, /* 1920x1080@60 */ + { 244800, 416000, 0, 509000, 0 }, /* 1920x1080@30 */ +}; + +static const struct reg_val sm8250_reg_preset[] = { + { 0xb0088, 0 }, +}; + +static const struct venus_resources sm8250_res = { + .freq_tbl = sm8250_freq_table, + .freq_tbl_size = ARRAY_SIZE(sm8250_freq_table), + .reg_tbl = sm8250_reg_preset, + .reg_tbl_size = ARRAY_SIZE(sm8250_reg_preset), + .bw_tbl_enc = sm8250_bw_table_enc, + .bw_tbl_enc_size = ARRAY_SIZE(sm8250_bw_table_enc), + .bw_tbl_dec = sm8250_bw_table_dec, + .bw_tbl_dec_size = ARRAY_SIZE(sm8250_bw_table_dec), + .clks = {"core", "iface"}, + .clks_num = 2, + .resets = { "bus", "core" }, + .resets_num = 2, + .vcodec0_clks = { "vcodec0_core" }, + .vcodec_clks_num = 1, + .vcodec_pmdomains = { "venus", "vcodec0" }, + .vcodec_pmdomains_num = 2, + .opp_pmdomain = (const char *[]) { "mx", NULL }, + .vcodec_num = 1, + .max_load = 7833600, + .hfi_version = HFI_VERSION_6XX, + .vmem_id = VIDC_RESOURCE_NONE, + .vmem_size = 0, + .vmem_addr = 0, + .dma_mask = 0xe0000000 - 1, + .fwname = "qcom/sm8250/venus.mdt", +}; + static const struct of_device_id venus_dt_match[] = { { .compatible = "qcom,msm8916-venus", .data = &msm8916_res, }, { .compatible = "qcom,msm8996-venus", .data = &msm8996_res, }, { .compatible = "qcom,sdm845-venus", .data = &sdm845_res, }, { .compatible = "qcom,sdm845-venus-v2", .data = &sdm845_res_v2, }, { .compatible = "qcom,sc7180-venus", .data = &sc7180_res, }, + { .compatible = "qcom,sm8250-venus", .data = &sm8250_res, }, { } }; MODULE_DEVICE_TABLE(of, venus_dt_match); From patchwork Fri Apr 2 10:06:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 414329 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1283890jai; Fri, 2 Apr 2021 03:06:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzOj6QmIJgSbUhLV6k28q5yrs0NgmJ7IvSgm6foHPTohbDgBle7TothYwHZfs8qVMhQay4w X-Received: by 2002:a05:6e02:e52:: with SMTP id l18mr10422386ilk.217.1617357960959; Fri, 02 Apr 2021 03:06:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617357960; cv=none; d=google.com; s=arc-20160816; b=usQVo6qDQUiwuolQGl4U05dGcOr6BYG/vAKXSN2jhdacP2FnpRSMUBTHNhF51sw91d Vk9HJPMV3MY7CAwCp0RxGWzblVSma6BDgovqa/Ggd90TJikizyLvzTUOWvXvuqdFhsUM VSI5yRVeUdAADuMNMjF42dCxwdLgXB8qDCNU7SnHuelEdEcojuZ4RYE23u3ASz5cs8IC v4Eea366Ff6wyVSeI7rvB2rnJGhFdoq99c7Yoc4hprMROrmUlX4cHNUkr9amfctXfE9E aIycg3nFjz9/47kYU6sJ1v9H4z5OwBuz/Y1mEY9X8eZk4eJUOItl0RHrDTPeAwwKSRSH GvhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=A0Hq1qWM/ZGzT0LfPQuVO+plwGRyfpUWLhKq3EzQLwo=; b=LvaYtuQLTF+BHplijwFLasvLui76QL/itKO+UfeHhxZDLe0m6mCi4M04Q22i3ycwb7 VkMlEpTFrvy0CZUnVG/dlSR7FD7qLkwTxe2tFf19tOaZFBxDpNBf70/A0e3Q/+0KrfTo q7Vtu9lL55LvlRawKd/Uo1JVGSkDF61UgRq4vtH3Np8hkjR/PEMn1MGcw+cTRecaVnq/ vMtk7q9wLjNBoE8qwMsM6YvpZMz/CLHtZElDNyhcc4OyAS6PAtrsvIUeq4KvdaGPjazV E4WRwhLzNV70xu6eOQWzgVVzoBSmC7/OHOP46iPgy6ChcbALmuVSsD2doam87lga/y+O n3mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gx0vj+Cb; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g2si6942838ile.30.2021.04.02.03.06.00; Fri, 02 Apr 2021 03:06:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gx0vj+Cb; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229605AbhDBKF3 (ORCPT + 17 others); Fri, 2 Apr 2021 06:05:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229722AbhDBKF2 (ORCPT ); Fri, 2 Apr 2021 06:05:28 -0400 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CFCCC0617A9 for ; Fri, 2 Apr 2021 03:05:22 -0700 (PDT) Received: by mail-wr1-x42f.google.com with SMTP id v4so4284163wrp.13 for ; Fri, 02 Apr 2021 03:05:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=A0Hq1qWM/ZGzT0LfPQuVO+plwGRyfpUWLhKq3EzQLwo=; b=gx0vj+Cb7GJceD7yM+mWTFbnO26QQ0DPpby/H2lEi7XnZ6r5fh68y95oYwYJdSFoTX nuUEKL9b4N1JUqoj0kffvhY+jR4Oa/eCMDHL097q6IbALlqA+pB0XG3jdGoWKsoaRyKL wVb/hPcAAaFAJc3iK9R7gnqQ3Jf4Yr9MfPvLuwDmFMRNU4E6mmZXGTyWHsm3NJwMqNq0 ZciiCOH5SOBkDThfFLlwGq+FjrNr64diilzvIhSWrEr4GmDK7GOCjhb4aZKCDUHu7Trw AP/QUHsDHJWeFp1/SD+LmRhfjDaxxM5auqnyeW8XPLCL0ssTfd8k08LnSvqaQTBSQSwe b1/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=A0Hq1qWM/ZGzT0LfPQuVO+plwGRyfpUWLhKq3EzQLwo=; b=WoAa0I0Jj8fAWrhL8/HPUULPuKj6syURQdVGTknhNEpTTmqvDM4iLfT6oimab7dmOG B0JF9ZKa+SA6qBhgjnS1VHSqbiNZaPp8n8GwIiPUhg9EYyOaVQtKy/Q7gQoCZd5J2kyA mB5lSkjC0jmo1O7jC95m0Nuk5BkQMs/yNmCvgfjKSWwdEZAx6ehHS68lbz6ZwIkbYFGi +PlodNeYdwgTHaaJE4z6pJsSe8GFO0hraqTWO9dym3u/xYRWd4FQhp0xkQzjd8bl7gXI QA+1KczgjUepvKO2sk5NF/w8ibJCTHig3DFqig5AehnCxkxSJUOIrxades0qCutdlt8i TuCg== X-Gm-Message-State: AOAM5339LMSnixzL90civOrePDJ+PBa74u4GIJKOcUC4Yf5b7Kk2vxCg UbK3358GMp8Pu5HfJjBTkIOHww== X-Received: by 2002:adf:f307:: with SMTP id i7mr14570306wro.142.1617357920991; Fri, 02 Apr 2021 03:05:20 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id v18sm15466618wrf.41.2021.04.02.03.05.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Apr 2021 03:05:20 -0700 (PDT) From: Bryan O'Donoghue To: stanimir.varbanov@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, mchehab@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: bryan.odonoghue@linaro.org, dikshita@codeaurora.org, jonathan@marek.ca, vgarodia@codeaurora.org Subject: [PATCH v3 04/25] media: venus: core: Add io base variables for each block Date: Fri, 2 Apr 2021 11:06:27 +0100 Message-Id: <20210402100648.1815854-5-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> References: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org New silicon means that the pre-determined offsets we have been using in this driver no longer hold. Existing blocks of registers can exist at different offsets relative to the IO base address. This commit adds a routine to assign the IO base hooks a subsequent commit will convert from absolute to relative addressing. Signed-off-by: Bryan O'Donoghue Acked-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/core.c | 12 ++++++++++++ drivers/media/platform/qcom/venus/core.h | 10 ++++++++++ 2 files changed, 22 insertions(+) -- 2.30.1 diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c index 68358a9f3cda..7124d9111001 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -23,6 +23,7 @@ #include "core.h" #include "firmware.h" #include "pm_helpers.h" +#include "hfi_venus_io.h" static void venus_coredump(struct venus_core *core) { @@ -207,6 +208,15 @@ static int venus_enumerate_codecs(struct venus_core *core, u32 type) return ret; } +static void venus_assign_register_offsets(struct venus_core *core) +{ + core->vbif_base = core->base + VBIF_BASE; + core->cpu_base = core->base + CPU_BASE; + core->cpu_cs_base = core->base + CPU_CS_BASE; + core->cpu_ic_base = core->base + CPU_IC_BASE; + core->wrapper_base = core->base + WRAPPER_BASE; +} + static int venus_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -273,6 +283,8 @@ static int venus_probe(struct platform_device *pdev) if (ret) goto err_core_put; + venus_assign_register_offsets(core); + ret = v4l2_device_register(dev, &core->v4l2_dev); if (ret) goto err_core_deinit; diff --git a/drivers/media/platform/qcom/venus/core.h b/drivers/media/platform/qcom/venus/core.h index 0a90cd79104b..110287279f05 100644 --- a/drivers/media/platform/qcom/venus/core.h +++ b/drivers/media/platform/qcom/venus/core.h @@ -90,6 +90,11 @@ struct venus_format { * struct venus_core - holds core parameters valid for all instances * * @base: IO memory base address + * @vbif_base IO memory vbif base address + * @cpu_base IO memory cpu base address + * @cpu_cs_base IO memory cpu_cs base address + * @cpu_ic_base IO memory cpu_ic base address + * @wrapper_base IO memory wrapper base address * @irq: Venus irq * @clks: an array of struct clk pointers * @vcodec0_clks: an array of vcodec0 struct clk pointers @@ -122,6 +127,11 @@ struct venus_format { */ struct venus_core { void __iomem *base; + void __iomem *vbif_base; + void __iomem *cpu_base; + void __iomem *cpu_cs_base; + void __iomem *cpu_ic_base; + void __iomem *wrapper_base; int irq; struct clk *clks[VIDC_CLKS_NUM_MAX]; struct clk *vcodec0_clks[VIDC_VCODEC_CLKS_NUM_MAX]; From patchwork Fri Apr 2 10:06:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 414333 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1284203jai; Fri, 2 Apr 2021 03:06:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzjuwUaadW3h8Cmehx2y388qtU83sB0aqpa0wfdr6NjNANG87YH6JJdJARgDQ2M6y885wnN X-Received: by 2002:a05:6e02:2182:: with SMTP id j2mr11067862ila.89.1617357987108; Fri, 02 Apr 2021 03:06:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617357987; cv=none; d=google.com; s=arc-20160816; b=pHPv7C1LDvE4rhMM6wRU/We4hJscQ/CuCkxSGhU30Dit1DG3Wwv8inpCzS2KjGNGTk XVmirSm7EpsdbcHigB4uGOqfZl5UyGkzYgRgeybjrWxwh0rfupQD/CDHOJbetWBsoYd2 uO4vQ8aoUqWeYI+AP0Tb0KpT81YMMPsylWaEZ3Vux+DB/fpqBtWSp0v29EZZl+KkYgHu 1PP/AYM+R1UaplZTJ4k2FfF5AuFX4iEqhoNrek48+HZm3vQG23aG5HXKUvWl/ertp3j4 YDjszYK22dphtfOpcHwzk9MSKxD4iyfQWNndvxnvbrlC6RmFJVgj9kMjWn55Uc9VYs5A IS7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=//Lf2E+FwfUxhoM1H7CSX+v4f8W4Os22eBseL5ilxQ4=; b=j3cfqbbHjoMWFNoPq7O2No0cgOYa+sPBL0wmHZUS22QXUPj41opWFqXsAfFpk3zGfn zQZ4UyFjyQCvXkeRKEHzTdWE70PYdy5jUwMi/RfIckuNm9BF0Dw0mHdxo8YQCIWUCWJc L2tOawt0DEaNfkKZLac+lpV/MU9w+QYWCgzV2l3RABbT3Go8FH83rBxRFXQesgiUaEWD mBMbf5rtuMXi4h8Q4cdt9drKob4DL+RJcTki1mQx9LzCa1j3/G1T+n0G0XAfztJBJC46 s2EJ386HJQx9aMlonkrW0LTV5GX0npJaGo17CZGN3ENEJJCJTd8wMnHOCEIBCc3ah7nZ N8bA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gVmyQltd; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g2si6942838ile.30.2021.04.02.03.06.16; Fri, 02 Apr 2021 03:06:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gVmyQltd; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234666AbhDBKFb (ORCPT + 17 others); Fri, 2 Apr 2021 06:05:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234516AbhDBKF3 (ORCPT ); Fri, 2 Apr 2021 06:05:29 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73F8BC0613A6 for ; Fri, 2 Apr 2021 03:05:24 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id x7so4296081wrw.10 for ; Fri, 02 Apr 2021 03:05:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=//Lf2E+FwfUxhoM1H7CSX+v4f8W4Os22eBseL5ilxQ4=; b=gVmyQltdWtiiQ8QKRK/VXxt5OfwoWohw6MvVGeWREIjl7ozccaZRPta0vsiNJGBrYc AjUSA5jQubOL5sAwAefpkx1CLI0mH5nJ7K/WWWJpb4bZyx0JoYA6GX4rGyGzF3CXwO7Q xiRdaT0QCSMfmo/ZB+b0eH5sSUC2U+sF37K1WS1vELTYV88lwZzxIchRNs7cpyywi7yQ Bo7tAMh7opVBynOSNB9jY45CkdEV1q9cRGym7T5+LH9h0wG7ZyqdT6wJD7NruQuzLATl IoQTiqRSyamppXDs8J/2dELRVIJ3uFmH0VkmiZwEO5m6s0AGhnPn1YSZS+BJMbEPBYH6 AJwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=//Lf2E+FwfUxhoM1H7CSX+v4f8W4Os22eBseL5ilxQ4=; b=jKU02t+k3uGr1b0mOo6elY0ZA1MBMxnAqPXMVTm9lDtuNqmWARYkQS83igaVoyDoh4 B9gUV6HZIgzA4uzYZkpkTKOc9I4u1GSQp9oJT0CJoKHuYWi6p4QW3zdimCFUPq2GqA8L xv343L9RzUqQAWYVyc9kcAUINMHsvZ6zAW3bGjaXmF+8kG+rq3FMO1Y42tfoOeIG8Iri v0Liyi2vI4J18ic5KPHMM8gWVP1UNJXaap9nFXxQ6tOJuAee83Dlb3XJO4Y7dgmwppYm hrXJ8OiFvF0W2bsjrpXg30kyPXRvV0gogfXpD8Y9zmir5zwm7jiVLhuNOHW2tkOE9Ofw jlkw== X-Gm-Message-State: AOAM533Gf1oJhgujMJdNAhXcF47kkqRYL1C8lt/Vwj0q0+UAn56eQqAD mfMvwAftoIvUZ8OLW0s524fs4Q== X-Received: by 2002:a5d:58ce:: with SMTP id o14mr14742728wrf.4.1617357923134; Fri, 02 Apr 2021 03:05:23 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id v18sm15466618wrf.41.2021.04.02.03.05.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Apr 2021 03:05:22 -0700 (PDT) From: Bryan O'Donoghue To: stanimir.varbanov@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, mchehab@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: bryan.odonoghue@linaro.org, dikshita@codeaurora.org, jonathan@marek.ca, vgarodia@codeaurora.org Subject: [PATCH v3 06/25] media: venus: hfi: Define block offsets for V6 hardware Date: Fri, 2 Apr 2021 11:06:29 +0100 Message-Id: <20210402100648.1815854-7-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> References: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Dikshita Agarwal This commit defines a range of new base addresses for already defined blocks. - CPU_BASE_V6 - CPU_CS_BASE_V6 - CPU_IC_BASE_V6 - WRAPPER_BASE_V6 The base addresses of the blocks are slightly different for 6xx but, aside from that are layout and bit compatible. New 6xx specific block addresses will be added in separate commits. Signed-off-by: Dikshita Agarwal Co-developed-by: Bryan O'Donoghue Signed-off-by: Bryan O'Donoghue Acked-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/hfi_venus_io.h | 4 ++++ 1 file changed, 4 insertions(+) -- 2.30.1 diff --git a/drivers/media/platform/qcom/venus/hfi_venus_io.h b/drivers/media/platform/qcom/venus/hfi_venus_io.h index 4c392b67252c..8604b213f03f 100644 --- a/drivers/media/platform/qcom/venus/hfi_venus_io.h +++ b/drivers/media/platform/qcom/venus/hfi_venus_io.h @@ -19,6 +19,9 @@ #define CPU_CS_BASE (CPU_BASE + 0x12000) #define CPU_IC_BASE (CPU_BASE + 0x1f000) +#define CPU_BASE_V6 0xa0000 +#define CPU_CS_BASE_V6 CPU_BASE_V6 +#define CPU_IC_BASE_V6 (CPU_BASE_V6 + 0x138) #define CPU_CS_A2HSOFTINTCLR 0x1c @@ -59,6 +62,7 @@ #define CPU_IC_SOFTINT_H2A_SHIFT 0xf /* Venus wrapper */ +#define WRAPPER_BASE_V6 0x000b0000 #define WRAPPER_BASE 0x000e0000 #define WRAPPER_HW_VERSION 0x00 From patchwork Fri Apr 2 10:06:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 414330 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1283935jai; Fri, 2 Apr 2021 03:06:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0ILKKiUzkynDHg82XKIbkTsi3P0G1QI5nz6baINYMexTglOAtJNiYwZVJrA1eJmk2+CWT X-Received: by 2002:a05:6638:d4e:: with SMTP id d14mr12266986jak.103.1617357964452; Fri, 02 Apr 2021 03:06:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617357964; cv=none; d=google.com; s=arc-20160816; b=mXe+sv+MbEb4Ro29+fcs1XvlxJSmW1oJxsFJ0rNB5o66sFFXxlRg3izzxPqm0FcnGd B3rsPT30Rpc+sgWVfZLV6QpHSHZ4K8Oz/jHo6Vd80pD4jbTAv2LSSTFB7C4kdmVC04HH mhmodT/Lx8udwo2fFFT63V1jGp/KOn/CYaFDe+nASURDUrArUlCPk6W9P+HSx0uOtmX7 +XwbbZBIu+QnXCUjI38wmCPRKVG+39fMGJySItcqrkbKzZJFXk+fowt5vS/WIjPcXQK+ udwDGVG0q5SMdByX2rO38+u3QHSS8Kog9yoVLfaWRVrevsjtlE2VP1JX9zwev5iZ9bg/ GXOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PUYbzJMVwAU0QfJQ7XJdH18CiuxDYm9UB052eyj741s=; b=P4KZmkuRrY+5MVFQxgy2PsJVRot0lOZC7nBjqlpmVCW0XfdPKaaAwjuWIzsrloxsEG 2mgIpLJcgyGFZoo3gmWlskKCft8bDSaoE4WtGtlCUqrtSNgXoQU5ceM2hnvcSPD13qbz WopqralNP8dJIY3MtkxZsI24kaAcLjd6fBkkpT3wV6Ij7MfOx4Huej4bY0/IKBy12umM uVaBD+02TfNeGucQJfMfl4fxti52Qcq5dxxilpprX3elVxHLSwA2JFfSlSb9JTI+6w0C 6uqy2DZOhscMvZfB9hfTxhPJHcO19l3YhI/tuRjrl34ickaEeM4pr/hfHj3N8iwNWGmP +cxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=N4Z1DE3L; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g2si6942838ile.30.2021.04.02.03.06.04; Fri, 02 Apr 2021 03:06:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=N4Z1DE3L; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234161AbhDBKFa (ORCPT + 17 others); Fri, 2 Apr 2021 06:05:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234361AbhDBKF2 (ORCPT ); Fri, 2 Apr 2021 06:05:28 -0400 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 70A2EC0613A8 for ; Fri, 2 Apr 2021 03:05:25 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id i18so844780wrm.5 for ; Fri, 02 Apr 2021 03:05:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PUYbzJMVwAU0QfJQ7XJdH18CiuxDYm9UB052eyj741s=; b=N4Z1DE3LLlNk8ORpjaoacXq2gP9MH8vQO1SGrE5OpQhqI4rg1zdCYK80nV09pC7R3F Ot5nRz7YwUjBPOnZbItQlKTwNeaUh3Yzccf1CYVl3CInT+S8oHyXfSEx6wrrQkdoY2d7 VRqb1WMGmA5rJ0pikI4jQTd+1/VC+w/5YoRjdBCasRFS/nbTR/36p952wdz+bWgoIvY2 UO85XTrlsDX6AdZyOigjhy0dBkan2AsRJ1XWdgy8a2Q9rPT0OLP0nwWvZUp4oNEEWCQy 8rgfbfGBdpfWSz+wN+I9SqWcx1pUWIekqdDjRZdVW11nXpEMv4/WekmfrE2HfwcWeYRl 19sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PUYbzJMVwAU0QfJQ7XJdH18CiuxDYm9UB052eyj741s=; b=rYSdSmmTbCjjDtL8HxJLQWp89vjLhr1Eogt++OOQEqFxvJbD2ox1FbDTSQU+EYEDH0 6EJpx5QKgwWI4whCRtAtMynWzmLbyrq11HL82eNLO+l7TzmcPn+6cuhMZSdLjDBCPlZm Iy8ZG5iN4kIxRHtYTs05dvID696dMvSFgEoUnBYobIeehFyVDpRCjuTknlYtHy4B6FGj NN0c8iqb7AoP6aupifYLn7M8V+C3H6iyJLqLVZEf/8IPw6AthSnF5W9biifsSslm0SuJ QH1a8NOjsjKJo8c+owyXeRnFRvAylwRsXLvFSlyrrcOcvvdTMNLXPKI44twoc1aRw1h5 17HA== X-Gm-Message-State: AOAM530+G2HMEowok5tFBHTL4sTwL9XZf3qPdFTVPBuzJhBuyqGpOZ9O sSFPIvugY15JAEo39jPF2M6bfw== X-Received: by 2002:a5d:4d09:: with SMTP id z9mr14105797wrt.426.1617357924194; Fri, 02 Apr 2021 03:05:24 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id v18sm15466618wrf.41.2021.04.02.03.05.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Apr 2021 03:05:23 -0700 (PDT) From: Bryan O'Donoghue To: stanimir.varbanov@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, mchehab@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: bryan.odonoghue@linaro.org, dikshita@codeaurora.org, jonathan@marek.ca, vgarodia@codeaurora.org Subject: [PATCH v3 07/25] media: venus: hfi: Define additional 6xx registers Date: Fri, 2 Apr 2021 11:06:30 +0100 Message-Id: <20210402100648.1815854-8-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> References: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Dikshita Agarwal - Add X2 RPMh registers and definitions from the downstream example. - Add 6xx core power definitions - Add 6xx AON definitions - Add 6xx wrapper tz definitions - Add 6xx wrapper interrupt definitions - Add 6xx soft interrupt definitions - Define wrapper LPI register offsets Signed-off-by: Dikshita Agarwal Co-developed-by: Bryan O'Donoghue Signed-off-by: Bryan O'Donoghue Acked-by: Stanimir Varbanov --- .../media/platform/qcom/venus/hfi_venus_io.h | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) -- 2.30.1 diff --git a/drivers/media/platform/qcom/venus/hfi_venus_io.h b/drivers/media/platform/qcom/venus/hfi_venus_io.h index 8604b213f03f..300c6e47e72f 100644 --- a/drivers/media/platform/qcom/venus/hfi_venus_io.h +++ b/drivers/media/platform/qcom/venus/hfi_venus_io.h @@ -56,10 +56,22 @@ #define UC_REGION_ADDR 0x64 #define UC_REGION_SIZE 0x68 +#define CPU_CS_H2XSOFTINTEN_V6 0x148 + +#define CPU_CS_X2RPMH_V6 0x168 +#define CPU_CS_X2RPMH_MASK0_BMSK_V6 0x1 +#define CPU_CS_X2RPMH_MASK0_SHFT_V6 0x0 +#define CPU_CS_X2RPMH_MASK1_BMSK_V6 0x2 +#define CPU_CS_X2RPMH_MASK1_SHFT_V6 0x1 +#define CPU_CS_X2RPMH_SWOVERRIDE_BMSK_V6 0x4 +#define CPU_CS_X2RPMH_SWOVERRIDE_SHFT_V6 0x3 + /* Relative to CPU_IC_BASE */ #define CPU_IC_SOFTINT 0x18 +#define CPU_IC_SOFTINT_V6 0x150 #define CPU_IC_SOFTINT_H2A_MASK 0x8000 #define CPU_IC_SOFTINT_H2A_SHIFT 0xf +#define CPU_IC_SOFTINT_H2A_SHIFT_V6 0x0 /* Venus wrapper */ #define WRAPPER_BASE_V6 0x000b0000 @@ -88,6 +100,9 @@ #define WRAPPER_INTR_MASK_A2HCPU_MASK 0x4 #define WRAPPER_INTR_MASK_A2HCPU_SHIFT 0x2 +#define WRAPPER_INTR_STATUS_A2HWD_MASK_V6 0x8 +#define WRAPPER_INTR_MASK_A2HWD_BASK_V6 0x8 + #define WRAPPER_INTR_CLEAR 0x14 #define WRAPPER_INTR_CLEAR_A2HWD_MASK 0x10 #define WRAPPER_INTR_CLEAR_A2HWD_SHIFT 0x4 @@ -97,6 +112,8 @@ #define WRAPPER_POWER_STATUS 0x44 #define WRAPPER_VDEC_VCODEC_POWER_CONTROL 0x48 #define WRAPPER_VENC_VCODEC_POWER_CONTROL 0x4c +#define WRAPPER_DEBUG_BRIDGE_LPI_CONTROL_V6 0x54 +#define WRAPPER_DEBUG_BRIDGE_LPI_STATUS_V6 0x58 #define WRAPPER_VDEC_VENC_AHB_BRIDGE_SYNC_RESET 0x64 #define WRAPPER_CPU_CLOCK_CONFIG 0x2000 @@ -125,4 +142,17 @@ #define WRAPPER_VCODEC1_MMCC_POWER_STATUS 0x110 #define WRAPPER_VCODEC1_MMCC_POWER_CONTROL 0x114 +/* Venus 6xx */ +#define WRAPPER_CORE_POWER_STATUS_V6 0x80 +#define WRAPPER_CORE_POWER_CONTROL_V6 0x84 + +/* Wrapper TZ 6xx */ +#define WRAPPER_TZ_BASE_V6 0x000c0000 +#define WRAPPER_TZ_CPU_STATUS_V6 0x10 + +/* Venus AON */ +#define AON_BASE_V6 0x000e0000 +#define AON_WRAPPER_MVP_NOC_LPI_CONTROL 0x00 +#define AON_WRAPPER_MVP_NOC_LPI_STATUS 0x04 + #endif From patchwork Fri Apr 2 10:06:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 414334 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1284361jai; Fri, 2 Apr 2021 03:06:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxflQ1MhAzA97AZRsBmXg6kGy8b6zzMndRj8LBUTwezKWyJs2Iicr8qBOHtBaBTLfIft67L X-Received: by 2002:a05:6e02:1a2d:: with SMTP id g13mr10290179ile.222.1617357999828; Fri, 02 Apr 2021 03:06:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617357999; cv=none; d=google.com; s=arc-20160816; b=fbhrhJWY1IESy/UG6ZOgnWQRdwRDO7nMCYLbjv08a8dQpya4GOYLtddgd02o3IlnJa EbCRPNf9CWAAt4KopyCy96oQ7y+bmxF6zzA1HFtayqPHJxASZjefI4+8KOzkAzvmPRVw f6KPerpaxyyfyc55du31GL5xaBBtFghI9IMISwYeQh8ZEkFWyy8zx33Dv6gDfZrqgMTu p5or1X9E7Zaj1vZ3+kr/RhsTY93uHpqUsndbtHMLOaQPlBYkYbQa0gLZk9Z61jjbtcx/ ItdRWAmMi4UXOwTj4IdnAiYkSNv70uZ22/2Xc2dEbfGQPSvLAeBS+IBgEtFIrl8kp12C r81A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8FFDLZB/vHm0pWu0rgOmQ3F7+I8O6+iIXPof9tEB6Pw=; b=JOyxzV0nsoemR0Og0HXaiY9n6RmgM04aRcdmmOJ/xI8GXvGBoGzi8mvQhL+hFxYg5B 7FeAWhGHvjgbGeOPlfbAq6FgqeCPRj2wME5ubwk+sUaS5hgSIz/ZF66DzmQ5lEXhcJar ZycxCUPZfyCRV6zNSxcJqKQMbOVq3cN06FjQR+tLRjxGHoBO1MH7wOjEx69GoMUd/tGT 8iHFuRoon11s7Xhxo3HpmbO4vdcSBlu3yQFVQe18YH7sQNlcr4Dsyvk77URmEkRia9in GCBTy8HjihE1OQKjQmTx1JYMlJzBz5WRInojHOWwMb9XlsGHqdacK903COGulR+m+W+Y Npyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F83GTV9O; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g2si6942838ile.30.2021.04.02.03.06.27; Fri, 02 Apr 2021 03:06:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=F83GTV9O; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234389AbhDBKFb (ORCPT + 17 others); Fri, 2 Apr 2021 06:05:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234563AbhDBKFa (ORCPT ); Fri, 2 Apr 2021 06:05:30 -0400 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60613C0613AB for ; Fri, 2 Apr 2021 03:05:26 -0700 (PDT) Received: by mail-wr1-x436.google.com with SMTP id e18so4303781wrt.6 for ; Fri, 02 Apr 2021 03:05:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8FFDLZB/vHm0pWu0rgOmQ3F7+I8O6+iIXPof9tEB6Pw=; b=F83GTV9ORyhd5EWryfWuRGx3v7/9FByVfUDvcXjbSTYuCsqLL0ZAiHw+9Ermx9hGDh wPLUTfN1LQtC7XPQ7JrM75svfALU7yudwhGtcg/FKA+Me39aJ3MXDosjBOMuMN6JXhud 9A7nNpV1+7ouoaTYJr8FhPW38S1a+1XS3e2xsgX7JaOiSo2S+rh6JOTbzbntTCoTWEEK /kPyiH56HBFTzUIrPENUvTZEdyjT1XFZ4ZDNAdlrt2QS+SqX6XoWnNa7RAl6hRcIaFQo 8Aym4rFXzlcohdQfqW5hSRzRgJhOZjs4NIs2zyVCCj+TMPiQD6iYBS2C3WPlq/+KMpVN Bk0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8FFDLZB/vHm0pWu0rgOmQ3F7+I8O6+iIXPof9tEB6Pw=; b=IPM2PAsHPOwwQgxAWgu9fzoDQR46fbz+myvunVjPUbpVTwHvJLn/Dlu/5V4ERB8doj jcC+obzXvRZEMvfAdUuvO6YWeA9QfbeXZfe+dFAaR29bb0UY73Ul+ssj7Et44kBLBnTF ZHCTCPvSnwD2SVbwk2Z1B67/YXf++F6j5o2t8iUnVv9LhAab9BMSHxBAykUsm8i+T/5K i4tiUsu+jrm5f4zklx6fIjf2pLLhXOfr7itm88FLfxxORQfa5pP4RInAhSOSJ/X/PiFf tp4/W0cOntIUUOjhz6tCri1Rvr+lPqu50rEH1yPxzuQwgqqeqrNROoUTQK16xSZnNovk 1IeQ== X-Gm-Message-State: AOAM532ylqGfq7FtEzwt+hlgf60Fjm0siADynSp1WtxagGtzS2q1qCVH S0XL4aLM/55eUPEQWcwYEJzccQ== X-Received: by 2002:a5d:5256:: with SMTP id k22mr14726134wrc.162.1617357925162; Fri, 02 Apr 2021 03:05:25 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id v18sm15466618wrf.41.2021.04.02.03.05.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Apr 2021 03:05:24 -0700 (PDT) From: Bryan O'Donoghue To: stanimir.varbanov@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, mchehab@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: bryan.odonoghue@linaro.org, dikshita@codeaurora.org, jonathan@marek.ca, vgarodia@codeaurora.org Subject: [PATCH v3 08/25] media: venus: core: Add differentiator IS_V6(core) Date: Fri, 2 Apr 2021 11:06:31 +0100 Message-Id: <20210402100648.1815854-9-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> References: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This commit adds the macro helper IS_V6() which will be used to differentiate iris2/v6 silicon from previous versions. Signed-off-by: Bryan O'Donoghue Acked-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/core.h | 1 + 1 file changed, 1 insertion(+) -- 2.30.1 diff --git a/drivers/media/platform/qcom/venus/core.h b/drivers/media/platform/qcom/venus/core.h index 110287279f05..85047806142f 100644 --- a/drivers/media/platform/qcom/venus/core.h +++ b/drivers/media/platform/qcom/venus/core.h @@ -420,6 +420,7 @@ struct venus_inst { #define IS_V1(core) ((core)->res->hfi_version == HFI_VERSION_1XX) #define IS_V3(core) ((core)->res->hfi_version == HFI_VERSION_3XX) #define IS_V4(core) ((core)->res->hfi_version == HFI_VERSION_4XX) +#define IS_V6(core) ((core)->res->hfi_version == HFI_VERSION_6XX) #define ctrl_to_inst(ctrl) \ container_of((ctrl)->handler, struct venus_inst, ctrl_handler) From patchwork Fri Apr 2 10:06:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 414337 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1284947jai; Fri, 2 Apr 2021 03:07:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrr5Fuc8I7Tv+3xMARbb1RMbcxDFbf8SBhrwR38Kbecu4U+hHwEnopkwxxDdN1PYVUuV3S X-Received: by 2002:a92:7b12:: with SMTP id w18mr10355016ilc.101.1617358054245; Fri, 02 Apr 2021 03:07:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617358054; cv=none; d=google.com; s=arc-20160816; b=rz24mzcmbOYOffMTho3u/EefEX6zBalMvpWf0SHZwrNP9Iavvi5Kl4aeOTU7bGiNja 4yWeqUSYedFWJbgRokw3qWCsG26e3mi5E9pGsRRAKOF1GqevQHOsRytCdUMJ7N/X8Qet Ok4HdbELZDXtjw0GlW/vD7UCvLFCjY10D22ZLiu0iWnrv8D3zWIwLnw3Tc7z+MKG/wt9 QAW/F+m3xGBGF/LNW1+VXn2ygJI95SnnZMB1MnuE6sC1GU67nWmYFiPsQi3Z7QHaHo/p 4oNqgs0bc3E1siLRFExOFrWnTRs6a2Es8neyqacrbl7Eu0hE1gzmHRLetyV5zUQw2vfT vFAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=7R+42MHtLVjz5D1+bPy8QR3kBlUIryDw6BfwYHtrXnI=; b=plZdtrXD+wEemIPFCbjYoC/4rMXJhq5i1zmKXGWft8mdBtIaCLjCkJyNsUggYWPTc9 bj2xUQxzSuJ91MUMpgfMjGOqNsvhu07xI1krH16woy//GZ64HkbGWPoIRUryS9bgCXPu 8z/JClU1EmRC82yWDq9Kj9CC1iydsgq8UMernz9xtWH5qlRsBGAv4QRPHqITFF0bbpqA EsaThMSCtcEadFa0HQ079A+htxP5hqJhWiiqvzv/8ULxYxllDeqKaonVqIeh/SmxTUjG hfjM03tqKbyHf2zaeQb4T0I7Xr8875qQKwQbTy6xOu5bVTp5zamvTnUgdWvr36AuEjdx pneQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=E+D8wYKg; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g2si6942838ile.30.2021.04.02.03.07.13; Fri, 02 Apr 2021 03:07:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=E+D8wYKg; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234984AbhDBKFk (ORCPT + 17 others); Fri, 2 Apr 2021 06:05:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234779AbhDBKFc (ORCPT ); Fri, 2 Apr 2021 06:05:32 -0400 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 702D3C061788 for ; Fri, 2 Apr 2021 03:05:27 -0700 (PDT) Received: by mail-wr1-x434.google.com with SMTP id i18so844867wrm.5 for ; Fri, 02 Apr 2021 03:05:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7R+42MHtLVjz5D1+bPy8QR3kBlUIryDw6BfwYHtrXnI=; b=E+D8wYKgfKbboUDP058OCuC/Ni3y9Gauzr7vGXM/qJQOskSVL/y/cqQ6hyf6uOK/In QTRWcqcs971RQL2fNsiBe6/g7B2C61nMG9xOh+p3a3NhXqEdluS0oZkrq1TBIeQ8JY0p bjgR/YSRt8beXs6OmF2ot13QzCU1/7w1guq2sTsjbUVm/Xj+vvObp8b8tu/6WEcC/ukf UD0sXWP52aAG+9WJes54M3l2DlM8KyKfpaJuPH/K+Is27hAsB6T0rTVa463wH7vAwIu0 pV12cY3H2AxqP5WnVa1s+3RNQzBz/dAwzZKkG6lDNyLcaxUg3BpIWCi0gNstX3WfyBKF FFBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7R+42MHtLVjz5D1+bPy8QR3kBlUIryDw6BfwYHtrXnI=; b=X98WO115jOW5NpJ9u/K9tZAOC2oAale27sXIwvPq8RIslvSIc7HnpOrKVpkjciHbVV DpvTR1HDAsfk1SGdRpWntna3r0QKwG9JDV+l2SVwJXU8L32rw8EhVHjKGxPpydR8q5R/ OYJkXpI9xGPLzXdIAy2pFQLKMzLclv8JR+ly9q8rxkQlcMQrHFEQBJCQgMx0MwgOeUtU ZVjhQbNMuJpqWjCR9/0pPSe2xoAPHmhPR1tkBiNps/H64OYKnESEgpCvD2m24qPtEaMU lMUI5PdVPNbzO85OgGjaQ7sFOMJJXy6cisyac7BqOFOQmyx3njqgOJKZr13KJDQGZDKC Hzng== X-Gm-Message-State: AOAM530kdjvvK5WsuJsdCAsYGI9BRM6t3DYRUBv4bf/LqheNyHY+lSJP iFKEATuQqlE9e3RGKbJHk5eQTg== X-Received: by 2002:a5d:604b:: with SMTP id j11mr14256113wrt.424.1617357926185; Fri, 02 Apr 2021 03:05:26 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id v18sm15466618wrf.41.2021.04.02.03.05.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Apr 2021 03:05:25 -0700 (PDT) From: Bryan O'Donoghue To: stanimir.varbanov@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, mchehab@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: bryan.odonoghue@linaro.org, dikshita@codeaurora.org, jonathan@marek.ca, vgarodia@codeaurora.org Subject: [PATCH v3 09/25] media: venus: core: Add an io base for TZ wrapper regs Date: Fri, 2 Apr 2021 11:06:32 +0100 Message-Id: <20210402100648.1815854-10-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> References: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 6xx silicon needs to access registers from a wrapper trust-zone base address range. This commit defines the necessary variable for later use. Signed-off-by: Bryan O'Donoghue Acked-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/core.c | 1 + drivers/media/platform/qcom/venus/core.h | 2 ++ 2 files changed, 3 insertions(+) -- 2.30.1 diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c index 7124d9111001..cf2aa83c4378 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -215,6 +215,7 @@ static void venus_assign_register_offsets(struct venus_core *core) core->cpu_cs_base = core->base + CPU_CS_BASE; core->cpu_ic_base = core->base + CPU_IC_BASE; core->wrapper_base = core->base + WRAPPER_BASE; + core->wrapper_tz_base = 0; } static int venus_probe(struct platform_device *pdev) diff --git a/drivers/media/platform/qcom/venus/core.h b/drivers/media/platform/qcom/venus/core.h index 85047806142f..0c519211fac3 100644 --- a/drivers/media/platform/qcom/venus/core.h +++ b/drivers/media/platform/qcom/venus/core.h @@ -95,6 +95,7 @@ struct venus_format { * @cpu_cs_base IO memory cpu_cs base address * @cpu_ic_base IO memory cpu_ic base address * @wrapper_base IO memory wrapper base address + * @wrapper_base IO memory wrapper TZ base address * @irq: Venus irq * @clks: an array of struct clk pointers * @vcodec0_clks: an array of vcodec0 struct clk pointers @@ -132,6 +133,7 @@ struct venus_core { void __iomem *cpu_cs_base; void __iomem *cpu_ic_base; void __iomem *wrapper_base; + void __iomem *wrapper_tz_base; int irq; struct clk *clks[VIDC_CLKS_NUM_MAX]; struct clk *vcodec0_clks[VIDC_VCODEC_CLKS_NUM_MAX]; From patchwork Fri Apr 2 10:06:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 414332 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1284079jai; Fri, 2 Apr 2021 03:06:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy1+O6lwJGwOzSFnddkiYgPb7xYzCBvfyE3P91a5rqLHNpKie6aZv6bkH9zXyd2AXo6IuH4 X-Received: by 2002:a92:c549:: with SMTP id a9mr10667573ilj.300.1617357976045; Fri, 02 Apr 2021 03:06:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617357976; cv=none; d=google.com; s=arc-20160816; b=KUb4RpwQT54ETpIIvi6rcMf8/MQq6YU0zcV6L8PCPCgqnQjc+5KrAmWp1rS5oWmD+Q ykFOt3Zg/ykmaL+UUQQ4Ydv0Y7mGZLcDxoHSWe91rMFY4VVKk/qTynDfV3898+TM9bzz 74lwHZVo1kh2jGw2fIT0eGlSnniGaqNi+LolwDMfU2mUtUDeok20hyJGmG0ZhPv+o/sR pc9MP2tTwbyBePq+Tf2s1JUUIQYePe1mn6L3pCAEkdgPqyOaucmGbTXrjs7O2zUcRUgM 0g7sdsifDEz37WKbSngJTqAn8j35sr/zmP3aBye2wHAdYdY4W0YT27odinZoPCqRR3NJ x8vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=oG76MLwzBBbHo4Scp8xxleKgLq3nfk0QlNvLqyY7BH0=; b=vHrguzdUp72ebRaNxPJUnLnZrSA3V6NvYe1PmLbPDwdLnyTj5BzfIkqWknJ4NHKsQy nqgjwY8vbQvY9czmLWYLsMB46UtgR2HolwEvPAi47QyaHdj9fgl/SWD5AwHcVmWcm5xU nmj3VHIhswURdykEBQJ7a7YIBlNdeQwNNYqKDo8UOJ2VfQVMFfEPG9quSlCcFbq+VCt3 +vIpw96QdQJp7GYKQSJkxaGAVNQ+bdafaTzcVJwA0GKt9FCkUXt0Xd8DOXwYZDFGl/oM PnsKIm8UaOBT2INC2TSDQTtRZDUMbmcw7+NmLvxEkbrXW8NZBf/n9nDKQqCKQnP0NeOM r+vA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tfjaY4b3; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g2si6942838ile.30.2021.04.02.03.06.05; Fri, 02 Apr 2021 03:06:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tfjaY4b3; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234397AbhDBKFb (ORCPT + 17 others); Fri, 2 Apr 2021 06:05:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234488AbhDBKF3 (ORCPT ); Fri, 2 Apr 2021 06:05:29 -0400 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76307C0613E6 for ; Fri, 2 Apr 2021 03:05:28 -0700 (PDT) Received: by mail-wr1-x42f.google.com with SMTP id v4so4284384wrp.13 for ; Fri, 02 Apr 2021 03:05:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=oG76MLwzBBbHo4Scp8xxleKgLq3nfk0QlNvLqyY7BH0=; b=tfjaY4b3vF9ueUmlZLWouvTlf4/QwWVI5q0REiyLpgmnAtYjT8WLXsxi5kg+42QN+s N0a5sWws7Ert8gaHbnWnyo4M5Kf+2rskmspGnfmzx6Nv2iu2ZFXtnwBWBPCc4AYYSJnA N190bXRrUYPohliNKc4aXOOFoT1qt7bnKYxGMOtDRWZm0lh1HfFiOwQGYRD4nlpp4oMc QeJERzE3vDWTvaHGLqYEoigy8nPhs7eVA0KznJagYSwATGscjBriJJslrKGwuJeDsK+O vl1jC2k0aswa9JxxQCwhdx4m7lD+Xwiz3jYO4WZvKhqIr4xwb0in/7iLnKwBn0qqsxXV Of+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=oG76MLwzBBbHo4Scp8xxleKgLq3nfk0QlNvLqyY7BH0=; b=I8k2KCWPkOKFeQrAaDyvx4xstSekXeUh5i3hBjPoduX95yfUqjeIGY26weB6dRsx8o Nl9LoZqOX+InH2GEeDW5E1JszO4QHZvMm/Da9UVQCuZNoSflcCfwXv2fQeIEpClvBxek F8mGMJFtdj/WSmDGO2R1o2lpVvogp5897PVcxCfRWoaynt4A5e0mWA2pGtzCpLwjgV3w EGJBapmoW1SBYa8othHbUTPf+KzS9EevmAaNWscG8G0IrgBSSMlXBkOT8x4ZPg+5ERWa NO1TjTQIaduJs/3e6K2lKniWDUdPeMpCDH4UUODF7islgrT2R9CUuVGa2DksaajIdeaP dQ1A== X-Gm-Message-State: AOAM530htOnGfYUqBWeflUruwgkOvsFY4C2pAKfgRHIph8i1JD1913wV l20XzZDWE4o2F6RP+1FaiICw3Q== X-Received: by 2002:a5d:6c6d:: with SMTP id r13mr14364639wrz.362.1617357927197; Fri, 02 Apr 2021 03:05:27 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id v18sm15466618wrf.41.2021.04.02.03.05.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Apr 2021 03:05:26 -0700 (PDT) From: Bryan O'Donoghue To: stanimir.varbanov@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, mchehab@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: bryan.odonoghue@linaro.org, dikshita@codeaurora.org, jonathan@marek.ca, vgarodia@codeaurora.org Subject: [PATCH v3 10/25] media: venus: core: Add an io base for AON regs Date: Fri, 2 Apr 2021 11:06:33 +0100 Message-Id: <20210402100648.1815854-11-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> References: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 6xx silicon needs to access registers from a AON base address range. This commit defines the necessary variable for later use. Signed-off-by: Bryan O'Donoghue Acked-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/core.c | 1 + drivers/media/platform/qcom/venus/core.h | 2 ++ 2 files changed, 3 insertions(+) -- 2.30.1 diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c index cf2aa83c4378..b6f9ef6b6dcd 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -216,6 +216,7 @@ static void venus_assign_register_offsets(struct venus_core *core) core->cpu_ic_base = core->base + CPU_IC_BASE; core->wrapper_base = core->base + WRAPPER_BASE; core->wrapper_tz_base = 0; + core->aon_base = 0; } static int venus_probe(struct platform_device *pdev) diff --git a/drivers/media/platform/qcom/venus/core.h b/drivers/media/platform/qcom/venus/core.h index 0c519211fac3..6de596b5a9d1 100644 --- a/drivers/media/platform/qcom/venus/core.h +++ b/drivers/media/platform/qcom/venus/core.h @@ -96,6 +96,7 @@ struct venus_format { * @cpu_ic_base IO memory cpu_ic base address * @wrapper_base IO memory wrapper base address * @wrapper_base IO memory wrapper TZ base address + * @aon_base AON base address * @irq: Venus irq * @clks: an array of struct clk pointers * @vcodec0_clks: an array of vcodec0 struct clk pointers @@ -134,6 +135,7 @@ struct venus_core { void __iomem *cpu_ic_base; void __iomem *wrapper_base; void __iomem *wrapper_tz_base; + void __iomem *aon_base; int irq; struct clk *clks[VIDC_CLKS_NUM_MAX]; struct clk *vcodec0_clks[VIDC_VCODEC_CLKS_NUM_MAX]; From patchwork Fri Apr 2 10:06:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 414335 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1284571jai; Fri, 2 Apr 2021 03:06:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0zHHETqKABx18V7URItUSJmC7V0mFyy0zsN+JvWwujcMqzCgcb9eu3EqqEUSEx4pukmW+ X-Received: by 2002:a05:6638:f11:: with SMTP id h17mr12312550jas.67.1617358014549; Fri, 02 Apr 2021 03:06:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617358014; cv=none; d=google.com; s=arc-20160816; b=QSuKDLLjkGAY0oDqyAsXVKkF9WvjE1SZm/agWFLWIrxCe8/FDuunVvoiCKC2IHxHdA d9lWvW0dcyTXPTTthVDUqetuic7z3AhRBYJG1pjYbAe1O0gjGqEdjoAEzv2EZU9PrO43 oFNB5c6iORO5oNgAc2UNECJ+DAbig4fbgsNsTcBIAhS6JWOeAhLtEiSwDqjQ/VdvPZGx Zy07nkG6saXoTB85/8QikWwweqiVvewfAksJ84DG8lFh+Ft6ij6u5GsX8XhvbSmaxD+J kBNHhz6VVEes7zJB14jLz3ZM82OryQZs56zAPr56jBQQfnKPoLFfL9v+s8ScKmvXVmxm D9Qw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=GbTus800fSTOksYEwkbJrdqyW6ivt71bJB27ZzzIRJ8=; b=0eiMxpaUYJkxXkMVLSGR9qMKM9N9RrMMWnj3x8i+RaBQNOAjl8zTp5ETiqL5M5cJ/D Kjhlx9OMk7mQ5o42GZhdy58DEPz+3RAjexTk6MoZb1iXKRIwPxdF7tMlgWDXzFpYaKZ4 ijEdI3MRvdiHyUnnmMfMZY8ekwmeSDjVwy1BOqbSzASelw5ozrH4oD9x5sIef4OXnXLc uf3XBXAJWmYzTCt1ENN+EyHSeXMeWg/MyDL24RqeDhBcEtAMpmBTuErYROzVoohp/2I0 k0UMxNHE5dQBsrAjIetqD21K3ZHOdbsJlFBoUVwRKMI4nWZpjU7QJBN2afNeYrVB+m0a KO9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="q/wyJhbO"; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g2si6942838ile.30.2021.04.02.03.06.39; Fri, 02 Apr 2021 03:06:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="q/wyJhbO"; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234763AbhDBKFc (ORCPT + 17 others); Fri, 2 Apr 2021 06:05:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234724AbhDBKFb (ORCPT ); Fri, 2 Apr 2021 06:05:31 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81523C0613E6 for ; Fri, 2 Apr 2021 03:05:29 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id b9so4302663wrt.8 for ; Fri, 02 Apr 2021 03:05:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GbTus800fSTOksYEwkbJrdqyW6ivt71bJB27ZzzIRJ8=; b=q/wyJhbOb0+UCSHO7LeubkmR7b1kraZBsvn/DYJpG5GTwzZaTmxAfPm2OCe3UAx5R7 GjHqv8E7xqRDkr2AkhHkxQe4BB3HmMZ7VE1slCmT+7R8GjN3hwbbLhy5Vz+/u/rlM6D5 WoV+wjnatQbBl7x4d+wmxp21fe08qwkz2oKRC0b4JYmgmxyY8yZ2koF8ovrUQPnzSulL /NqSMpGgN5zoLdE9wTRFyKeygl6kYACmI/IW7D0F0ld+FKm+Jw/NDTWXRi+QlckzBiee 1CTPJ+89qwilar2pm8yk/iUnvZ4B1LSlprcPdqkMqAAhA59F1NKBUALDJMJ9FNo06fmI yYUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GbTus800fSTOksYEwkbJrdqyW6ivt71bJB27ZzzIRJ8=; b=LYPSXmukBVVmbrdCkCac5iVs1261ha18rcSFl+RAsMFt4zNvKvf4HnEX4CQWj2Yr9L MElPCCdDy56S7UUB3nLZ6AXa7A8FuKEeVCuM7w32Jmd9W7/hN0/AJgLeI53DxZ+s11En SO8DPfyH7gzwE7+TuJ8U2/bka2aC0bYgJ46pcMBkGLfk7n4lxHCNExJnjZxSmC1EiGBc Cju43g8rTlOVLWUmfcA052GgvJ0WZqF5n6c/IRVktKgJ+krJ2WEi1APUVkLwd1AjbR5V ss21/zBtbWINmAl0K1y5/T1sr9kX5ldqk/+f1MJxHvuwuA9hOw2EdP6Qf7qI17By8ta1 a97g== X-Gm-Message-State: AOAM532qFO8kF0/LOElULMKLlUOyx0yDcts4SBRrcUg9dG1ZVtF/6eDr u4C0aVXs6Sr43oSCw8cC1TOidw== X-Received: by 2002:a05:6000:1acd:: with SMTP id i13mr14377486wry.48.1617357928303; Fri, 02 Apr 2021 03:05:28 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id v18sm15466618wrf.41.2021.04.02.03.05.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Apr 2021 03:05:27 -0700 (PDT) From: Bryan O'Donoghue To: stanimir.varbanov@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, mchehab@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: bryan.odonoghue@linaro.org, dikshita@codeaurora.org, jonathan@marek.ca, vgarodia@codeaurora.org Subject: [PATCH v3 11/25] media: venus: core: Hook to V6 base registers when appropriate Date: Fri, 2 Apr 2021 11:06:34 +0100 Message-Id: <20210402100648.1815854-12-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> References: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This commit points the IO base registers 6xx offsets when probing for 6xx hardware. Signed-off-by: Bryan O'Donoghue Acked-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/core.c | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) -- 2.30.1 diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c index b6f9ef6b6dcd..bef582470fa2 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -210,13 +210,23 @@ static int venus_enumerate_codecs(struct venus_core *core, u32 type) static void venus_assign_register_offsets(struct venus_core *core) { - core->vbif_base = core->base + VBIF_BASE; - core->cpu_base = core->base + CPU_BASE; - core->cpu_cs_base = core->base + CPU_CS_BASE; - core->cpu_ic_base = core->base + CPU_IC_BASE; - core->wrapper_base = core->base + WRAPPER_BASE; - core->wrapper_tz_base = 0; - core->aon_base = 0; + if (IS_V6(core)) { + core->vbif_base = core->base + VBIF_BASE; + core->cpu_base = core->base + CPU_BASE_V6; + core->cpu_cs_base = core->base + CPU_CS_BASE_V6; + core->cpu_ic_base = core->base + CPU_IC_BASE_V6; + core->wrapper_base = core->base + WRAPPER_BASE_V6; + core->wrapper_tz_base = core->base + WRAPPER_TZ_BASE_V6; + core->aon_base = core->base + AON_BASE_V6; + } else { + core->vbif_base = core->base + VBIF_BASE; + core->cpu_base = core->base + CPU_BASE; + core->cpu_cs_base = core->base + CPU_CS_BASE; + core->cpu_ic_base = core->base + CPU_IC_BASE; + core->wrapper_base = core->base + WRAPPER_BASE; + core->wrapper_tz_base = 0; + core->aon_base = 0; + } } static int venus_probe(struct platform_device *pdev) From patchwork Fri Apr 2 10:06:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 414336 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1284774jai; Fri, 2 Apr 2021 03:07:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzdR+UY88pnbZixIr9ByXIw9CLSj4Z3bs9Ib9vAHSGLWcS19oSuTu+vqqgCSVo28yZwrO94 X-Received: by 2002:a05:6e02:85:: with SMTP id l5mr11146386ilm.182.1617358033146; Fri, 02 Apr 2021 03:07:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617358033; cv=none; d=google.com; s=arc-20160816; b=Fc7Px3PraxRdfZpBKKfTH6uASm264PZvTDH+vvC+uYGANVn8xhBezHB5PmV8636/Nm 7fxZBA45Ub23EGWmURBpoTjNMhevIGjhed95F/PAk6KPYGqyDqAegehlF5Ita5Gu32JL VZLlc4m/CEzhVFJPdKJPrlT/NVNY0q4SS+6dKcL/WlXEn4m/GyT6m2TC7TreQBjhQ9io p4xZIfQAD6UDWoEC+8Y31zC7H4aQUVs+y0l4tRRVaJrBK0My+4tkwTzotsXh0pOlgIgs /3L/OhOwb+chCNQEpkuH2uiFwSZHxHaPEbJEt1PQk+l47Y4jxErNvIfLQXNh7LKH6GhI ZESg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Y/5HfECUb7Yb2RUuUn+bfs1jqYGDNUP7G7Wpew9vFFA=; b=s/Is83cVKyIBRaRTYeTBAlx48zWxyWbNVHnLPVv4tJx32i5GD4jMUp6O6xS1vamsqN CBChtbVLPlUeOIjonpFIvUHvs81MCrY9fOIYgJ3PPK7UKcY8eTtdZYw0uAAmmJKaPYjL K9ellVdVUGJAjQOoxYqOTbS9Q1xpKlWycRRwvlxDERz8duv90vC4r1aCuORXCsgNfim2 HNmnU4v/oQgTdTPQbdS6ug6wwCdCieep0CDygMyw+vRox2FsaJljVoJ0DrG4Jt0bptPr 8RKR3Ui+RaaMGri6eatRup+p8UefyPUR5va+jf8+pQgIhWOgS5Gv0hn0ch1wwK7sk4+e lZgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gdQmDDPy; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g2si6942838ile.30.2021.04.02.03.06.55; Fri, 02 Apr 2021 03:07:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gdQmDDPy; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234506AbhDBKFj (ORCPT + 17 others); Fri, 2 Apr 2021 06:05:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234788AbhDBKFc (ORCPT ); Fri, 2 Apr 2021 06:05:32 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77EF0C06178C for ; Fri, 2 Apr 2021 03:05:30 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id x13so4292486wrs.9 for ; Fri, 02 Apr 2021 03:05:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Y/5HfECUb7Yb2RUuUn+bfs1jqYGDNUP7G7Wpew9vFFA=; b=gdQmDDPyhFcnp3uUBDYzVn83ViKI8Z4Ye2HgHK56Ur6xT20FSkkhtlL35e5I6+PIWc OHxrXLdkNNquMuREXDqwY+3Gmz4VCSB6TyhTK2Vpd49quPeqc9lyrrGXHjRAWCPACJE1 LahTuOr9hThntFaP1xrv3pFDPgyYwCngCgshnACdLk1gEHNlRx+62z/kCeeTGSK64vYq DiCCNyeq5KKe3Lok3AZPK+X1UaiDDWGY8BGSaL3BkV/PsNRO/KMDWaAruQKywAk9N1QZ v8kN4wBmqLBQEy5V4d9YVVa3BXcyLk+rFW2FkM6jLiSPH3N2GOVwhSJu5v8Dh9te/OE1 8d7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Y/5HfECUb7Yb2RUuUn+bfs1jqYGDNUP7G7Wpew9vFFA=; b=EP7CxCB2iLMv8SXYK616Bi1dMh8OjvhG4GRpamZsXmfo+BA1H2NMclYo56myHmz/+K SBOe75VQRxl+lX9MG4DvUMn95ZWJlM7wK9uQPrQiMRUqVfui8Yl2RAXlY7ekf3wCKlqU BdgLyfFN3P4zd9URam484Uh9ZFfHgqskckUiDBXV5anHpCP6k/hxgwHQO1JC2s2tRqm0 i6eHkFl9ABgyXQHMsqxTjHkPAj2H0+Q47qMJhj2vHCLpag+AS7NFAPx3mCEe2DLr5236 wztMkDYYIFJD3tGIaurgJzGpmXlbIcTpmYeATK8s6ERglv4FMiSrvyjmN0ewFx4SwKAP R1RQ== X-Gm-Message-State: AOAM532rSWaHaQ89HxYizvbZqAA7w5PkX7PG5bbVZKV5Wm6mNQ6ZR6SJ hTiBibtWDl2RYLgoTfcpr/LXug== X-Received: by 2002:adf:ebcc:: with SMTP id v12mr14121499wrn.389.1617357929260; Fri, 02 Apr 2021 03:05:29 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id v18sm15466618wrf.41.2021.04.02.03.05.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Apr 2021 03:05:28 -0700 (PDT) From: Bryan O'Donoghue To: stanimir.varbanov@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, mchehab@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: bryan.odonoghue@linaro.org, dikshita@codeaurora.org, jonathan@marek.ca, vgarodia@codeaurora.org Subject: [PATCH v3 12/25] media: venus: hfi: Add a 6xx boot logic Date: Fri, 2 Apr 2021 11:06:35 +0100 Message-Id: <20210402100648.1815854-13-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> References: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Dikshita Agarwal This patch adds a 6xx specific boot logic. The goal is to share as much code as possible between 3xx, 4xx and 6xx silicon. We need to do a different write to WRAPPER_INTR_MASK with an additional write to CPU_CS_H2XSOFTINTEN_V6 and CPU_CS_X2RPMh_V6. The other writes are the same for 6xx and non-6xx silicon albeit at different absolute relative locations to the base of the venus address space. Signed-off-by: Dikshita Agarwal Signed-off-by: Bryan O'Donoghue Acked-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/hfi_venus.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) -- 2.30.1 diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c index f95cdd3d530c..5f9c8aa84cd0 100644 --- a/drivers/media/platform/qcom/venus/hfi_venus.c +++ b/drivers/media/platform/qcom/venus/hfi_venus.c @@ -442,14 +442,21 @@ static int venus_boot_core(struct venus_hfi_device *hdev) { struct device *dev = hdev->core->dev; static const unsigned int max_tries = 100; - u32 ctrl_status = 0; + u32 ctrl_status = 0, mask_val; unsigned int count = 0; void __iomem *cpu_cs_base = hdev->core->cpu_cs_base; void __iomem *wrapper_base = hdev->core->wrapper_base; int ret = 0; writel(BIT(VIDC_CTRL_INIT_CTRL_SHIFT), cpu_cs_base + VIDC_CTRL_INIT); - writel(WRAPPER_INTR_MASK_A2HVCODEC_MASK, wrapper_base + WRAPPER_INTR_MASK); + if (IS_V6(hdev->core)) { + mask_val = readl(wrapper_base + WRAPPER_INTR_MASK); + mask_val &= ~(WRAPPER_INTR_MASK_A2HWD_BASK_V6 | + WRAPPER_INTR_MASK_A2HCPU_MASK); + } else { + mask_val = WRAPPER_INTR_MASK_A2HVCODEC_MASK; + } + writel(mask_val, wrapper_base + WRAPPER_INTR_MASK); writel(1, cpu_cs_base + CPU_CS_SCIACMDARG3); while (!ctrl_status && count < max_tries) { @@ -467,6 +474,9 @@ static int venus_boot_core(struct venus_hfi_device *hdev) if (count >= max_tries) ret = -ETIMEDOUT; + if (IS_V6(hdev->core)) + writel(0x0, cpu_cs_base + CPU_CS_X2RPMH_V6); + return ret; } From patchwork Fri Apr 2 10:06:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 414339 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1285160jai; Fri, 2 Apr 2021 03:07:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0Mfrj4FRFc3PuLVXMYIGG3q5rbcRtaeiLIrIHePC0uPbRVLBc3bFSMKQ2HiXg3M4dAR3P X-Received: by 2002:a6b:d318:: with SMTP id s24mr10522223iob.89.1617358076410; Fri, 02 Apr 2021 03:07:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617358076; cv=none; d=google.com; s=arc-20160816; b=Y0RLf7f1WzGe9aMpWKkZJrL4XWWVgEmaJMBDT5oo90BysBed2eNChjOBviPODmyncT ICcZl100WTTs6cKf0ysC0ExQ2XY9i7J/omo+QWSp3YmYQJiA31jECmgwrfGL/YZQNo9z 6h6vu438a5AFirBpbVTlk4ZNVGDe5Yjps+sq+9g1EwACHvPxuT6vcdpoKtar7gDdnjXK N7bfSgO5mow91bRvqI1sH3hLd4TDHj6Bq4FGjjjvOqWIjT3L7ezzr4N4KtnIbetuF1p0 a+YFeLUj/zqt8zFd7IuiqXfVnwBUnLj7gGrHQlqx7AqhUlEaMHiOGwiGvkQWwOlb6ATd 4q7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mV/5q5dy00tyl9BNhd6qNt4hSQy0I6ZdBP8DoR1J2gQ=; b=uX0wFxIZzMQfbMUdNrFL30pwJFjhuDD3htRwWsHpmh6r2ySBCk1Jfpr/ykuZ31o1Fs KdzZP6CzWtw2jckftfG86h7BPAfHabstyrv00iIMpDmE/ojrc1tPzXPpnRBP68YbHX2m DNNrz0Ytk/gKrpwOabbzrmwrcyhDrcCBzW8J49Cjen28aeFnDa2lBXA0q3crb8FWF4/y qWg7MfFw6rLTVtzaOiMCjTbv1F+p6VvSB/Ye2mlzFBGyqUi2DKYspEI72C6q2AIpIG7Y PRt0jjdQWma2V0Pbd9mQsDikIyedpZp56MtlSA6xzTDrl7XwVgzZnpqPiCan+S6do/LF 3dwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Mx3k/+wQ"; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g2si6942838ile.30.2021.04.02.03.07.44; Fri, 02 Apr 2021 03:07:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Mx3k/+wQ"; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235019AbhDBKFl (ORCPT + 17 others); Fri, 2 Apr 2021 06:05:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234856AbhDBKFd (ORCPT ); Fri, 2 Apr 2021 06:05:33 -0400 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80682C06178A for ; Fri, 2 Apr 2021 03:05:31 -0700 (PDT) Received: by mail-wr1-x434.google.com with SMTP id o16so4331452wrn.0 for ; Fri, 02 Apr 2021 03:05:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mV/5q5dy00tyl9BNhd6qNt4hSQy0I6ZdBP8DoR1J2gQ=; b=Mx3k/+wQitv/m6EFuNNzHrIwdSm4WRQ+zjO9mg9hQoM6VqEsYApZbC9TXA9Ie9U806 KYsEHRZblqZaQ5nKG/qjAdrN7AC3/YLp9GrpaRT8NSZj82j3IFqXpb/Thrvmpk15ekkw B78dBwFnu/0bQFT0v2uCqKu80iChldEp0407V97Dlcg1sKDPJBEdy3osIIFpup5P3gig VYcJDKCnQF+qV1jK3FFdBbxzEmYuxrmWvNuMaqU39pCT7GS8RhLULtIfysmpNPw7Qawt gCUv2XCgjh2uYTrjpq3cNJg9qvnJVj2b4PbOONo4BI7KUzlPbTHm38g1CAYAfqzNBpqq Uw+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mV/5q5dy00tyl9BNhd6qNt4hSQy0I6ZdBP8DoR1J2gQ=; b=kIZyLsWZy7ku3Tkzg2DC2rCHcw4nlNE+jgn7JLBaRHTG+v/s8VufVmcceGnIeBwAN8 WiAU6iUBXsQsyD+EijgoHj31+IFYwuxeyiBOXlBDI3mTo18GDeKVZfuib+riCeIGmurI x/4ihN2EiANZYESD7A5ae5oavtqoFfcxr6y0AE8C7F7oQypQpRsOz2BZY+ngjcWJFbvA uiSoTBlFUzvB2NlUT2ft3qJT+mFSm85+MtQUVO+GonKvYnhB6MrUQDYGZiySDfFlKqZ9 oEYQ48mlML1j14v2YaB4HBM5qxmvDXgJMEJHZpNHGSMcrT3UufzxUxjfs2o5VVnnZutO Dfqw== X-Gm-Message-State: AOAM5332KrheTHBarq+RU1rV2eWTrrn1hCzExiIZp6RIgLHlq6y5uqnx gasKGIs64nrMQ+7pkn+V227V7w== X-Received: by 2002:adf:fa4e:: with SMTP id y14mr14704141wrr.170.1617357930257; Fri, 02 Apr 2021 03:05:30 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id v18sm15466618wrf.41.2021.04.02.03.05.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Apr 2021 03:05:29 -0700 (PDT) From: Bryan O'Donoghue To: stanimir.varbanov@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, mchehab@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: bryan.odonoghue@linaro.org, dikshita@codeaurora.org, jonathan@marek.ca, vgarodia@codeaurora.org Subject: [PATCH v3 13/25] media: venus: hfi: Add 6xx interrupt support Date: Fri, 2 Apr 2021 11:06:36 +0100 Message-Id: <20210402100648.1815854-14-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> References: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Dikshita Agarwal This commit adds 6xx specific interrupt support, some register offsets and bitmasks differ from 4xx, which we account for in this commit. [bod: Added commit log. Moved register definition into commit] Signed-off-by: Dikshita Agarwal Co-developed-by: Bryan O'Donoghue Signed-off-by: Bryan O'Donoghue Acked-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/hfi_venus.c | 32 +++++++++++++------ 1 file changed, 23 insertions(+), 9 deletions(-) -- 2.30.1 diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c index 5f9c8aa84cd0..09fc81da0645 100644 --- a/drivers/media/platform/qcom/venus/hfi_venus.c +++ b/drivers/media/platform/qcom/venus/hfi_venus.c @@ -359,8 +359,14 @@ static void venus_set_registers(struct venus_hfi_device *hdev) static void venus_soft_int(struct venus_hfi_device *hdev) { void __iomem *cpu_ic_base = hdev->core->cpu_ic_base; + u32 clear_bit; - writel(BIT(CPU_IC_SOFTINT_H2A_SHIFT), cpu_ic_base + CPU_IC_SOFTINT); + if (IS_V6(hdev->core)) + clear_bit = BIT(CPU_IC_SOFTINT_H2A_SHIFT_V6); + else + clear_bit = BIT(CPU_IC_SOFTINT_H2A_SHIFT); + + writel(clear_bit, cpu_ic_base + CPU_IC_SOFTINT); } static int venus_iface_cmdq_write_nolock(struct venus_hfi_device *hdev, @@ -474,8 +480,10 @@ static int venus_boot_core(struct venus_hfi_device *hdev) if (count >= max_tries) ret = -ETIMEDOUT; - if (IS_V6(hdev->core)) + if (IS_V6(hdev->core)) { + writel(0x1, cpu_cs_base + CPU_CS_H2XSOFTINTEN_V6); writel(0x0, cpu_cs_base + CPU_CS_X2RPMH_V6); + } return ret; } @@ -1061,14 +1069,20 @@ static irqreturn_t venus_isr(struct venus_core *core) return IRQ_NONE; status = readl(wrapper_base + WRAPPER_INTR_STATUS); - - if (status & WRAPPER_INTR_STATUS_A2H_MASK || - status & WRAPPER_INTR_STATUS_A2HWD_MASK || - status & CPU_CS_SCIACMDARG0_INIT_IDLE_MSG_MASK) - hdev->irq_status = status; - + if (IS_V6(core)) { + if (status & WRAPPER_INTR_STATUS_A2H_MASK || + status & WRAPPER_INTR_STATUS_A2HWD_MASK_V6 || + status & CPU_CS_SCIACMDARG0_INIT_IDLE_MSG_MASK) + hdev->irq_status = status; + } else { + if (status & WRAPPER_INTR_STATUS_A2H_MASK || + status & WRAPPER_INTR_STATUS_A2HWD_MASK || + status & CPU_CS_SCIACMDARG0_INIT_IDLE_MSG_MASK) + hdev->irq_status = status; + } writel(1, cpu_cs_base + CPU_CS_A2HSOFTINTCLR); - writel(status, wrapper_base + WRAPPER_INTR_CLEAR); + if (!IS_V6(core)) + writel(status, wrapper_base + WRAPPER_INTR_CLEAR); return IRQ_WAKE_THREAD; } From patchwork Fri Apr 2 10:06:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 414338 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1285040jai; Fri, 2 Apr 2021 03:07:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/cWDRZrOmXCV18JxqDY8UGw1J15BldEvGlWuKjNHwsKo23N7a7pw7sZznNTztT4kRwaZr X-Received: by 2002:a05:6e02:85:: with SMTP id l5mr11147830ilm.182.1617358064349; Fri, 02 Apr 2021 03:07:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617358064; cv=none; d=google.com; s=arc-20160816; b=ICWv2L09Jyr4GEX6R/+CHQFq+v/doWzXYiOztxqCrcgXCBwnqKFX0xVX9PA9tYhEGU 7130NDZvGq2NSWhK/vMkjsgpi5nh5uOH66Yp7iqmdXjj6U6qE6t8Mx+rAXCApC2SLf6P J+ZxwibLib4PB4bo6Z5zSuitbhsSYyWhfxSPImAC0f09UXYu0CpZyqhOBCHbJJRh4Zyg QMJCAfYWBEU1Lj4t97rehHcPjKBWNyYpKnWB1M941BDYJArmeEKz5v9s/0FfbaiyYHVB IBKNLjwJ6E+DGPS4dsCNWjP3lXZ2exa+fH3lsEt7ulhoSSkSKt04UYJjm/elI7unHwDG EiPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=TpEdR2IV3OYZgpVzePZ+eNmYK6P9QMXJzc4TaX/ELQk=; b=VSJtfvjqjPPmcK0xtdvambGO3/6zSJHy6Aa8+20ja3aLqso+vIL3Gy/rysKACIFLd2 FRv7XLj3frJLx6vopIlTJDdfebFougjVQKmQWyk7QSwAAg8Hf5x2Qar2iogHwitO6AFa jxKXysI9nYhesmHTXb/+ch0nRJXMyBnrVW0qrFabQFeZKG+LZvD/srk4cBPA8S0ydUnD JSLFrFfgp6dkQleH9tKNYvdz/Oco/NQs5/myDa9q2jFItgPhH25Ms4sJGuxheOOq+pfK R+mmH9RTB4gc5/BtD5iXaRV7zt06bzJeto/fQOSdHu2XZCIy+/yuIEWzkJpCwW03WY5J KJrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=X0DWWLLK; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g2si6942838ile.30.2021.04.02.03.07.34; Fri, 02 Apr 2021 03:07:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=X0DWWLLK; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234779AbhDBKFk (ORCPT + 17 others); Fri, 2 Apr 2021 06:05:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234868AbhDBKFf (ORCPT ); Fri, 2 Apr 2021 06:05:35 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76594C061794 for ; Fri, 2 Apr 2021 03:05:32 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id b9so4302747wrt.8 for ; Fri, 02 Apr 2021 03:05:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TpEdR2IV3OYZgpVzePZ+eNmYK6P9QMXJzc4TaX/ELQk=; b=X0DWWLLKc2F+bRVX6HmEEm/ze5bEgsc0OnnHssty+AIW/Hj/0PYJ85KH1rKj2yT5nr ulUkv96arIo7iFiaFyEULoYYdv2DocrCqtskMfMYCbxS5lUMmnM9Gzd9WXlT8tby62y0 MWpNgUCpW1SlcqRRvHxQxgQLhGF6XBeuSH0AhEz6YJatct80WoHVAg6I90C5mDPY01DR OmhpROsubbAZnV8n+YmtUrh1nnE6k97/rEF+GFSMhtEozpZ6RPe1DRA8SCqwusowCqJK 0bDsl6Ia/1EYu1ZUmdwuguYO47TKhYtRvI+bXCaZUfyCdmKOa1a22Iu+MDEsEX85pupq +xug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TpEdR2IV3OYZgpVzePZ+eNmYK6P9QMXJzc4TaX/ELQk=; b=dmhA1UMcOBKn3tKcibejZxOSKfFKQRLWfUBL8rJBlH/288z3P6EVuis6G/xBS6DtQs Dw36bQfb/gC1nS7AMiy2Ti/8WemXIXMbHhvG8hhtlEH4r56gfsp1aU+wqJn5cDpjV6sc 17/n7PnrG16t33rrYY7SOoE7+JZHR8wItB1YPNmefxlJp3wAsq6yci2ogUzEmvYdHlku PXxIYG1VVvkMmd+T+mAWGhhUJ6X1NvnXdmbIZxF9lqT4+LGpLLL+3LTy1ipkVmzBCXmz oraIXl9sd0IhcF2OiHmal7sRBVUrc/IVtl82gPnBjnhDWyILmr5EpNTyRWgNq6JnVznW NlgQ== X-Gm-Message-State: AOAM530AcUoFsHEQxK+n9Y6TxJhA7J9YceY+QbO2YakifPr6iZFslLn9 bXNeEaUhF/6RjwyDJ0l8GRhEDA== X-Received: by 2002:a5d:58ce:: with SMTP id o14mr14743393wrf.4.1617357931225; Fri, 02 Apr 2021 03:05:31 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id v18sm15466618wrf.41.2021.04.02.03.05.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Apr 2021 03:05:30 -0700 (PDT) From: Bryan O'Donoghue To: stanimir.varbanov@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, mchehab@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: bryan.odonoghue@linaro.org, dikshita@codeaurora.org, jonathan@marek.ca, vgarodia@codeaurora.org Subject: [PATCH v3 14/25] media: venus: hfi: Read WRAPPER_TZ_CPU_STATUS_V6 on 6xx Date: Fri, 2 Apr 2021 11:06:37 +0100 Message-Id: <20210402100648.1815854-15-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> References: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On 6xx we should read wrapper cpu status from the wrapper TZ register set. Co-developed-by: Jonathan Marek Signed-off-by: Jonathan Marek Co-developed-by: Dikshita Agarwal Signed-off-by: Dikshita Agarwal Signed-off-by: Bryan O'Donoghue Acked-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/hfi_venus.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) -- 2.30.1 diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c index 09fc81da0645..dabff8654f97 100644 --- a/drivers/media/platform/qcom/venus/hfi_venus.c +++ b/drivers/media/platform/qcom/venus/hfi_venus.c @@ -1472,10 +1472,14 @@ static int venus_suspend_1xx(struct venus_core *core) static bool venus_cpu_and_video_core_idle(struct venus_hfi_device *hdev) { void __iomem *wrapper_base = hdev->core->wrapper_base; + void __iomem *wrapper_tz_base = hdev->core->wrapper_tz_base; void __iomem *cpu_cs_base = hdev->core->cpu_cs_base; u32 ctrl_status, cpu_status; - cpu_status = readl(wrapper_base + WRAPPER_CPU_STATUS); + if (IS_V6(hdev->core)) + cpu_status = readl(wrapper_tz_base + WRAPPER_TZ_CPU_STATUS_V6); + else + cpu_status = readl(wrapper_base + WRAPPER_CPU_STATUS); ctrl_status = readl(cpu_cs_base + CPU_CS_SCIACMDARG0); if (cpu_status & WRAPPER_CPU_STATUS_WFI && @@ -1488,10 +1492,14 @@ static bool venus_cpu_and_video_core_idle(struct venus_hfi_device *hdev) static bool venus_cpu_idle_and_pc_ready(struct venus_hfi_device *hdev) { void __iomem *wrapper_base = hdev->core->wrapper_base; + void __iomem *wrapper_tz_base = hdev->core->wrapper_tz_base; void __iomem *cpu_cs_base = hdev->core->cpu_cs_base; u32 ctrl_status, cpu_status; - cpu_status = readl(wrapper_base + WRAPPER_CPU_STATUS); + if (IS_V6(hdev->core)) + cpu_status = readl(wrapper_tz_base + WRAPPER_TZ_CPU_STATUS_V6); + else + cpu_status = readl(wrapper_base + WRAPPER_CPU_STATUS); ctrl_status = readl(cpu_cs_base + CPU_CS_SCIACMDARG0); if (cpu_status & WRAPPER_CPU_STATUS_WFI && From patchwork Fri Apr 2 10:06:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 414340 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1285169jai; Fri, 2 Apr 2021 03:07:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwjJ/A3t1LvjQ5KUyPo53WLZxgHCWzl+6//dYFfRPKThwgODFUQLhySIcoQo8unEgC66UNI X-Received: by 2002:a92:dc83:: with SMTP id c3mr10955017iln.167.1617358076767; Fri, 02 Apr 2021 03:07:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617358076; cv=none; d=google.com; s=arc-20160816; b=Aruzx8z8big32HfIxWMqsaXFeJpUvU742C9jUFRkqODLRO6rNn9UtsGYpdARciyjlL FmYChmCEipilgVvzw+iMngsGk6cJksdG9F6WOvzLeVjY0zc8PDqIVFFrKH5RAKoDz7Gj Bg/7iLI6HNzzDUlnrrP4Uxy7fa9rdcGVrV+aJgpD1jCFcps0Jy7xKRCXqvJOaoRCx2m+ /IfaJrjh16MGfPc/zi+j+nsrGKWm390KvLiWarwI6PFg3VeQMZ0zq5gDQel5xOxykO2R DUfmLscuxmW6Canw0IIthr69kBR0YdkBkyEuoJV9mb/Tj9Y73yfdb7uNKWIeJ1ba2xDR L6Zw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=BBliiiy6w7709FtBAKPmWC2L64XC00IR7DOPG3X207w=; b=MaknYqXtwe2XNUId30+03Y6za5ArOhfAUqTB89NkNl1oF9LErMkjnLX5RrVWZ2d1Cd npWKEV49tqJv1eggi0xQsQdtY10wSihg8/OeHvL8jjLcdzKqZGoE3ZJau6NJbYV8Pe5E 0E83uZIgNf5UfuB8pmWeSiL6bQn+b1ULgBRjBOawFUmX/SjkRZ9ZOubWrmMfLGG/Nhpc +LB2bbytyx+IVJ4cwFQ1uHGCdsfG1kUUZtHh+/YQPOcCYNcobVfpi+5NDEYrsKngqk0V hGMBlApg076mPPhopMTGEpjv6szmAOBYMEkii4RYuJnQ4D0KTrGRqrl0NzhNp3dDzool P2Xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KG0MSbpv; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g2si6942838ile.30.2021.04.02.03.07.56; Fri, 02 Apr 2021 03:07:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KG0MSbpv; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234856AbhDBKFm (ORCPT + 17 others); Fri, 2 Apr 2021 06:05:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234888AbhDBKFg (ORCPT ); Fri, 2 Apr 2021 06:05:36 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 75854C0617A7 for ; Fri, 2 Apr 2021 03:05:33 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id i18so845083wrm.5 for ; Fri, 02 Apr 2021 03:05:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BBliiiy6w7709FtBAKPmWC2L64XC00IR7DOPG3X207w=; b=KG0MSbpvHxIrbY8EA1yY8buEVvgrlrGyIs4CiBQaFpFCsWG+u9U9U7yAmNv129NLcD cNwHMh64MoPgmobr+poynU16c680ESRcmbm5LQOQCuX1UUPSp1/eRC/Ll6Dv1RmTYjBF qCO3He1a3yYE1WJy+7SeejmIvcc2UvMWxCziYcbt9MokKBb7BrWPyjaF4x3ANn+U+xu8 mtFd3vuy55d5cIVdcOpy7Db5spndhuMvwJIOSaKTQZodOXXbfk3q6+Ybsx0LGm1Nv2jG 5k3e+YBOK8uHtQHiV+MUaohAB89veDvUI96i4Axwq4vMR0TXI2Hkd5ksSo61JOiaaKxe 1ISw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BBliiiy6w7709FtBAKPmWC2L64XC00IR7DOPG3X207w=; b=f36mktgGIWed6LroljorB1bpA4nVefSPiEhGXN8+KrNlvgoH6OxuuYbnVLlwyCyVMr qy3gnYBHiB+3ifrnoY7pBImG1PpZxGX94lCBEmNickH4J+JDw2V9Chtdx4owBbaUxrRK 0dRX1ukXavDF78oaTNuBBK8+GeqAJsi++eiJ01U6HOIJk4Bc4EnbnRynlsmSMHw9vW9I v9qrvXDO32Vmr6jy5BTjkDa7MRoRnaxCpq934LSqHG9lZUED7y1SDy83MDZFFu8aqrF4 5GCt+NVtXrchVnmEtEP6VXbteIeU5zWp8Xp82MST4VmfKrHZpeMLV5W816JBt+MXZ/jK ieVA== X-Gm-Message-State: AOAM5330rFJqbq/+x1cRM7PtrVS00FmSv0l6PzpKVP9pyWnd42XeE1Rv d3aI7lOR4mDLjk1zjspSZfKWoA== X-Received: by 2002:a5d:6dcc:: with SMTP id d12mr14096588wrz.136.1617357932182; Fri, 02 Apr 2021 03:05:32 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id v18sm15466618wrf.41.2021.04.02.03.05.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Apr 2021 03:05:31 -0700 (PDT) From: Bryan O'Donoghue To: stanimir.varbanov@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, mchehab@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: bryan.odonoghue@linaro.org, dikshita@codeaurora.org, jonathan@marek.ca, vgarodia@codeaurora.org, Dikshita Agarwal Subject: [PATCH v3 15/25] media: venus: hfi, vdec: v6 Add IS_V6() to existing IS_V4() if locations Date: Fri, 2 Apr 2021 11:06:38 +0100 Message-Id: <20210402100648.1815854-16-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> References: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org In various places in the venus codebase we have if (IS_V4()) which takes the code down paths for 4xx silicon. This logic is broadly applicable to 6xx silicon also. In this patch we add IS_V6() to various IS_V4() decision locations. Co-developed-by: Dikshita Agarwal Signed-off-by: Dikshita Agarwal Signed-off-by: Bryan O'Donoghue Acked-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/helpers.c | 5 ++--- drivers/media/platform/qcom/venus/hfi_venus.c | 4 ++-- drivers/media/platform/qcom/venus/vdec.c | 6 +++--- 3 files changed, 7 insertions(+), 8 deletions(-) -- 2.30.1 diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c index 76ece2ff8d39..2515a2225614 100644 --- a/drivers/media/platform/qcom/venus/helpers.c +++ b/drivers/media/platform/qcom/venus/helpers.c @@ -488,7 +488,7 @@ static bool is_dynamic_bufmode(struct venus_inst *inst) * v4 doesn't send BUFFER_ALLOC_MODE_SUPPORTED property and supports * dynamic buffer mode by default for HFI_BUFFER_OUTPUT/OUTPUT2. */ - if (IS_V4(core)) + if (IS_V4(core) || IS_V6(core)) return true; caps = venus_caps_by_codec(core, inst->hfi_codec, inst->session_type); @@ -1084,11 +1084,10 @@ int venus_helper_set_work_mode(struct venus_inst *inst, u32 mode) const u32 ptype = HFI_PROPERTY_PARAM_WORK_MODE; struct hfi_video_work_mode wm; - if (!IS_V4(inst->core)) + if (!IS_V4(inst->core) && !IS_V6(inst->core)) return 0; wm.video_work_mode = mode; - return hfi_session_set_property(inst, ptype, &wm); } EXPORT_SYMBOL_GPL(venus_helper_set_work_mode); diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c index dabff8654f97..24cf20f76e7f 100644 --- a/drivers/media/platform/qcom/venus/hfi_venus.c +++ b/drivers/media/platform/qcom/venus/hfi_venus.c @@ -897,7 +897,7 @@ static int venus_sys_set_default_properties(struct venus_hfi_device *hdev) * enable it explicitly in order to make suspend functional by checking * WFI (wait-for-interrupt) bit. */ - if (IS_V4(hdev->core)) + if (IS_V4(hdev->core) || IS_V6(hdev->core)) venus_sys_idle_indicator = true; ret = venus_sys_set_idle_message(hdev, venus_sys_idle_indicator); @@ -1577,7 +1577,7 @@ static int venus_suspend_3xx(struct venus_core *core) static int venus_suspend(struct venus_core *core) { - if (IS_V3(core) || IS_V4(core)) + if (IS_V3(core) || IS_V4(core) || IS_V6(core)) return venus_suspend_3xx(core); return venus_suspend_1xx(core); diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index c20496a14a55..5cefa396f2b5 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -670,8 +670,8 @@ static int vdec_output_conf(struct venus_inst *inst) if (width > 1920 && height > ALIGN(1080, 32)) ubwc = true; - /* For Venus v4 UBWC format is mandatory */ - if (IS_V4(core)) + /* For Venus v4/v6 UBWC format is mandatory */ + if (IS_V4(core) || IS_V6(core)) ubwc = true; ret = venus_helper_get_out_fmts(inst, inst->fmt_cap->pixfmt, &out_fmt, @@ -722,7 +722,7 @@ static int vdec_output_conf(struct venus_inst *inst) return ret; } - if (IS_V3(core) || IS_V4(core)) { + if (IS_V3(core) || IS_V4(core) || IS_V6(core)) { ret = venus_helper_get_bufreq(inst, HFI_BUFFER_OUTPUT, &bufreq); if (ret) return ret; From patchwork Fri Apr 2 10:06:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 414341 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1285186jai; Fri, 2 Apr 2021 03:07:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZPg30KLEm/PldEwKQL0r6glWR1HjpaRbeSzHoBeOqnf6ky924kPhtLDw/XGN8Vwoaix8P X-Received: by 2002:a05:6e02:925:: with SMTP id o5mr10448622ilt.307.1617358077441; Fri, 02 Apr 2021 03:07:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617358077; cv=none; d=google.com; s=arc-20160816; b=t4iglrswHHQBOYuKVHz4n0syJE2YM2Z1HmqOSj+lkWRLMpF4fybRUPynABO1ou7lTX dltjIfYcn2YtgFzDslD1VGbCGhnsjYfrUv3HGahUztXqRVv4kHM3QFyTnVmBoZNm1ddU yMljSMsRnpmDUWTbXOsTbQyyliRVIsxHLhg8ax9+g24MdR8ehLSLDmZSTE5oOkkxpiap 0MU/4D+oCeJxv/uAci9Owm7X9mFuG5GQVp8/5NF/pHfLvlOIunGWteE8vUg9PgV4a6Vm cKhLjrB573PKcBezzHkZ3RJGr27KaC7Y4G6w31mXMgRiREvKdBX6R45LZJ0s93GJNxGr 0Wkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=71AYT/dhjnU5ojKUj2fRrnlRuQ44LYMjxMdvoAXboUM=; b=tr2rtEKkZISEfKlrbLiProYdJcXMc9O7P9XFmxFuNvyN8I9bVZYtjdG7B1gD3AI7xH 9KDz6oTDP9DrHrvXYBp13+x8f7x83LCgF7IAxtiIrtJAK/zA96lgRhhH09NRObOon52d cznkBwOn+1qKiR8mYgykfUHAHTV2TkRygsJ1MIGOa/N6eJlDJDD3NvG/0WFZumz/f0YX wrVVlqua9auZIapv1ETyKlJMWlcCOFpyaVCTuaTISv5WBIVEGHCSRy0ord9oXooS6oCU +L55KtdjsZ3gTzJLweaber75bqiabPJgLFiDjWKMreJYgP+UTc504u/LoPaVfMBBVsWM 7RcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=c8tek5g8; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g2si6942838ile.30.2021.04.02.03.07.57; Fri, 02 Apr 2021 03:07:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=c8tek5g8; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234783AbhDBKFn (ORCPT + 17 others); Fri, 2 Apr 2021 06:05:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234902AbhDBKFg (ORCPT ); Fri, 2 Apr 2021 06:05:36 -0400 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5DBF4C0617AB for ; Fri, 2 Apr 2021 03:05:34 -0700 (PDT) Received: by mail-wr1-x431.google.com with SMTP id b9so4302812wrt.8 for ; Fri, 02 Apr 2021 03:05:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=71AYT/dhjnU5ojKUj2fRrnlRuQ44LYMjxMdvoAXboUM=; b=c8tek5g8hUMygOAsHDoLz672nfpqYIcMeZBUeO7slAlFUTedUuy4OD5QlkbYfTdBDA 6o4a7Ybaf/OLmNG/TswYmqIEe85/DTNJLcctI6QHhOb7K+b2poo+5b5u4v3+gUylhq61 x/kAH7YPLhYzswz+tHlKiHa11vRBoFlpoL1UD/ao496KIX1U+VsCGxRxYdajVSSsrU5p aLz0G/9fRwNlsD5HjOlJBfjOV/YzTcMt04BZ/QnDmvDNqttJO0UVztdmUmOI++N3/kTZ OV+AgI+jfLeUdYRG/yoJTA+u5Rxsaq9k9TxThKHBSz9ti4qGzCyUDIWW87fdCwCrlviS vnGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=71AYT/dhjnU5ojKUj2fRrnlRuQ44LYMjxMdvoAXboUM=; b=YAJPGB/AXSK6XWaj5zRV7nzUNDSByTLWjVMlY7Gh6DdFzdoGfaCcmpyixZWSXcv2NH zOjexgWbOp3FY3xVWRQKREn8QQ0Yz0bOAZ27rhCwg5t2qEAEVpFUBqSBiN7o2MuNNTCn JNSKmafDKJXPlb2R4E3TRcdfLGLURCv+lGV2xXybapmGMX63ebaG+VsABj4Yx5wCLR22 YVTEZ5GZutfWstBy/LcuOuKFY2Aq1gegkT6pEtnts7PdqioDGlWMb2FNXe1+e1H/Tgmw XPT9GOPSKNX4pGmZG0doJaNsLds4av10NrURJQglp19HPlp5up2SH3ZzibZS9ZemUio2 TC/A== X-Gm-Message-State: AOAM530NHi1jO/u+0NUyjR+BxIyXv1UipPJJlQ+wvsJWkmSYS2lqYHEx pSYXA+dW+bXwi1ADGvc7Q7c5kA== X-Received: by 2002:adf:9261:: with SMTP id 88mr14135510wrj.270.1617357933148; Fri, 02 Apr 2021 03:05:33 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id v18sm15466618wrf.41.2021.04.02.03.05.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Apr 2021 03:05:32 -0700 (PDT) From: Bryan O'Donoghue To: stanimir.varbanov@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, mchehab@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: bryan.odonoghue@linaro.org, dikshita@codeaurora.org, jonathan@marek.ca, vgarodia@codeaurora.org Subject: [PATCH v3 16/25] media: venus: pm: Hook 6xx pm ops into 4xx pm ops Date: Fri, 2 Apr 2021 11:06:39 +0100 Message-Id: <20210402100648.1815854-17-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> References: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org At this time there is no need to differentiate between the two, we can reuse the 4xx pm ops callback structure for 6xx. Signed-off-by: Bryan O'Donoghue Acked-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/pm_helpers.c | 1 + 1 file changed, 1 insertion(+) -- 2.30.1 diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c index ccbbac2036d2..a23e490b6139 100644 --- a/drivers/media/platform/qcom/venus/pm_helpers.c +++ b/drivers/media/platform/qcom/venus/pm_helpers.c @@ -1122,6 +1122,7 @@ const struct venus_pm_ops *venus_pm_get(enum hfi_version version) case HFI_VERSION_3XX: return &pm_ops_v3; case HFI_VERSION_4XX: + case HFI_VERSION_6XX: return &pm_ops_v4; } From patchwork Fri Apr 2 10:06:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 414343 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1285222jai; Fri, 2 Apr 2021 03:07:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5vQN8PX86iSCbJdlEbR1oj/9YaRGZt0dzN3XTmiNVR54UGrLoGA+9qPt8ex3YDjqm8zHy X-Received: by 2002:a02:694b:: with SMTP id e72mr12379555jac.89.1617358078783; Fri, 02 Apr 2021 03:07:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617358078; cv=none; d=google.com; s=arc-20160816; b=0nWE13B6fZ3cmGdJXhjwOHSxzVB517TIJQgqel+y2Ieto5ugnS9Con0iA6RXjbwEO6 Ab8/JLsQGrx9s4RBrTJwn2tFv7Ls3S5EVCWE2pqRUVmsj07lfRSEW3xaUVqQQLHHmzqK 5Z1x0dzbUH+tuacbunnfY1/vnPmH6MdNxUJdUKD4f7faxJISaLpC1OyZliXKndb27bYe +E26aLnBlp3WpT1jS0QT7Hy/Bkhi+OkPQGx4uE9gpsiK6G1et2X2sqLgQBsI7LWCCqvL mfC8+Mq0EwoCjSCqOzYEBNR/Bf8+h+b+0+pzunfsNPq9A4/FEnn6ACHAP2WzUz+JzBbz +yYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=jC/nAoOA5wxgtGfB1JzVVDDrp9E9awsc1iAxv29P8SY=; b=OeHa/48LPXqRnhK9LMZzaKz4hukQNSL2gvjn2tU9IVzCDlsd4Lu4onnd2p6q9yXZ98 bynga8dlJtjyayggmtvs0grrnmFR5DZ9lCXB4qGGeSknsTjKg7nazIegQonDS4Wz1q9E /clNc3Qif2gfxS5b8v79N1kW/Acb8fd6HpByxvDaNeY5QSIzkkOhkmrviQ4bAhLOsIxW Bo6ytJ5af+0Rb1XVZq6XTHk9vjQFiFNxyWSy/PPtmWgHYpRYk9d3LJixUhLQ61JvTPw9 pMijLwFRhKjMgVSq/91jp1V6/fq3ZoZjz/pX9BvxwLbTk/Z7zxyMbNDjCHJxSBwTEh2A O+wg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pbUhDi5h; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g2si6942838ile.30.2021.04.02.03.07.58; Fri, 02 Apr 2021 03:07:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pbUhDi5h; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235064AbhDBKFo (ORCPT + 17 others); Fri, 2 Apr 2021 06:05:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234954AbhDBKFi (ORCPT ); Fri, 2 Apr 2021 06:05:38 -0400 Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39A43C061788 for ; Fri, 2 Apr 2021 03:05:35 -0700 (PDT) Received: by mail-wr1-x436.google.com with SMTP id i18so845149wrm.5 for ; Fri, 02 Apr 2021 03:05:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jC/nAoOA5wxgtGfB1JzVVDDrp9E9awsc1iAxv29P8SY=; b=pbUhDi5hNO63pJvumcEhmebOG/sfnPRDTUEiG9G9H1q8tbkL/ALrBaKHF/QMBh2kBO vVfzer+6nn0to8yY8fzWnADRbApwCyLjgX6InqdKXFYL71Q1pb91qOn1PxNmev5WxC9n VP1ehzT9hSgCVTT/ezUC03utkeqXFKJNiFJU8WM6MN1fJqlCZkvManMYM8mqEd7yXB1M h8NghO8Nu9OgceGqjqFTQDeezQv2vbXGMk/CQ06n7Vw4/FvgFjTGCxBBSYoYZoAIrKOv +sJFaplqCXjA3xHu291kqU/qpY1al7DZyrLe2Plw1Lc0W3e108hX3ngEyqhLu+B+tdIo hvqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jC/nAoOA5wxgtGfB1JzVVDDrp9E9awsc1iAxv29P8SY=; b=Ux+7GW6KG1/KR/T8stensar9WizuAro1qcRyt+DUwWo79QgQX6vW3vUOi9F+AoxiM4 KyMeu9OCe45jwF1jEao5uVH0Q0qETViog5Jo4zWozLWqPTtwJjBMgZhysw1sACkF/EHt ZAIWTjd7UWveeR9W5KQ+SRZ/bhCLBSd44JjptN4JXvJ/9mwWr4UyL16PIAlnmkOJ4pCa uNFPWVjj4OHfS2YgkNmkJX6rE6clZbFvHJ25htS65oCyM8aFKaenHI2a51cUVGxXXSxl gWl5pBE5X+K5X0vwcrhToxvm/zA5mffbC/iknZFwJu0YwlT6exCrc4dVBIqQWxUX9F5T df/g== X-Gm-Message-State: AOAM532FtwIm+UAMG70HojWBNFqjR8wrTedQ0L/hoP7KauD4d6CiQ3/4 a4bBpoTlkPcqHarBfU4etluu3Q== X-Received: by 2002:a5d:654a:: with SMTP id z10mr14680154wrv.335.1617357934079; Fri, 02 Apr 2021 03:05:34 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id v18sm15466618wrf.41.2021.04.02.03.05.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Apr 2021 03:05:33 -0700 (PDT) From: Bryan O'Donoghue To: stanimir.varbanov@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, mchehab@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: bryan.odonoghue@linaro.org, dikshita@codeaurora.org, jonathan@marek.ca, vgarodia@codeaurora.org Subject: [PATCH v3 17/25] media: venus: core, pm: Vote for min clk freq during venus boot Date: Fri, 2 Apr 2021 11:06:40 +0100 Message-Id: <20210402100648.1815854-18-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> References: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Dikshita Agarwal Vote for min clk frequency for core clks during prepare and enable clocks at boot sequence. Without this the controller clock runs at very low value (9.6MHz) which is not sufficient to boot venus. Signed-off-by: Dikshita Agarwal Signed-off-by: Bryan O'Donoghue Acked-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/pm_helpers.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) -- 2.30.1 diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c index a23e490b6139..a91dc24de2a4 100644 --- a/drivers/media/platform/qcom/venus/pm_helpers.c +++ b/drivers/media/platform/qcom/venus/pm_helpers.c @@ -41,10 +41,24 @@ static int core_clks_get(struct venus_core *core) static int core_clks_enable(struct venus_core *core) { const struct venus_resources *res = core->res; + const struct freq_tbl *freq_tbl = core->res->freq_tbl; + unsigned int freq_tbl_size = core->res->freq_tbl_size; + unsigned long freq; unsigned int i; int ret; + if (!freq_tbl) + return -EINVAL; + + freq = freq_tbl[freq_tbl_size - 1].freq; + for (i = 0; i < res->clks_num; i++) { + if (IS_V6(core)) { + ret = clk_set_rate(core->clks[i], freq); + if (ret) + goto err; + } + ret = clk_prepare_enable(core->clks[i]); if (ret) goto err; From patchwork Fri Apr 2 10:06:41 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 414342 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1285202jai; Fri, 2 Apr 2021 03:07:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPYM3joChjo+BaSMXF6WwiRVEy3gEZo4t9fICR+J6NPUeyc8cgexyJO6ejA0cKmyV0/dr5 X-Received: by 2002:a5d:93c2:: with SMTP id j2mr10629157ioo.166.1617358078087; Fri, 02 Apr 2021 03:07:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617358078; cv=none; d=google.com; s=arc-20160816; b=zfy/WNGpFtEYq/2IN/qMQLACcA0u6SFYiz6HLj9TYl8tBnNL/1EIYFf8xqB+oEIFf7 mr5JhVkF3ef4IuQXo4asHnffjRUHFtPgwKMyWP6LkId689b172KSCg8J/ahNw/Q/IqW2 XPCevOpe6jrY/MgIr/aHBGA5Xrd1rAMjCovsCj1KRpxXqPH/Q8dHw33JO5mELDgY/wX/ KLQknLqAo5SJi8a8Y+XupYKCiTTpbrBX1HrZ0D62J7rNUjHVvmf7PceA0jdLeVHiDs26 jvXz18pOPIMpw5MTFiacBCcSxE+0jFbTQh/4l2HVKvUqeDdPbio7zyWRIOZIKePWGnvn pueA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wwMK9AHuxVFl4rBHOIBcFYLquE5ubyLXDobeIx8iDE4=; b=X6KqbaGGxMov4kNVPPBy+mvC2kJzyDdxQak5fXu/vGWfmBPkqL+t4YgAvh19xTULbi 9EOFI75sQ3wv8AvMFPR6aLshdQ1GldiFvubaYD2EVShalE2z8iTsu3tQbE/qczrnd3cR Ts0JPN/90aF9r5Z2ltb+dsU4QESoVgyM3BIPKdLsA44a/sdXeuSfCxYcrt+TrkDfR1n9 3TBiILNG3xg904hJbUnfm23KR6Giz0j3j5jPTnUCNNOq/7aigi1M6K0gyCoRVeW5BUmh o+7ZjLl3/WJwOCHYJLZ6ObKHkqtX4okFYwREzhEv5sqbyr0hBmGyy4fkixmX8DHC/R1n XJWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qtjyYNff; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g2si6942838ile.30.2021.04.02.03.07.57; Fri, 02 Apr 2021 03:07:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=qtjyYNff; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234869AbhDBKFn (ORCPT + 17 others); Fri, 2 Apr 2021 06:05:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234904AbhDBKFh (ORCPT ); Fri, 2 Apr 2021 06:05:37 -0400 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 986EAC06178C for ; Fri, 2 Apr 2021 03:05:36 -0700 (PDT) Received: by mail-wr1-x42e.google.com with SMTP id o16so4331625wrn.0 for ; Fri, 02 Apr 2021 03:05:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wwMK9AHuxVFl4rBHOIBcFYLquE5ubyLXDobeIx8iDE4=; b=qtjyYNffeMR/onwCNWN0NjOoxsTnpqHlfM3QZ2mMtGM4kVS3KntXkL9vmsMWq9ryrI 2xEVE7GLSAdSu/4VAcevx7HxxmPbllLSjgF1FXkpAJ3nEJikh6mRWNbic/0+VDZQIhZm RSnuYJjWkFUiKutcY/wHT25l6p4X+ess4A7eFUCIE9/BhX2FPxAqGnmToDyxyx6XFVj8 0T3KXnLmK5zbPbiH4m+iF+0uyXRzTKp1h+yGlqaKU7hlZFzm3gOgPJPJhTFvqN+JJke0 9efP25hfg9iFGvW08gTPJ62Y0vvhLIzDvDJR5FcKiVPtIeHitGIyDXcxieYDJAsCFzdU 8Abg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wwMK9AHuxVFl4rBHOIBcFYLquE5ubyLXDobeIx8iDE4=; b=BUhx6REIiJwbHjpDtWJsD2f07SL8w96Ptec8wlXBjKTSr7HosyK5bdDLSuSyVbq9sU tiOa+sDdv0Zk6TYClgo/4311BKRXy3f6uFsDatjeMSrmw9YRbw2L2y8xPBQrCpvGqnVf Vsr3PhzhJeGeLLg5V1olaUe/6hHuKQcM8LxUJObo6nUNf2nNRERBxX8OVxglS8qZM34V +S6+oTOcFsz5GBYwUftn67OOEdJUp1n5uMEMN038mH5KIIL6tQ/Zh7JgYgWieizPDe8w UqEEisg1YwOkOY1FI1nSEePcEr/wu4x2jz8+WuUUH3/BanIAFSUEdv9MzSnXAUCLevDe A4KQ== X-Gm-Message-State: AOAM532Fy24XUDLTwGiYXqn8K/BmN2baOGPSlPcwb5iVQLDUbSTeaSxG acTof1FsmYrUuCEpvYsRlB6qUA== X-Received: by 2002:adf:e4c7:: with SMTP id v7mr14579458wrm.245.1617357935339; Fri, 02 Apr 2021 03:05:35 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id v18sm15466618wrf.41.2021.04.02.03.05.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Apr 2021 03:05:34 -0700 (PDT) From: Bryan O'Donoghue To: stanimir.varbanov@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, mchehab@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: bryan.odonoghue@linaro.org, dikshita@codeaurora.org, jonathan@marek.ca, vgarodia@codeaurora.org Subject: [PATCH v3 18/25] media: venus: hfi: Add 6xx AXI halt logic Date: Fri, 2 Apr 2021 11:06:41 +0100 Message-Id: <20210402100648.1815854-19-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> References: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Dikshita Agarwal This patch takes the downstream AXI halt routine and applies it when IS_V6() is true. bod: Converted to readl_poll_timeout() Removed poll timeout for LPI register, testing showed the value would always timeout and work, so the polling did nothing of value. Signed-off-by: Dikshita Agarwal Co-developed-by: Bryan O'Donoghue Signed-off-by: Bryan O'Donoghue Acked-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/hfi_venus.c | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) -- 2.30.1 diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c index 24cf20f76e7f..cebb20cf371f 100644 --- a/drivers/media/platform/qcom/venus/hfi_venus.c +++ b/drivers/media/platform/qcom/venus/hfi_venus.c @@ -541,10 +541,42 @@ static int venus_halt_axi(struct venus_hfi_device *hdev) { void __iomem *wrapper_base = hdev->core->wrapper_base; void __iomem *vbif_base = hdev->core->vbif_base; + void __iomem *cpu_cs_base = hdev->core->cpu_cs_base; + void __iomem *aon_base = hdev->core->aon_base; struct device *dev = hdev->core->dev; u32 val; + u32 mask_val; int ret; + if (IS_V6(hdev->core)) { + writel(0x3, cpu_cs_base + CPU_CS_X2RPMH_V6); + + writel(0x1, aon_base + AON_WRAPPER_MVP_NOC_LPI_CONTROL); + ret = readl_poll_timeout(aon_base + AON_WRAPPER_MVP_NOC_LPI_STATUS, + val, + val & BIT(0), + POLL_INTERVAL_US, + VBIF_AXI_HALT_ACK_TIMEOUT_US); + if (ret) + return -ETIMEDOUT; + + mask_val = (BIT(2) | BIT(1) | BIT(0)); + writel(mask_val, wrapper_base + WRAPPER_DEBUG_BRIDGE_LPI_CONTROL_V6); + + writel(0x00, wrapper_base + WRAPPER_DEBUG_BRIDGE_LPI_CONTROL_V6); + ret = readl_poll_timeout(wrapper_base + WRAPPER_DEBUG_BRIDGE_LPI_STATUS_V6, + val, + val == 0, + POLL_INTERVAL_US, + VBIF_AXI_HALT_ACK_TIMEOUT_US); + + if (ret) { + dev_err(dev, "DBLP Release: lpi_status %x\n", val); + return -ETIMEDOUT; + } + return 0; + } + if (IS_V4(hdev->core)) { val = readl(wrapper_base + WRAPPER_CPU_AXI_HALT); val |= WRAPPER_CPU_AXI_HALT_HALT; From patchwork Fri Apr 2 10:06:42 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 414344 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1285231jai; Fri, 2 Apr 2021 03:07:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymalJ7wqOcJj0njKxtYUoq9RWRnaTuKGQ1Ou/CobG5AKla0pZAWzeFh1qpXAGJc1jta/Cb X-Received: by 2002:a05:6638:3a8:: with SMTP id z8mr12158843jap.111.1617358079495; Fri, 02 Apr 2021 03:07:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617358079; cv=none; d=google.com; s=arc-20160816; b=fFO9bXOemQg3GN5ZRJMRB+YyRQcFlw2DS1qUyYTmv2jP7U+zQDzGnW4VflZc9YVTqj NGsvr8Zsx8cjvNjM+ioxe1E0n9gSW5N6GNuUR0+ya4lHlEwGwblLkUT/OtQTFxjs2cAE ocbsyqg494w3qQqUmIsP9flyJ1/S5itvJIq4J/0WlbTyf5tFOAkFtHCx5hPwM9RA3A4j 5/Q3AsCYwz55mN7zsuXvdKTkwqwInn+EHpDO/NCZXPsGHjkcVx0HhsYFrwXKtyUOlAfa 1favd4DMhBgSmgab6ikwDd/onoqzBS858zJhZ5pZ5ZjSQqntH159kI8Zq2zbN+SQGS05 OGqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=sqmzV4pfroiyXv7Okp+NwIqGaoKA31AvZjPcny2idug=; b=AlWQEiKYEpYRPJ1lyenoHm2o7YQvtHGnZnHUXH4my4cCzJLWK6jNVS5Q6qGVRZxgxI n9w2Gg6sMSFGTERlAVmeFOc8tu0Je6lIMGeZaNaA9wzr6Vd0gTUyRtAcsZlPU3f8znyj ry1M1MnUvhBwEIP8RtouC7PlpA2I5+6+TpjBaav+HUkmmAtkz8WAunj6ERYCNTeUe8VH VZxLNtzTGI48krLwmJGmrB5oiiJ016vZe+5tjhYOTnFf/TP5wNsxw6eat3pHbWV5SUS8 OtDmUvaDDjEBsPTBEXODZSETe2TNwYA6AyRNj0Omk/y7MxaUEHZmNtV0W3Rm9zQXK0ex ej8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=a1rbYVvs; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g2si6942838ile.30.2021.04.02.03.07.59; Fri, 02 Apr 2021 03:07:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=a1rbYVvs; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235076AbhDBKFo (ORCPT + 17 others); Fri, 2 Apr 2021 06:05:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234975AbhDBKFi (ORCPT ); Fri, 2 Apr 2021 06:05:38 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5154C0613E6 for ; Fri, 2 Apr 2021 03:05:37 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id b9so4302910wrt.8 for ; Fri, 02 Apr 2021 03:05:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sqmzV4pfroiyXv7Okp+NwIqGaoKA31AvZjPcny2idug=; b=a1rbYVvsr4kkCLsIMttVKIs27enfxZtgtCHerxFRah3TqGm5M+0p+s7VqS11dTF3jr XqX5K9Coy0t+sYRWGOtSWu1pMbjUZoUjxn7y5WlUd8MxhHv8fr/gE8CATt5jv3p3w7KO PjB888lM5POJ3/xQeuBi7xAxOPoImaswhfyJF5xKrM4+KbWfDehwJpdJlJx7qDbqwq6E txCcODVnCKBorbeDOd52iN0f664mYluYuPbtiHrQVhXVlppmMghSmYpz0nkigQyVY8zQ gZl1me+SfueMuIgG0r55jQUJiRRJC4SC8xHp7lb4bj9xhCpNksjUJZxWC0taKtm1SSfV 5+Ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sqmzV4pfroiyXv7Okp+NwIqGaoKA31AvZjPcny2idug=; b=ePQkKaEZYqdLOUdlXD11JTPzRs741BbGiVtsOtA6ZP/rtwP9qIQoV/ohXOOyb3f2qq XqbGFdHTd7zMbDuih47kPILqT+Dg0aIa4v+jvNiiptNtUqUoDSZsrSUbmjzlict+MzJ1 7+lCZuSOLXjJL333FI0uY36qm10BzUnnWMQhpIgQZtxaCdUuDFhdb2yMxhP20GXIhny3 z2FxunXI7oKFwuc3K9Igbw+Z0hrs+ahY10dBDp8zjwtdSvvZ5JYwaVmajL3NeBUN8JUX 8O/12Dy+RXIXWSpkvw8eB4eVWvaLtUq6puVrzeLc7hakBMngrbrslzD2LIJkfmoGT8WG DGHw== X-Gm-Message-State: AOAM5319h5It7tG3QHG/zBr1y/X14yUQF1/s1KlJDsTPExCzI4nHrCBy dDCwxKpcsE31oQ1+PMov/0IU2Q== X-Received: by 2002:a05:6000:1281:: with SMTP id f1mr14577666wrx.243.1617357936357; Fri, 02 Apr 2021 03:05:36 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id v18sm15466618wrf.41.2021.04.02.03.05.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Apr 2021 03:05:35 -0700 (PDT) From: Bryan O'Donoghue To: stanimir.varbanov@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, mchehab@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: bryan.odonoghue@linaro.org, dikshita@codeaurora.org, jonathan@marek.ca, vgarodia@codeaurora.org Subject: [PATCH v3 19/25] media: venus: pm: Toggle 6xx wrapper power in vcodec_control Date: Fri, 2 Apr 2021 11:06:42 +0100 Message-Id: <20210402100648.1815854-20-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> References: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Dikshita Agarwal When in vcodec_control_v4() on the 4xx path we select between one of two vcodec cores to toggle power control bits. In 6xx there is only one core which offsets the relevant control registers to a slightly different address. This patch accounts for the address offset for 6xx silicon. Signed-off-by: Dikshita Agarwal Co-developed-by: Bryan O'Donoghue Signed-off-by: Bryan O'Donoghue Acked-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/pm_helpers.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.30.1 diff --git a/drivers/media/platform/qcom/venus/pm_helpers.c b/drivers/media/platform/qcom/venus/pm_helpers.c index a91dc24de2a4..dfe3ee84eeb6 100644 --- a/drivers/media/platform/qcom/venus/pm_helpers.c +++ b/drivers/media/platform/qcom/venus/pm_helpers.c @@ -414,7 +414,10 @@ static int vcodec_control_v4(struct venus_core *core, u32 coreid, bool enable) u32 val; int ret; - if (coreid == VIDC_CORE_ID_1) { + if (IS_V6(core)) { + ctrl = core->wrapper_base + WRAPPER_CORE_POWER_CONTROL_V6; + stat = core->wrapper_base + WRAPPER_CORE_POWER_STATUS_V6; + } else if (coreid == VIDC_CORE_ID_1) { ctrl = core->wrapper_base + WRAPPER_VCODEC0_MMCC_POWER_CONTROL; stat = core->wrapper_base + WRAPPER_VCODEC0_MMCC_POWER_STATUS; } else { From patchwork Fri Apr 2 10:06:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 414345 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1285238jai; Fri, 2 Apr 2021 03:08:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfYsoAmFS4WiZcr0FArjzd5zwe+4244jPRsPHRr94LPfdYHEbt67qyIjOASJnQWrC7f8da X-Received: by 2002:a05:6638:35ab:: with SMTP id v43mr12060556jal.65.1617358080116; Fri, 02 Apr 2021 03:08:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617358080; cv=none; d=google.com; s=arc-20160816; b=ZyEBmFXStVj3Dx4x7Cb/815rawuKFYfmyKdXwOi6JRVcMa+9L7KYoAcMQb0G31hFvk BHWjPWQiwKpRLQ5hFxnIStvdZgFzLIpTBj58paVWKWziKBTeutKy40Pt6ZEekHH3W15n B7o/H4dhZ4vXn8VwWJxbo7aptJ9wHOXRh1BRn0jJ3sdJVNCzNR4F5oE1r34vJWFHEJHr X+7GBeVBTebOzc5EEyiefKzzdXvrb2mBDLakbrz8wcw8rMQp2WRweMTMS04JTCdJWPhj U8TLguT9AEyN/CbdcJfUOL1dHCBQiyQ08UiGTieoEsCrkegnX9mi9CwnHhYxS7yIC3t8 vhag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Z7UGuQOdemv2oMoc8naE5ESdlFA5KVU47RowvDDBw/A=; b=E5zOX/T0d1JeRaTtKqgGXYvAKt8VH6tl6cCXC0IanCT6zn2Rt+w7ybqFqD43LWd857 XvlsSruH2qhLNk8WqL9s0vaLhXcI2KP3IWpaihC2Oi7gpQgZYVBrabj7uq96I+jOAWyT DcLTfB0IzsQmEmqFLdekKl/5VUmKGEeeGb0xlNSSDPF37uhH2DF+ZB7XFsJeK3p9NgoE THrutXBvo2Y9w2SxcbX86c0D8LrjUjcEB/wuJ7O4wrqjFdeXe2csi3Ns2G0hHEFrKsPR rD33O9pufPqviiCjr2GyrmXtxhMS4oj7jma7KLZkO3EtX168gA+mlqtsCeDVXZ1p70rU wKag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RZWnwEPM; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g2si6942838ile.30.2021.04.02.03.07.59; Fri, 02 Apr 2021 03:08:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=RZWnwEPM; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234975AbhDBKFo (ORCPT + 17 others); Fri, 2 Apr 2021 06:05:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234997AbhDBKFk (ORCPT ); Fri, 2 Apr 2021 06:05:40 -0400 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AEC7EC06178A for ; Fri, 2 Apr 2021 03:05:38 -0700 (PDT) Received: by mail-wr1-x429.google.com with SMTP id x7so4296609wrw.10 for ; Fri, 02 Apr 2021 03:05:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Z7UGuQOdemv2oMoc8naE5ESdlFA5KVU47RowvDDBw/A=; b=RZWnwEPMTOD/SqfAAtj8lLmPKW1RgZzkRNMlIvQVskMyjVR9Pfuba1H64f6O8U8XAV TZd1V1WkcMxJ/pB/0iEtxQh0CDK5DCKS46sXB7hNg38Yb614O8KICbgYPg4+wKCJ/1U8 v/G7PtMBNPh1EpmOcWtTEB/HezTpcN/68HJueRGkNPImoVBxFOiAhXFW+qcF39hZJ/sj gbN/zV+bIgUAMebyDjwEFbxZ9jN8933kY4VUVHhlhul15w7ojmfgavQfeh5KqUTV69Nu yNFVWzYdxK4LMyqtMcc0q/hJmfraJUh4pSdIxcKCniWCKwG/+Xv7R+7raZuT48132TUa CeAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Z7UGuQOdemv2oMoc8naE5ESdlFA5KVU47RowvDDBw/A=; b=NqPBFPoP+1VGkGIVaE6bit5sZLoVIE6cfwCLXIJjl7hwajGv7ymm+jh52OflVs7kqm T4pQxAqaFfnBww7Eh+iZCoKYDqQHwacRlJT5FcF1sGbzYhzxObD49TFoy6sY1c0eI4Fe /hM53SwD/0ozBTfLjpwjCrEsYluM4OEKoA5z09ankYuRRDY3mxWtEv7e6XT7eSPx0biB mbjbO6IDDEgoBUsqm9NWHF7UONm39LEKujIBafA1YpqlIu3iz7fqIM2TqWtP/zXO7GlJ ydomXclrgTHkyxh7SY4FMcRYKf8OaMZg6Q++HGgBsuYNJp0LshXcrG2n+eXOlXtccHSd fJuw== X-Gm-Message-State: AOAM533waQKtZbw8wCRJLvZKIq9KPg0GSP4W6RJKCulSaSKRvIGD9HDF 2DHIG7+GzNYh/4Ms/+6915H2GrMacOTpi9Za X-Received: by 2002:a05:6000:1acd:: with SMTP id i13mr14378178wry.48.1617357937428; Fri, 02 Apr 2021 03:05:37 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id v18sm15466618wrf.41.2021.04.02.03.05.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Apr 2021 03:05:37 -0700 (PDT) From: Bryan O'Donoghue To: stanimir.varbanov@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, mchehab@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: bryan.odonoghue@linaro.org, dikshita@codeaurora.org, jonathan@marek.ca, vgarodia@codeaurora.org Subject: [PATCH v3 20/25] media: venus: firmware: Do not toggle WRAPPER_A9SS_SW_RESET on 6xx Date: Fri, 2 Apr 2021 11:06:43 +0100 Message-Id: <20210402100648.1815854-21-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> References: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Dikshita Agarwal Do not toggle the WRAPPER_A9SS_SW_RESET on 6xx. Signed-off-by: Dikshita Agarwal Signed-off-by: Bryan O'Donoghue Acked-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/firmware.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) -- 2.30.1 diff --git a/drivers/media/platform/qcom/venus/firmware.c b/drivers/media/platform/qcom/venus/firmware.c index 8c2c68114bbd..227bd3b3f84c 100644 --- a/drivers/media/platform/qcom/venus/firmware.c +++ b/drivers/media/platform/qcom/venus/firmware.c @@ -53,10 +53,12 @@ int venus_set_hw_state(struct venus_core *core, bool resume) return ret; } - if (resume) + if (resume) { venus_reset_cpu(core); - else - writel(1, core->wrapper_base + WRAPPER_A9SS_SW_RESET); + } else { + if (!IS_V6(core)) + writel(1, core->wrapper_base + WRAPPER_A9SS_SW_RESET); + } return 0; } From patchwork Fri Apr 2 10:06:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 414347 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1285256jai; Fri, 2 Apr 2021 03:08:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymmkzsIo6ZMubLcTy9YyMZ55jsgMfkqBOZtBf0mw5I04htdx0g+BAbwcZ0XTiInzyA0Lnf X-Received: by 2002:a02:a691:: with SMTP id j17mr12438104jam.14.1617358081538; Fri, 02 Apr 2021 03:08:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617358081; cv=none; d=google.com; s=arc-20160816; b=s4ZTt7z5WfD06R4pKd/zx20eDtBgO5Ji7WFuf6rD6jCgdQ916XDg/1CX5ip/HL2HfT SF6eTpyplHUNfiHshTw2GMw48nQYoWpeG/g2tjI9E1MmBzntZw1yP4mr9czscbqlnTfH DPTHLz96m3GwuaRi0c5h4hBt4G1Za9FoRWi0OlkuAbgv+ZZwT16mnZg45MKzJGjEqsZx F20bokV0zZbzY9DwBBHHDmT3EJ677CEjphl4HbSbLwB+7ONmzKdXNWnQ63fsYyr4LeF3 /Z/oY9Z9FFm5POLdDEPkPp6cKJWlUuzUodDSQjABhNk4n8P7PVORZKtzYMM0GHmWLaAG OgaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=b46nTbsZeh6iAZ6HbCYVxnlS3c8ZIKectHfSK1nlNZU=; b=fh8FqK2tz1H+ZVS41L3p+igcjU9It6Z+ANPDdsNJj3T7eX8HR3RIXrPBPBfOVicpXb 1Te6IGwZ4pgADqX43lPXUegYiO8ukO6/lMsNQFP7ynp7LpYa+22JJGHj9j5ljz409lGJ hiqM2kVg6v4kfNZSVgKOqp9xTqgl9zNBJymH2kkF60Yb/g822yUMNODe2J+9CkNMBVdW VJugXtb5Djj0oHcybV9WZCKLhL9K4AkTYu31lJlwsCE+EBrFQF94k+Wci7TYt95fDqZY Z82+4shjL7P4iDPo0h9jCe066N4UZJGhuqfwVwLaT1kz/UGVTBsZ8wnoH2/UkUpCKKFG Mp7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Txmm2M/U"; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g2si6942838ile.30.2021.04.02.03.08.01; Fri, 02 Apr 2021 03:08:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Txmm2M/U"; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235111AbhDBKFp (ORCPT + 17 others); Fri, 2 Apr 2021 06:05:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235020AbhDBKFm (ORCPT ); Fri, 2 Apr 2021 06:05:42 -0400 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADBF1C061797 for ; Fri, 2 Apr 2021 03:05:39 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id k8so4317602wrc.3 for ; Fri, 02 Apr 2021 03:05:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=b46nTbsZeh6iAZ6HbCYVxnlS3c8ZIKectHfSK1nlNZU=; b=Txmm2M/Uvq/RjX25n3ccoHvfLHBzOJtNvk/wxa2+pz6ca52d7kKZZ0SLLEIOOEjNXk mn8jCwoeLl29tDGmP+FnwwqebL2tOoo/qegfqhxDEECCPQviAU/I2msSbpyvQ7Fvy5dH 9JegzgApLACjcoc1tV/tMjE7PKZ6rnVMQ4fVPlxFWDU2owk6BgqGb7aaR9WAj7bH2QZx BwYALDGOKVYLpEuEFnZiAbHci1wn8S6XEnJ+p32DjaDqzX20mbd2+fl2OaojeYIU3Lqi erIg3P7TeDJ6nZRwjs+6Drnzk7KmLo3A/qfdOduzJYpQ0lIExXRNVwWNCKaGy74K5nom PtEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=b46nTbsZeh6iAZ6HbCYVxnlS3c8ZIKectHfSK1nlNZU=; b=Sy1wDK370HvZ06zSq5z70O2hLipOAYZ2ctELGYIISj6UqGXFsTbQONMQerYsgMjze0 MiR/9FjmO/av4z2gPw1c3pmJe4wN3woLbw27WV1vDKmZC3MRTMeWjO9d3GEEqydMDMge BC9HxwJ82xbTtILeZ+ipdENl6MZNpggB/shpB89q6rcadLKI5YuVavgEAoOVnyti08VF BGTXdjugMxl98DDrukFRPvFQ6HuGADMB2htHK7x4eDz/wKghSht3nkJjgaj8SA9LJn2D q6nOBQxpwNCOjr+X+N33s24QOkbEqnkrfCM6z3L1T4NPcWvJUZAlwl+As3ZWWtQwJzbe +w6A== X-Gm-Message-State: AOAM530k74LFH1CMmY3BGxSkrwEefw9n+cyGTVJIskC17MgJB8NF9oVH MdBlH4KejX1wl91VMxh+nDGKKg== X-Received: by 2002:adf:e843:: with SMTP id d3mr14758931wrn.56.1617357938402; Fri, 02 Apr 2021 03:05:38 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id v18sm15466618wrf.41.2021.04.02.03.05.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Apr 2021 03:05:38 -0700 (PDT) From: Bryan O'Donoghue To: stanimir.varbanov@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, mchehab@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: bryan.odonoghue@linaro.org, dikshita@codeaurora.org, jonathan@marek.ca, vgarodia@codeaurora.org Subject: [PATCH v3 21/25] media: venus: helpers: Add internal buffer list for v6 Date: Fri, 2 Apr 2021 11:06:44 +0100 Message-Id: <20210402100648.1815854-22-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> References: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Dikshita Agarwal - Internal buffers required by v6 are different than v4, add new list of internal buffers for v6. - Differentiate encoder/decoder buffers for 6xx Signed-off-by: Dikshita Agarwal Signed-off-by: Bryan O'Donoghue --- drivers/media/platform/qcom/venus/helpers.c | 13 ++++++++++++- drivers/media/platform/qcom/venus/hfi_helper.h | 9 ++++++--- .../media/platform/qcom/venus/hfi_plat_bufs_v6.c | 4 ++-- 3 files changed, 20 insertions(+), 6 deletions(-) -- 2.30.1 diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c index 2515a2225614..8b08632b0296 100644 --- a/drivers/media/platform/qcom/venus/helpers.c +++ b/drivers/media/platform/qcom/venus/helpers.c @@ -279,13 +279,24 @@ static const unsigned int intbuf_types_4xx[] = { HFI_BUFFER_INTERNAL_PERSIST_1, }; +static const unsigned int intbuf_types_6xx[] = { + HFI_BUFFER_INTERNAL_SCRATCH(HFI_VERSION_6XX), + HFI_BUFFER_INTERNAL_SCRATCH_1(HFI_VERSION_6XX), + HFI_BUFFER_INTERNAL_SCRATCH_2(HFI_VERSION_6XX), + HFI_BUFFER_INTERNAL_PERSIST, + HFI_BUFFER_INTERNAL_PERSIST_1, +}; + int venus_helper_intbufs_alloc(struct venus_inst *inst) { const unsigned int *intbuf; size_t arr_sz, i; int ret; - if (IS_V4(inst->core)) { + if (IS_V6(inst->core)) { + arr_sz = ARRAY_SIZE(intbuf_types_6xx); + intbuf = intbuf_types_6xx; + } else if (IS_V4(inst->core)) { arr_sz = ARRAY_SIZE(intbuf_types_4xx); intbuf = intbuf_types_4xx; } else { diff --git a/drivers/media/platform/qcom/venus/hfi_helper.h b/drivers/media/platform/qcom/venus/hfi_helper.h index 6b524c7cde5f..f367f43c9fb7 100644 --- a/drivers/media/platform/qcom/venus/hfi_helper.h +++ b/drivers/media/platform/qcom/venus/hfi_helper.h @@ -395,11 +395,14 @@ #define HFI_BUFFER_INTERNAL_PERSIST 0x4 #define HFI_BUFFER_INTERNAL_PERSIST_1 0x5 #define HFI_BUFFER_INTERNAL_SCRATCH(ver) \ - (((ver) == HFI_VERSION_4XX) ? 0x6 : 0x1000001) + (((ver) == HFI_VERSION_4XX || \ + (ver) == HFI_VERSION_6XX) ? 0x6 : 0x1000001) #define HFI_BUFFER_INTERNAL_SCRATCH_1(ver) \ - (((ver) == HFI_VERSION_4XX) ? 0x7 : 0x1000005) + (((ver) == HFI_VERSION_4XX || \ + (ver) == HFI_VERSION_6XX) ? 0x7 : 0x1000005) #define HFI_BUFFER_INTERNAL_SCRATCH_2(ver) \ - (((ver) == HFI_VERSION_4XX) ? 0x8 : 0x1000006) + (((ver) == HFI_VERSION_4XX || \ + (ver) == HFI_VERSION_6XX) ? 0x8 : 0x1000006) #define HFI_BUFFER_EXTRADATA_INPUT(ver) \ (((ver) == HFI_VERSION_4XX) ? 0xc : 0x1000002) #define HFI_BUFFER_EXTRADATA_OUTPUT(ver) \ diff --git a/drivers/media/platform/qcom/venus/hfi_plat_bufs_v6.c b/drivers/media/platform/qcom/venus/hfi_plat_bufs_v6.c index d43d1a53e72d..776581b99cd3 100644 --- a/drivers/media/platform/qcom/venus/hfi_plat_bufs_v6.c +++ b/drivers/media/platform/qcom/venus/hfi_plat_bufs_v6.c @@ -1233,7 +1233,7 @@ static int bufreq_dec(struct hfi_plat_buffers_params *params, u32 buftype, } else if (buftype == HFI_BUFFER_INTERNAL_PERSIST_1) { bufreq->size = dec_ops->persist1(); } else { - return -EINVAL; + bufreq->size = 0; } return 0; @@ -1301,7 +1301,7 @@ static int bufreq_enc(struct hfi_plat_buffers_params *params, u32 buftype, } else if (buftype == HFI_BUFFER_INTERNAL_PERSIST) { bufreq->size = enc_ops->persist(); } else { - return -EINVAL; + bufreq->size = 0; } return 0; From patchwork Fri Apr 2 10:06:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 414346 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1285243jai; Fri, 2 Apr 2021 03:08:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSa8Mvm9A2gZdnKIGU0AjMsGKf2WKhqPJn2sMyAM4IjMLCaTo04xtxKYFm0SxAo4RrK9dR X-Received: by 2002:a92:d58a:: with SMTP id a10mr10645983iln.63.1617358080464; Fri, 02 Apr 2021 03:08:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617358080; cv=none; d=google.com; s=arc-20160816; b=p2wiRsQM72B3fn0pcjHfmbboTfJwOYPspFUssnFcrCKjbD8chxrLMoPPUSwUTNFdaj hYi80X5a1Gs0GpBKK09XWAWbqe9lQri3v7UZV/7CMmKhC8KAIMACB4lpbvUg40GlCWFI UWbQeuG1gty9XMJAabEO4F/Ig6jEtbNkSFbNYOvxJpxt9dk31oOm+nWGlHqtqAqmZbyg vFSFpQJpPdxz+KrYUyNmBm2nzbMXUKjuTn/5pmaMJExUwouz9UD144iNZ6okmbRY6fhb HbJCUEF1zSHRG7O4yyTBpE63NzNw1TY6ApnfRE45l9bkQ/CMQx7e9hEHG4KoFCoq3/FP Y8pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wJQGwwenDE4M9hF0EuZkXWJRv0JXArf59fuYPMuIEUY=; b=g9voEmvhW0cmw3ayHyOUrZ2duTiJjg70wFzJKDjk7AycGoroiDbrPxb4uAS5CVWzNd hyMGg7MgV73WqCPAxHkng4jkrzStN0Xn76BKbz5+064cwbZop4xrt3Pl4fB3uzN07oPY yTOLQosN8/BXMxPfuYas/zXU08fDGaMn2KgEKKvV6DJLgDyqbzidDelcDlOa8E7bk7HT 84hIlgEUra88EoRWwcif/+PL5swk3Di71uv5jhq6pjjZQn2Dw6VShFTUmRXbF4FmPW1P vsebZzeUvrHKNSvYCFn9dM+4YBx6sq3DRnbVzzymIZCaKlW4DbEJo7wRc12Cc3yOH6m7 SCrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fGBQ6tGj; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g2si6942838ile.30.2021.04.02.03.08.00; Fri, 02 Apr 2021 03:08:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fGBQ6tGj; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234911AbhDBKFo (ORCPT + 17 others); Fri, 2 Apr 2021 06:05:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235014AbhDBKFl (ORCPT ); Fri, 2 Apr 2021 06:05:41 -0400 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6F94C0613E6 for ; Fri, 2 Apr 2021 03:05:40 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id j7so4326175wrd.1 for ; Fri, 02 Apr 2021 03:05:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=wJQGwwenDE4M9hF0EuZkXWJRv0JXArf59fuYPMuIEUY=; b=fGBQ6tGjniRbyk5Ru/L07+G7FxCdFBx7NIKdnTLLi7r5Y5bmb+nLnpjdu8T1R4swS7 YJrzYdyF5I7YxugYx8FT9maxoA58rIGZgZTbG254a68WhgpPxVkSi2uNWgM8bqeGQcLV 1+uO4+kwTz8cPtQT0/MDXVmwN5azRblS4Y9ZobTUcNILhHJT6VvNsFpvB638ahy30hVZ fCrZ8e31Ga5bR1BBo3OlWlmBhiC2JIx/XmedATiVQkpGApBbkKNJqcLJNISCkM+u4SSh dwS3YK9Sn9XtOUes2ujSBCebk7tS1RahXh6PW1ZJl0JDoxws3VlCgaXyVWZ+Q7LO97zb 3FUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=wJQGwwenDE4M9hF0EuZkXWJRv0JXArf59fuYPMuIEUY=; b=t6KAkXgEWvXU58o3uvswwhAVfGx0FJhZrUwJl0ePLfFxWFpbAMIq4tmYAiRQMMZql3 kMuEIlNDwXyUgpOqe7pOtycM/SAbdqTD4gXl11aGXRDl4XUeHS0knobqbK1IK0ZEWG9R 6q6pbafbFQuX2cCKOS2NBI5y3/oWzNw55VeDrFEmz5dqRJ6xVt93mAFb6od3S183Guiu o9NOp4HVPv5b94jovfW3yniMiOy8rwzoDqsYY/gZPsDm5p/JNAvVYgbj4fMwPoZCNfvl UcEIqBu5kxew+gbTgdkqSO39Nb9mbKv77CvuhxIvN4Ha4zBzNjFZs7GbhKwLj7izig8J JFKw== X-Gm-Message-State: AOAM532RFksiJyHhGT20ajfsERZ+l+cgW1GAoUr/A2SiO+CcE27M6yNf WFFzXT/7A4XlwioDBghlPdxnNw== X-Received: by 2002:adf:9261:: with SMTP id 88mr14135985wrj.270.1617357939429; Fri, 02 Apr 2021 03:05:39 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id v18sm15466618wrf.41.2021.04.02.03.05.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Apr 2021 03:05:39 -0700 (PDT) From: Bryan O'Donoghue To: stanimir.varbanov@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, mchehab@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: bryan.odonoghue@linaro.org, dikshita@codeaurora.org, jonathan@marek.ca, vgarodia@codeaurora.org Subject: [PATCH v3 22/25] media: venus: helpers, hfi, vdec: Set actual plane constraints to FW Date: Fri, 2 Apr 2021 11:06:45 +0100 Message-Id: <20210402100648.1815854-23-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> References: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Dikshita Agarwal Set actual plane alignments to FW with HFI_PROPERTY_PARAM_UNCOMPRESSED_PLANE_ACTUAL_CONSTRAINTS_INFO to calculate correct buffer size. bod: Fixed fall-through error in pkt_session_set_property_6xx() switch Ensure setting format constraints on 6xx only Signed-off-by: Dikshita Agarwal Signed-off-by: Bryan O'Donoghue Acked-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/helpers.c | 24 ++++++++++++++++++++ drivers/media/platform/qcom/venus/helpers.h | 1 + drivers/media/platform/qcom/venus/hfi_cmds.c | 13 +++++++++++ drivers/media/platform/qcom/venus/vdec.c | 4 ++++ 4 files changed, 42 insertions(+) -- 2.30.1 diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c index 8b08632b0296..77ffb8fbb47f 100644 --- a/drivers/media/platform/qcom/venus/helpers.c +++ b/drivers/media/platform/qcom/venus/helpers.c @@ -1103,6 +1103,30 @@ int venus_helper_set_work_mode(struct venus_inst *inst, u32 mode) } EXPORT_SYMBOL_GPL(venus_helper_set_work_mode); +int venus_helper_set_format_constraints(struct venus_inst *inst) +{ + const u32 ptype = HFI_PROPERTY_PARAM_UNCOMPRESSED_PLANE_ACTUAL_CONSTRAINTS_INFO; + struct hfi_uncompressed_plane_actual_constraints_info pconstraint; + + if (!IS_V6(inst->core)) + return 0; + + pconstraint.buffer_type = HFI_BUFFER_OUTPUT2; + pconstraint.num_planes = 2; + pconstraint.plane_format[0].stride_multiples = 128; + pconstraint.plane_format[0].max_stride = 8192; + pconstraint.plane_format[0].min_plane_buffer_height_multiple = 32; + pconstraint.plane_format[0].buffer_alignment = 256; + + pconstraint.plane_format[1].stride_multiples = 128; + pconstraint.plane_format[1].max_stride = 8192; + pconstraint.plane_format[1].min_plane_buffer_height_multiple = 16; + pconstraint.plane_format[1].buffer_alignment = 256; + + return hfi_session_set_property(inst, ptype, &pconstraint); +} +EXPORT_SYMBOL_GPL(venus_helper_set_format_constraints); + int venus_helper_set_num_bufs(struct venus_inst *inst, unsigned int input_bufs, unsigned int output_bufs, unsigned int output2_bufs) diff --git a/drivers/media/platform/qcom/venus/helpers.h b/drivers/media/platform/qcom/venus/helpers.h index 351093845499..98106e6eee85 100644 --- a/drivers/media/platform/qcom/venus/helpers.h +++ b/drivers/media/platform/qcom/venus/helpers.h @@ -33,6 +33,7 @@ int venus_helper_set_output_resolution(struct venus_inst *inst, unsigned int width, unsigned int height, u32 buftype); int venus_helper_set_work_mode(struct venus_inst *inst, u32 mode); +int venus_helper_set_format_constraints(struct venus_inst *inst); int venus_helper_set_num_bufs(struct venus_inst *inst, unsigned int input_bufs, unsigned int output_bufs, unsigned int output2_bufs); diff --git a/drivers/media/platform/qcom/venus/hfi_cmds.c b/drivers/media/platform/qcom/venus/hfi_cmds.c index 558510a8dfc8..0bcd434e7876 100644 --- a/drivers/media/platform/qcom/venus/hfi_cmds.c +++ b/drivers/media/platform/qcom/venus/hfi_cmds.c @@ -1249,6 +1249,19 @@ pkt_session_set_property_6xx(struct hfi_session_set_property_pkt *pkt, pkt->data[0] = ptype; switch (ptype) { + case HFI_PROPERTY_PARAM_UNCOMPRESSED_PLANE_ACTUAL_CONSTRAINTS_INFO: { + struct hfi_uncompressed_plane_actual_constraints_info *in = pdata; + struct hfi_uncompressed_plane_actual_constraints_info *info = prop_data; + + info->buffer_type = in->buffer_type; + info->num_planes = in->num_planes; + info->plane_format[0] = in->plane_format[0]; + if (in->num_planes > 1) + info->plane_format[1] = in->plane_format[1]; + + pkt->shdr.hdr.size += sizeof(u32) + sizeof(*info); + break; + } case HFI_PROPERTY_CONFIG_HEIC_FRAME_QUALITY: { struct hfi_heic_frame_quality *in = pdata, *cq = prop_data; diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index 5cefa396f2b5..fdc9984acb70 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -706,6 +706,10 @@ static int vdec_output_conf(struct venus_inst *inst) if (ret) return ret; + ret = venus_helper_set_format_constraints(inst); + if (ret) + return ret; + if (inst->dpb_fmt) { ret = venus_helper_set_multistream(inst, false, true); if (ret) From patchwork Fri Apr 2 10:06:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 414348 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1285264jai; Fri, 2 Apr 2021 03:08:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyc05gQKQdZnf7EqdHGT10UMrrOzboaaXIb4zENaDAwfjtVXG00dJHZdbcewcHzelbKeHfZ X-Received: by 2002:a5d:9e03:: with SMTP id h3mr10555239ioh.94.1617358081871; Fri, 02 Apr 2021 03:08:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617358081; cv=none; d=google.com; s=arc-20160816; b=P8HO7U9eYTGyR4JvsG+Ev4rpszPD7KQfTF4mUOZqIGkxOgWmOrd5UjlBDpmF1Og7IR kKsHi0HQqC+35q1YPIb/Z5LEqvvPGoL+1BWAu0QjbHor5Sor7B7TxCDzWPUW5n3TSV79 LGvZRJRbe3JQI3ZSta3LEv8F1CR9ryn56eVnRmnTCDdLNbYRhPwgK7KaCfr1SPfLZW+u YCq/XQPZmGha3gJjONoKscZ4xO5DD+XeWpjYAH+CRrpMDkIGkTETCIEXmLlFd3XYgWpN vvPzHs5bJxq1qA5KMiQMVxZE/KmFZI8IWxjn8u55d7F0D5TrMkjwKdJQTTEbZmsDCMHz Qfkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=aDqQvCRa3kdfOyvfWacjxvKlUGJz1tew7Y5b7q0Z5aE=; b=O5VdZYDXdclXNW7peSJWJZD7qYSk95BRSj79FzJwZci4fJQY0OEy1kPJTsXn3zCgTE cYT4u5AdT7Hdck0tpiieFJTanPUoIEqlmzzo0nx8Nljarh4B3PcJ/HDyF6Mda/4V3uZr 4pFw1FEkPC1AKWdsup8VpOMOkTU3ELkBuGlEYzDWlL2toCR1KpsSnd3BLxC44mtG+4fB oWCOUCV20BbvQy+qDzcjhMNrVIRBt8SoE9tLJF7aF+SzLmRW235aDdDWlONpQGP5z1+S QR9MmXR+irLXITYUx6Uo5yEmBT/YSzqCBhdJTvf5uDXw2l9M7vLowbYE6PrEq5nfKteW 9dNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YFH9+bBC; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g2si6942838ile.30.2021.04.02.03.08.01; Fri, 02 Apr 2021 03:08:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YFH9+bBC; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235020AbhDBKFp (ORCPT + 17 others); Fri, 2 Apr 2021 06:05:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235043AbhDBKFn (ORCPT ); Fri, 2 Apr 2021 06:05:43 -0400 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAD7BC0613E6 for ; Fri, 2 Apr 2021 03:05:41 -0700 (PDT) Received: by mail-wr1-x430.google.com with SMTP id x16so4308608wrn.4 for ; Fri, 02 Apr 2021 03:05:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=aDqQvCRa3kdfOyvfWacjxvKlUGJz1tew7Y5b7q0Z5aE=; b=YFH9+bBCpogKNSZmqzps1VvtLkavlabqgxOt0LB78PW3SnOfwPQxTlkmmp2aR+zia5 vtqBYDI9+9jEuKRr7XtCEdMqSaNsf288IA0jNwt+fkuE5f29qaj96Ix8v27GESHjXr0i adIrkXAkeCh94eqyehP1mo9GWO5GSzuNLWALCHG/VyKO1E7DXgqrYTsc3N/MvryaZUzi 0O39INlDGMPCmZzPCqb89WpR9GGhN4TW/qcmBI0guKPT9wux7N38xMUFkzAI7Scr25xs 1IFZr0fAdRfGwm9a+tcSKOrl4lVd9plNA53r2w0fiJaaC8x/HcGdVU7zd1cBfF2c1k0J URmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=aDqQvCRa3kdfOyvfWacjxvKlUGJz1tew7Y5b7q0Z5aE=; b=LW/f/L8fVhdK5QGsTd5CALTUbFESrde+O00/6QrT5WXzyirb1k0qfd8+++/9TAnOqv AuR0Ik5No2ngNn958v2cbCjAcuot+VGA8pjZSQ5+fxB8odpOpiaxU0Kt6ZU22Z943ZQs /SJhIXHoAhyN5S7flhc0ZLv+DvPhKoGlyv80WR6co8ZzNjCSLMJ1c/87WTo4MhVHF7eO 1wcKB/c/ukqb6yyDYmfI6irKjEMo0q/Xrw9uwWIio6ITR0tqgEL9jdRB0nrYtQRIuf00 gly2V3e1wUPcCOypyEYWFcBuD1dKbziEHceAvYiWFF8Ir6xR0rCxnahqbawsPe4oV3mC HTVQ== X-Gm-Message-State: AOAM533RnZDBm7T2ebLF4mHx9oytrILOUw28tzlgJniaCBlFau7OVjrr s59Zjp0B248dMxYyA+qubTYv3w== X-Received: by 2002:a05:6000:12c5:: with SMTP id l5mr14153031wrx.208.1617357940412; Fri, 02 Apr 2021 03:05:40 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id v18sm15466618wrf.41.2021.04.02.03.05.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Apr 2021 03:05:40 -0700 (PDT) From: Bryan O'Donoghue To: stanimir.varbanov@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, mchehab@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: bryan.odonoghue@linaro.org, dikshita@codeaurora.org, jonathan@marek.ca, vgarodia@codeaurora.org Subject: [PATCH v3 23/25] media: venus: hfi: Increase plat_buf_v6 o/p buffer count. Date: Fri, 2 Apr 2021 11:06:46 +0100 Message-Id: <20210402100648.1815854-24-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> References: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Dikshita Agarwal Presently, minimum buffer count for output buffers for h264 & hevc codec is kept as 8 which might not be sufficient for few use cases so increasing the value to 18. Signed-off-by: Dikshita Agarwal Signed-off-by: Bryan O'Donoghue Acked-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/hfi_plat_bufs_v6.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.30.1 diff --git a/drivers/media/platform/qcom/venus/hfi_plat_bufs_v6.c b/drivers/media/platform/qcom/venus/hfi_plat_bufs_v6.c index 776581b99cd3..4979d493f4d9 100644 --- a/drivers/media/platform/qcom/venus/hfi_plat_bufs_v6.c +++ b/drivers/media/platform/qcom/venus/hfi_plat_bufs_v6.c @@ -1159,7 +1159,7 @@ static int output_buffer_count(u32 session_type, u32 codec) case V4L2_PIX_FMT_H264: case V4L2_PIX_FMT_HEVC: default: - output_min_count = 8; + output_min_count = 18; break; } } else { From patchwork Fri Apr 2 10:06:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 414349 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1285275jai; Fri, 2 Apr 2021 03:08:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwMnMFxFZwyU9aSYn1gs7cVV2NTQH9f6b8nN/fG8lrKc1yCDtLYJQagVfb0DCtZTE3/HLYx X-Received: by 2002:a92:7b05:: with SMTP id w5mr10173336ilc.232.1617358082265; Fri, 02 Apr 2021 03:08:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617358082; cv=none; d=google.com; s=arc-20160816; b=J95WWQwdxVEbU1Xxz/IXJDgDh8oLPOE0zmVOkmypnwpPk/t6OoOIcPMTALvd84dHkv fsXKaJIp9Rod1eEAYHroHfhCJ0UYwxKhy5kSg4OOMPP0YCbrYBeWGSMnFkGVZCSY4qC2 2slSyx/ZJCaCbWzE+Fe/N7zR4mKhARxt57LFdMflGd31lee6W4ltsiQevXhxFaAK7H7J BZARuO9Y1/BSTnJQKAzdGAV8v2qfCv7MzHCiAyyJMZOH9VYjjH5xoapPLyvgPgGw9xAY IwhhoiygtPXYo6cTELd0gDrJ/m6l4d22INKl4iQ76CaSWQ55qI+MjqijrR3cVjWpTCqh c64g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=sHcyq6p4bV6JWtCYk8/oVqJVtf84Wh6rvRJgeAjFSgk=; b=pSgrTD76vMb3rtREgjyulBV5ncjPx688XE2xPqDn7irmLAnAZ1LT7WmXVyGNDpCtpS pZ/H/tUyTNUuiz+TgnVvSXLme48OwHy+EZbxWqhHD1SYT3PEx+Cgb6rkIkaHEptY8C9H yC7HdsOWFQdOqhinkkNNf4SlVBRlNBwpQorGd4VuPTA0r5yM5rcJ6QlAjZdNit2x7/Cv 9HGFl7VfWf2P50pct52XfySMVvbhb1+8yaswwjjd9y2oTl9YyFmlElx4Cys7hnp3WfXA xJx6abyCy27H0xm/0d3Qy2/EiJQzlpg53GuepAUCTmcPwS2xrp4MfIfhoV6m8i1uN6US KFNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ioxqiwum; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g2si6942838ile.30.2021.04.02.03.08.02; Fri, 02 Apr 2021 03:08:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ioxqiwum; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235043AbhDBKFq (ORCPT + 17 others); Fri, 2 Apr 2021 06:05:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234902AbhDBKFn (ORCPT ); Fri, 2 Apr 2021 06:05:43 -0400 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91488C061788 for ; Fri, 2 Apr 2021 03:05:42 -0700 (PDT) Received: by mail-wr1-x42f.google.com with SMTP id k8so4317705wrc.3 for ; Fri, 02 Apr 2021 03:05:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sHcyq6p4bV6JWtCYk8/oVqJVtf84Wh6rvRJgeAjFSgk=; b=ioxqiwumFisDjG9W10J1nRHr4V5Sjv0Ig7dZ8dMe5fgWudPhkAt999c1/aTEnRIBeQ R55XJsQqHKtb6enFV8ZTC7nL4MXH3yjWYZ6MBo/cdIyTvYkfRE0uZvwxq5NqHa4LeKzJ k0lbPU71c8n9HQ3L0fZCgEoY+qM+nL1T6PmpqmleObBbOytBSGVRwtqIuznEMZwTixL2 uo5sharzYNGQf97gS+AunD9FgAwjB5n+JAyRI5kmfbjQ+Oh3Q4hAoqGfvfMZYzd4mAYy n3YJPppo/tp6Lwb8ZlJlvAeMQ4ftgF7h/1lsEolZXHM9Qr/4NE2lJwHGzZfDdNl9E8OD rrag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sHcyq6p4bV6JWtCYk8/oVqJVtf84Wh6rvRJgeAjFSgk=; b=akWdv5iaTExRUzGZC1ejtP4n1D9SH3JkHCX6kob69HHGvQXwEqTRYenA+irE0skkbT z/1I8mDodjfD4e716tfoxlkqyGgvsD6pePY4uFi43Y9SWsPmW7f2pg6aj/RWXEAFuWxC k0gJDQOfvUyOVG38hRT7ZkQhaWBHEdh4iRIh3s/haLCfKpgFG8jG3kCrvWb+I2ztUP2A lzCb9JmYvd8B/DQfQHKOS6HIXltvjeMKrVws8ZeTirCAQXq0nQELS6JoLnhNVjuzaRKK LFh841VNoM+ZJaXzUz+3i0fC81wvJ8Uxtwak0MD51FMErlLGDLoDc2ymp8jW5yd7jJQo 4kDA== X-Gm-Message-State: AOAM531skuxW8DmDDpO5oj7JhuGW15wvaPqzCfR0GgQCjhgDXO9/hlES Hg+oCxvUp+UdWOUj4aF0t4gwsg== X-Received: by 2002:a5d:6cd2:: with SMTP id c18mr14499212wrc.330.1617357941362; Fri, 02 Apr 2021 03:05:41 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id v18sm15466618wrf.41.2021.04.02.03.05.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Apr 2021 03:05:41 -0700 (PDT) From: Bryan O'Donoghue To: stanimir.varbanov@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, mchehab@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: bryan.odonoghue@linaro.org, dikshita@codeaurora.org, jonathan@marek.ca, vgarodia@codeaurora.org Subject: [PATCH v3 24/25] media: venus: helper: Decide work mode Date: Fri, 2 Apr 2021 11:06:47 +0100 Message-Id: <20210402100648.1815854-25-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> References: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Dikshita Agarwal Decide work mode for encoder and decoder based on different use-cases. Signed-off-by: Dikshita Agarwal Signed-off-by: Bryan O'Donoghue --- drivers/media/platform/qcom/venus/helpers.c | 29 ++++++++++++++++++++- drivers/media/platform/qcom/venus/helpers.h | 2 +- drivers/media/platform/qcom/venus/vdec.c | 2 +- drivers/media/platform/qcom/venus/venc.c | 2 +- 4 files changed, 31 insertions(+), 4 deletions(-) -- 2.30.1 diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c index 77ffb8fbb47f..b813d6dba481 100644 --- a/drivers/media/platform/qcom/venus/helpers.c +++ b/drivers/media/platform/qcom/venus/helpers.c @@ -18,6 +18,9 @@ #include "hfi_platform.h" #include "hfi_parser.h" +#define NUM_MBS_720P (((1280 + 15) >> 4) * ((720 + 15) >> 4)) +#define NUM_MBS_4K (((4096 + 15) >> 4) * ((2304 + 15) >> 4)) + struct intbuf { struct list_head list; u32 type; @@ -1090,14 +1093,38 @@ int venus_helper_set_output_resolution(struct venus_inst *inst, } EXPORT_SYMBOL_GPL(venus_helper_set_output_resolution); -int venus_helper_set_work_mode(struct venus_inst *inst, u32 mode) +static u32 venus_helper_get_work_mode(struct venus_inst *inst) +{ + u32 mode; + u32 num_mbs; + + mode = VIDC_WORK_MODE_2; + if (inst->session_type == VIDC_SESSION_TYPE_DEC) { + num_mbs = (ALIGN(inst->height, 16) * ALIGN(inst->width, 16)) / 256; + if (inst->hfi_codec == HFI_VIDEO_CODEC_MPEG2 || + inst->pic_struct != HFI_INTERLACE_FRAME_PROGRESSIVE || + num_mbs <= NUM_MBS_720P) + mode = VIDC_WORK_MODE_1; + } else { + num_mbs = (ALIGN(inst->out_height, 16) * ALIGN(inst->out_width, 16)) / 256; + if (inst->hfi_codec == HFI_VIDEO_CODEC_VP8 && + num_mbs <= NUM_MBS_4K) + mode = VIDC_WORK_MODE_1; + } + + return mode; +} + +int venus_helper_set_work_mode(struct venus_inst *inst) { const u32 ptype = HFI_PROPERTY_PARAM_WORK_MODE; struct hfi_video_work_mode wm; + u32 mode; if (!IS_V4(inst->core) && !IS_V6(inst->core)) return 0; + mode = venus_helper_get_work_mode(inst); wm.video_work_mode = mode; return hfi_session_set_property(inst, ptype, &wm); } diff --git a/drivers/media/platform/qcom/venus/helpers.h b/drivers/media/platform/qcom/venus/helpers.h index 98106e6eee85..e6269b4be3af 100644 --- a/drivers/media/platform/qcom/venus/helpers.h +++ b/drivers/media/platform/qcom/venus/helpers.h @@ -32,7 +32,7 @@ int venus_helper_set_input_resolution(struct venus_inst *inst, int venus_helper_set_output_resolution(struct venus_inst *inst, unsigned int width, unsigned int height, u32 buftype); -int venus_helper_set_work_mode(struct venus_inst *inst, u32 mode); +int venus_helper_set_work_mode(struct venus_inst *inst); int venus_helper_set_format_constraints(struct venus_inst *inst); int venus_helper_set_num_bufs(struct venus_inst *inst, unsigned int input_bufs, unsigned int output_bufs, diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index fdc9984acb70..0fe4863371e2 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -655,7 +655,7 @@ static int vdec_output_conf(struct venus_inst *inst) u32 ptype; int ret; - ret = venus_helper_set_work_mode(inst, VIDC_WORK_MODE_2); + ret = venus_helper_set_work_mode(inst); if (ret) return ret; diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c index 505d092dc433..83425fa8df2d 100644 --- a/drivers/media/platform/qcom/venus/venc.c +++ b/drivers/media/platform/qcom/venus/venc.c @@ -550,7 +550,7 @@ static int venc_set_properties(struct venus_inst *inst) u32 profile, level; int ret; - ret = venus_helper_set_work_mode(inst, VIDC_WORK_MODE_2); + ret = venus_helper_set_work_mode(inst); if (ret) return ret; From patchwork Fri Apr 2 10:06:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 414350 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp1285289jai; Fri, 2 Apr 2021 03:08:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwep5VCxhkXlDsbfPjjp9nk3RlT6zGLCUP/rqdg196aQcA1Sz2935BD1a2DzTmpxBMpRsNa X-Received: by 2002:a92:d58a:: with SMTP id a10mr10646106iln.63.1617358083245; Fri, 02 Apr 2021 03:08:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617358083; cv=none; d=google.com; s=arc-20160816; b=gP2hwU4TXr5NiQVKBcazAWF/wYm/QYe9GzIEoPb06C+vpE0L7eXW6jQEVAswSQ/0LJ k3qxPVOKc45KkB2h07RsV7/dh/RPYLUx3zX9zmSmOxmxt4i+ItrI/Gw0Xs+c3+EJ9ftb eNOFK2LHEt+Aw5bWx2RD57bL1tBUwqnXZ4TG3js4AAMLGr0xNq0rr/oxjczJS+wIuFdZ 4LWVwR3IgBciOgSkkp/ZTZemPdm0Zg6vStDli+a7I0N+lC3wdSVWklYiX2T9LVk/GTut PB6wsHAcwJicnAECTci3Va1tWUuw36h4QnHHwgR2oZTwGjmYZeDqalrVxi9EJIS5Ugv2 i/RA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mdYuWwgCAgpe/tpCk/WPHQPCQeWl/PCSYj7cNktgbbg=; b=nYi6sarkAgc82+u4SOgBRlvHQD8CqXO0M1SJMf+VwsaECl6sZrIooB1c59mEknDeXU sO9wuul1Vb/LKkpf+hdYPSlpo7ZpYhdVur8EwkaWAA5rs7s/YMxm7QQIgbFzXEypOCYy /wUwZsGV2Y4ZJs4Cljoe9pGZksM6HQ1XGKHWbd3jaTq3M7KCF6Hd3DL99UVKNmECu2Ed YOhE/J9DfZmr5xrp3Om4+K+QTiH6rPQT9DRhRAKL0qLd8o7Lsh35gGkmu2xaSbWaYUd8 IflkIcNIX80gwGmF6zAPb2ltrmwL2/5kCo1OQn3PJ21KrGuAh7TWSuhBXnhwnXL4wUut K9sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IQjVngta; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g2si6942838ile.30.2021.04.02.03.08.03; Fri, 02 Apr 2021 03:08:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IQjVngta; spf=pass (google.com: domain of linux-arm-msm-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235162AbhDBKFq (ORCPT + 17 others); Fri, 2 Apr 2021 06:05:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235077AbhDBKFo (ORCPT ); Fri, 2 Apr 2021 06:05:44 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7982AC0613E6 for ; Fri, 2 Apr 2021 03:05:43 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id x13so4293058wrs.9 for ; Fri, 02 Apr 2021 03:05:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mdYuWwgCAgpe/tpCk/WPHQPCQeWl/PCSYj7cNktgbbg=; b=IQjVngtaEmv8R+bycJCfbeb4LCx60QpT0m+RAJ7LHyxaDRtdLhSMJhkSHcwO4e8XgA qr/emy+/hycZKPNrpCfCLWFZ7C2KdgVGXEoJTuuISSotKViPbeDBZ21AmWYhZ+45p0vq a+wo97dJNDZqIuflUgjpLT1sAu3WZT0y64ZyuweW5oyW3SFNCjLMrfX2hqf2zeOMkR3b K0Vo7cD7WjFu46mC7zjzgnj9GjBsDSMyX9rXFf1FTmKe3ltntKD0T10mu3Cw/5g5b2W8 9lSL+1di3+oO+MKHIDOmaDQKTqpfstQXJH0vJD3oty4AfqU/WXthLzC8A5YcYrGHk/U6 /pZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mdYuWwgCAgpe/tpCk/WPHQPCQeWl/PCSYj7cNktgbbg=; b=KvKOjeFrL0Zipo0E4pDkQKP6G23QEc8ot/et3KJ961DQSgGXr/0VVI0IZNdF0pTAcG fkp4CTS49NpC1UnWUIEwPyKZC79WxKqlR/GS+2FAhqsIikVnoQrMeEbz+nvoen85XbIv ToGCyublxoVpdIC9BepSHUuDaz0md+jY7fhg+FRfwnHCLQwcalanfiHtbjBG8fB4eDnT sUUFTTadljPOevFqx16fR5K0iAfUX4ejcvf/HRtzZRhBNz6Ub9Y53e2u2BGUD+16hNSo 3mnhgLJixxHznbMrijHDTC8lOoPBFo8Qa4sBp/mInc5wDX3e4PDg09bWCBfYzVUrKv8c DRiA== X-Gm-Message-State: AOAM531Q5Z9NqqhA1zv2wAAD2IjYbbTB9zqsaS8/qeB7LDWjevfACoeG gYRrswF8YyNfS0ks5eXZSnob6Q== X-Received: by 2002:a05:6000:1acd:: with SMTP id i13mr14378546wry.48.1617357942265; Fri, 02 Apr 2021 03:05:42 -0700 (PDT) Received: from sagittarius-a.chello.ie (188-141-3-169.dynamic.upc.ie. [188.141.3.169]) by smtp.gmail.com with ESMTPSA id v18sm15466618wrf.41.2021.04.02.03.05.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Apr 2021 03:05:41 -0700 (PDT) From: Bryan O'Donoghue To: stanimir.varbanov@linaro.org, agross@kernel.org, bjorn.andersson@linaro.org, mchehab@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org Cc: bryan.odonoghue@linaro.org, dikshita@codeaurora.org, jonathan@marek.ca, vgarodia@codeaurora.org Subject: [PATCH v3 25/25] media: venus: vdec: Fix decoder cmd STOP issue Date: Fri, 2 Apr 2021 11:06:48 +0100 Message-Id: <20210402100648.1815854-26-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> References: <20210402100648.1815854-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org From: Stanimir Varbanov Fixes an issue when issuing a stop command to the controller, negating the following firmware error. "SFR message from FW: Exception: TID = Unknown IP = 0x3b7dc FA = 0x0 cause = 0x6" Signed-off-by: Stanimir Varbanov Signed-off-by: Bryan O'Donoghue Acked-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/hfi_cmds.c | 2 +- drivers/media/platform/qcom/venus/vdec.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) -- 2.30.1 diff --git a/drivers/media/platform/qcom/venus/hfi_cmds.c b/drivers/media/platform/qcom/venus/hfi_cmds.c index 0bcd434e7876..fb64046d1e35 100644 --- a/drivers/media/platform/qcom/venus/hfi_cmds.c +++ b/drivers/media/platform/qcom/venus/hfi_cmds.c @@ -254,7 +254,7 @@ int pkt_session_unset_buffers(struct hfi_session_release_buffer_pkt *pkt, int pkt_session_etb_decoder(struct hfi_session_empty_buffer_compressed_pkt *pkt, void *cookie, struct hfi_frame_data *in_frame) { - if (!cookie || !in_frame->device_addr) + if (!cookie) return -EINVAL; pkt->shdr.hdr.size = sizeof(*pkt); diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index 0fe4863371e2..04f457cbf631 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -515,7 +515,10 @@ vdec_decoder_cmd(struct file *file, void *fh, struct v4l2_decoder_cmd *cmd) fdata.buffer_type = HFI_BUFFER_INPUT; fdata.flags |= HFI_BUFFERFLAG_EOS; - fdata.device_addr = 0xdeadb000; + if (IS_V6(inst->core)) + fdata.device_addr = 0; + else + fdata.device_addr = 0xdeadb000; ret = hfi_session_process_buf(inst, &fdata);