From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D94F13438AD for ; Sun, 26 Jul 2026 05:51:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785045092; cv=none; b=AMkKMVJ/ljD0XrKgKMu1Y/bhfj4PiLk79B+7jU6LCv+CrQb+QTsnFLGtVoH22xzB0hpXtaaH7UmYt0ajy/1wmTZUWCQofOSggf+vIRuIFOCdt80CAzAOLm2QnzBlUNmhhj0NPQOI4mBD9OUOE+D2tAq3Tdv99hssCQ5TBefCluI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785045092; c=relaxed/simple; bh=xctMB7zWtsNKWMV1VkM1W4psFZeLFDtjGbZf1axO/1s=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=E2ciMsjamt+uwglw+tUQHvO+WEB3eNHwT//i3z++s1+7/a1rObgJ6BnAC9APGpvU66kbPw9ASVoBpqu2mfkCpCXcgaotpYwXZWvN3ahcxpYeZldz3XAzUyYpJBYYiFvtm3FLJXUGS3j5vb06/Pl9Na+SbA6CfMqZza01LR30k9k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=QXWIa6KR; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=H2OQrVZ9; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="QXWIa6KR"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="H2OQrVZ9" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66Q5RZrL4179394 for ; Sun, 26 Jul 2026 05:51:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= ujBFhuLzObIG8hL0QiA2NnXVcI/rC9wEjR2dBddaWwA=; b=QXWIa6KRIaygb2y/ 8Ld+6C/n2C6+P8lydkGq55C6S2uvwSqUeAQ8KzqFGSi4l/wCOLwudna1/FBZm3rq KHArYaJEIl50WovE/wcavoQJMFUc8EgbSaim3WleV1VfMK6DyPAZV6ziEAR0oVld RWjxmd4buYlQ3BuWBxyRQMdigf4luigG5H5cC47aiW8zgADsQBlByEPGjWlSOMXT cgD0QhLibFi/y2+4+Qy//KuUt7xaUR01MJaQrNNLpihIJ+EevsoPHyw5QEeBa6zJ 3HGDhFEkc1z/HYcH3Kj0pAuXMJqqPLB6pbsA0n5AiLS+OCAiRtUE47Jod8qrVTP2 gJpasQ== Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fmm572g0d-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sun, 26 Jul 2026 05:51:29 +0000 (GMT) Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-38e2237bc43so3022543a91.1 for ; Sat, 25 Jul 2026 22:51:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1785045089; x=1785649889; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=ujBFhuLzObIG8hL0QiA2NnXVcI/rC9wEjR2dBddaWwA=; b=H2OQrVZ9CX7p6rZMNzkWbDix8RJph/enQ8VjioVYBP59RfeK4jS06dM8DeC79tBnqf QeL4DwRU5fjUT/aEjbsLyuBjLrWBexiKfNgbTmYKTXvEFXOj+MXikRKN7OLLBBo1kEWW vVpUYbtD5/xE8m7aUoT0MLcHKhtnCn4rjH/9Y0Ao6kWiLN/GLR1wGRDiE3yZAOsi2N63 G/tiSP1MpfyqCB5UeY9ktLs2WxuDCKx6joFdFHo4ZOJln9S+D8IJcTTRHcSWAgDmq8A8 D+KvXqPqV2e0eq9YEZgmWre2ZCC/UDWDsweyfo0vviNj98achhA4ij8jFWqsIViyQJkT 4MFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785045089; x=1785649889; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=ujBFhuLzObIG8hL0QiA2NnXVcI/rC9wEjR2dBddaWwA=; b=oOh/cpHU+g65a+Q9kHU93HH4I6PJ7uE27iwpsgN0iiTvNGIKHK6lK1Q9DkqymT+SQ1 Hh43eqjQXJ64ziLvBi+zrqjbJkxVmiddwiNWCHfqRUTPlr9hYcpLv3o56dpaUiQNJidX SMyXNXudRNvtGtcJgVHIa3rG48yep/gjVeX6bRQwiBfMBfQokwVzXCvygEb7kHYAkiyv gKB5yqonoRp3D0PA++CM+saywhIwedoeL21CByPj1u/+5BY1tgXz/SsDSVCjt7PfdLFR f7NcTcN/DyZMRow1IUBVEdKRdexFAfEFN2xhOgbZKFzznrASrvEVDJM+MYWL3Xq7kTVW e2Fg== X-Gm-Message-State: AOJu0YwT85hABPjtHgisw0zCFp34hkFLf6vLKBjOiinTKO4YZ9ytSfyF j+bUjG4Ne4/lTUNv7apcsByruus0/H7dmcsRZrT2+Dz0IKojqLnlJx2yeAnelaEfOz1dnhWFf4/ +GiRYNPape82VpNO7tS39h3TSl3upJnGrkqjwbpqZ6yqL7Gy0p0WH40gtJsWxXAsIMsY= X-Gm-Gg: AR+sD11if5eXgFaz3ANax2M6sGn1w2P6nPfJfC/lbMvsyBshFmTDikHJJTtRXUWgojZ q9uwopNoVrjSXxhh14Y0QXGoykeW4/vuhgUow3WkD8SWTvJyBVX2EJ46Rk6Tlucf+MAhrxFJrle Yg9D7AKJ6YqycRveb4JQus4EuMY8z2Y6rHqdP52Bq4fl2BMMUu7A/f3cWl3csUFfTzWp24SGjk3 F0gfJzFgWlYGkUa/1+fL5NdFqvcyzFAm8Yv4fs8OuJRabQckuxHpsaI9tywJa/+TWQA/zB4Lqfx YNIBSVlYz+x+drmzNa8THVdr/mB7ucsmu1u169qQL9lRVrJHTAezAmfGdofmMitiWUuU+gXLJMj 2Yy38K5L0asSQz3gmInADurI9ghX9n6Xpag== X-Received: by 2002:a17:90b:4b0e:b0:38f:1e1a:515e with SMTP id 98e67ed59e1d1-38f294ea3aemr4573414a91.14.1785045088739; Sat, 25 Jul 2026 22:51:28 -0700 (PDT) X-Received: by 2002:a17:90b:4b0e:b0:38f:1e1a:515e with SMTP id 98e67ed59e1d1-38f294ea3aemr4573399a91.14.1785045088286; Sat, 25 Jul 2026 22:51:28 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.22.19]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-13d130f55c6sm67106334c88.15.2026.07.25.22.51.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Jul 2026 22:51:27 -0700 (PDT) From: Vishnu Reddy Date: Sun, 26 Jul 2026 11:19:38 +0530 Subject: [PATCH v10 08/14] media: iris: Add power sequence for glymur Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260726-glymur-v10-8-de451559e88b@oss.qualcomm.com> References: <20260726-glymur-v10-0-de451559e88b@oss.qualcomm.com> In-Reply-To: <20260726-glymur-v10-0-de451559e88b@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Dmitry Baryshkov , Mauro Carvalho Chehab , "Joerg Roedel (AMD)" , Will Deacon , Robin Murphy , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Stanimir Varbanov , Bjorn Andersson , Konrad Dybcio Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, Vishnu Reddy X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1785045024; l=9551; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=xctMB7zWtsNKWMV1VkM1W4psFZeLFDtjGbZf1axO/1s=; b=g61G7ZAsYEQbueTmvG/4bQGKT7jVJTe6VS5d9aoGSC/SfOZaIGdW49Zqwu2WLT9cXx1JCftMg PU+L2PMH1CsDRKJqL1nMZN8ybZMII2iJdFQ/xeDYMa52uEr5WbFY01e X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-Spam-Info: AW1haW4tMjYwNzI2MDA1NSBTYWx0ZWRfXx2qyq+76GaF9 1xbrPuB2LeuH2762JdabivTHVsr9j76FmuwTSt8PCN2D7LlfEPiwg/+Ol8v8vvOWiroX8E4UUkY HVN3WTR4Zvaf3gZcQPyKGfQU+QYcvf8= X-Proofpoint-GUID: w6jxRlQMu7s578BxjLBAgvWeFjaQZEnf X-Authority-Analysis: v=2.4 cv=FOErAeos c=1 sm=1 tr=0 ts=6a65a061 cx=c_pps a=0uOsjrqzRL749jD1oC5vDA==:117 a=fChuTYTh2wq5r3m49p7fHw==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=EUspDBNiAAAA:8 a=KEMIsV7w-JVzVVwjU5wA:9 a=QEXdDO2ut3YA:10 a=mQ_c8vxmzFEMiUWkPHU9:22 X-Proofpoint-ORIG-GUID: w6jxRlQMu7s578BxjLBAgvWeFjaQZEnf X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzI2MDA1NSBTYWx0ZWRfXxfK2JTvnT0lw MevEN9eo1554XWMVMIhsdfsGtATVKtNOafY+QklKWrhJqMqoUpXBsLnXoTR8aeMBoeg+2mUI/kF 2Q7rMRdtqMcVQCytPckPen0Fgd68woVu5/WZaUIPeYJHbk8HfiRCTZr922/61iahz+K+h57T8Wm yDqTxENYyd9bepfcJANf/lMvEPwDve8prQD6yqK+zfBrO5t5wZzjdo/pSmmRZtK+7MBWXqzAXji yBoXooSrGtWwJnwafy+QhOvD4kOtJS2YbmmjvUajWWAExWTkYDJ1Pzv5g77re2wqYFey7PPC2ad JT130P20RgqCWS3x0wzURqHhAH7py/6pR7oQhi/atuBiPmVejOZUmToBL3Wts0Ixx5mwdCVQSrz enfBSt2cObbGGafmKwNGiHTDDlEmoJSZEgV3JUuoW6wwt1wu49FJlz5egc78IwswNc2xcQUZNHo tLUJkL03KNcDv72Whuw== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-07-26_01,2026-07-24_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 lowpriorityscore=0 bulkscore=0 phishscore=0 adultscore=0 priorityscore=1501 spamscore=0 impostorscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607260055 Glymur platform has two video codec cores: vcodec0 and vcodec1. Both cores share a common clock source (video_cc_mvs0_clk_src) and the same power rails. The clock dividers between the source and the branch clocks are fixed. So when both cores are running, the source clock always runs at the highest frequency requested by either core. Since both cores share the same power rails, the power corner cannot be voted independently. Scaling one core's power corner up or down would directly affect the other, leading to under or over-voting. For these reasons, both cores should voted the clock and power rail must be based on the workload of both cores. Reviewed-by: Vikash Garodia Signed-off-by: Vishnu Reddy --- drivers/media/platform/qcom/iris/iris_vpu3x.c | 126 ++++++++++++++++++++- drivers/media/platform/qcom/iris/iris_vpu_common.h | 1 + .../platform/qcom/iris/iris_vpu_register_defines.h | 12 ++ 3 files changed, 134 insertions(+), 5 deletions(-) diff --git a/drivers/media/platform/qcom/iris/iris_vpu3x.c b/drivers/media/platform/qcom/iris/iris_vpu3x.c index 7cda94601555..1b08461ee4d7 100644 --- a/drivers/media/platform/qcom/iris/iris_vpu3x.c +++ b/drivers/media/platform/qcom/iris/iris_vpu3x.c @@ -17,14 +17,14 @@ #define NOC_HALT BIT(0) #define AON_WRAPPER_SPARE (AON_BASE_OFFS + 0x28) -static bool iris_vpu3x_hw_power_collapsed(struct iris_core *core) +static bool iris_vpu3x_hw_power_collapsed(struct iris_core *core, u32 pwr_status_bit) { u32 value, pwr_status; value = readl(core->reg_base + WRAPPER_CORE_POWER_STATUS); - pwr_status = value & BIT(1); + pwr_status = value & pwr_status_bit; - return pwr_status ? false : true; + return !pwr_status; } static void iris_vpu3_power_off_hardware(struct iris_core *core) @@ -32,7 +32,7 @@ static void iris_vpu3_power_off_hardware(struct iris_core *core) u32 reg_val = 0, value, i; int ret; - if (iris_vpu3x_hw_power_collapsed(core)) + if (iris_vpu3x_hw_power_collapsed(core, VCODEC0_POWER_STATUS)) goto disable_power; dev_err(core->dev, "video hw is power on\n"); @@ -78,7 +78,7 @@ static void iris_vpu33_power_off_hardware(struct iris_core *core) u32 count = 0; int ret; - if (iris_vpu3x_hw_power_collapsed(core)) + if (iris_vpu3x_hw_power_collapsed(core, VCODEC0_POWER_STATUS)) goto disable_power; dev_err(core->dev, "video hw is power on\n"); @@ -221,6 +221,113 @@ static void iris_vpu35_power_off_hw(struct iris_core *core) iris_vpu33_power_off_hardware(core); } +static void iris_vpu36_power_off_vcodec(struct iris_core *core, u32 core_id) +{ + u32 bridge_hw_reset[] = {CORE_BRIDGE_HW_RESET_DISABLE, VCODEC1_BRIDGE_HW_RESET_DISABLE}; + u32 lpi_status_active[] = {NOC_LPI_STATUS_ACTIVE, NOC_LPI_VCODEC1_STATUS_ACTIVE}; + u32 power_down_prep[] = {REQ_POWER_DOWN_PREP, REQ_VCODEC1_POWER_DOWN_PREP}; + u32 lpi_status_done[] = {NOC_LPI_STATUS_DONE, NOC_LPI_VCODEC1_STATUS_DONE}; + u32 lpi_status_deny[] = {NOC_LPI_STATUS_DENY, NOC_LPI_VCODEC1_STATUS_DENY}; + u32 bridge_sw_reset[] = {CORE_BRIDGE_SW_RESET, VCODEC1_BRIDGE_SW_RESET}; + u32 idle_status[] = {VCODEC_SS_IDLE_STATUSN, VCODEC1_SS_IDLE_STATUSN}; + u32 power_status[] = {VCODEC0_POWER_STATUS, VCODEC1_POWER_STATUS}; + bool handshake_done, handshake_busy; + u32 value, i, count = 0; + int ret; + + if (iris_vpu3x_hw_power_collapsed(core, power_status[core_id])) + goto disable_power; + + value = readl(core->reg_base + WRAPPER_CORE_CLOCK_CONFIG); + if (value) + writel(CORE_CLK_RUN, core->reg_base + WRAPPER_CORE_CLOCK_CONFIG); + + for (i = 0; i < core->iris_platform_data->num_vpp_pipe; i++) { + ret = readl_poll_timeout(core->reg_base + idle_status[core_id] + 4 * i, + value, value & DMA_NOC_IDLE, 2000, 20000); + if (ret) + goto disable_power; + } + + do { + writel(power_down_prep[core_id], core->reg_base + AON_WRAPPER_MVP_NOC_LPI_CONTROL); + usleep_range(15, 20); + value = readl(core->reg_base + AON_WRAPPER_MVP_NOC_LPI_STATUS); + + handshake_done = value & lpi_status_done[core_id]; + handshake_busy = value & (lpi_status_deny[core_id] | lpi_status_active[core_id]); + + if (handshake_done || !handshake_busy) + break; + + writel(0, core->reg_base + AON_WRAPPER_MVP_NOC_LPI_CONTROL); + usleep_range(15, 20); + } while (++count < 1000); + + if (!handshake_done && handshake_busy) + goto disable_power; + + writel(0, core->reg_base + AON_WRAPPER_MVP_NOC_LPI_CONTROL); + + writel(bridge_sw_reset[core_id] | bridge_hw_reset[core_id], + core->reg_base + CPU_CS_AHB_BRIDGE_SYNC_RESET); + writel(bridge_hw_reset[core_id], core->reg_base + CPU_CS_AHB_BRIDGE_SYNC_RESET); + writel(0x0, core->reg_base + CPU_CS_AHB_BRIDGE_SYNC_RESET); + +disable_power: + iris_genpd_set_hwmode(&core->vcodec[core_id], false); + iris_disable_power_domain_and_clocks(core, &core->vcodec[core_id]); +} + +static void iris_vpu36_power_off_hw(struct iris_core *core) +{ + u32 num_cores = core->iris_platform_data->num_cores; + int i; + + for (i = 0; i < num_cores; i++) + iris_vpu36_power_off_vcodec(core, i); +} + +static int iris_vpu36_power_on_hw(struct iris_core *core) +{ + u32 num_cores = core->iris_platform_data->num_cores; + int i, ret; + + for (i = 0; i < num_cores; i++) { + ret = iris_enable_power_domain_and_clocks(core, &core->vcodec[i]); + if (ret) + goto error; + } + + return 0; + +error: + while (--i >= 0) + iris_vpu36_power_off_vcodec(core, i); + + return ret; +} + +static int iris_vpu36_set_hwmode(struct iris_core *core) +{ + u32 num_cores = core->iris_platform_data->num_cores; + int i, ret; + + for (i = 0; i < num_cores; i++) { + ret = iris_genpd_set_hwmode(&core->vcodec[i], true); + if (ret) + goto error; + } + + return 0; + +error: + while (--i >= 0) + iris_genpd_set_hwmode(&core->vcodec[i], false); + + return ret; +} + const struct vpu_ops iris_vpu3_ops = { .power_off_hw = iris_vpu3_power_off_hardware, .power_on_hw = iris_vpu_power_on_hw, @@ -248,3 +355,12 @@ const struct vpu_ops iris_vpu35_ops = { .calc_freq = iris_vpu3x_vpu4x_calculate_frequency, .set_hwmode = iris_vpu_set_hwmode, }; + +const struct vpu_ops iris_vpu36_ops = { + .power_off_hw = iris_vpu36_power_off_hw, + .power_on_hw = iris_vpu36_power_on_hw, + .power_off_controller = iris_vpu35_vpu4x_power_off_controller, + .power_on_controller = iris_vpu35_vpu4x_power_on_controller, + .calc_freq = iris_vpu3x_vpu4x_calculate_frequency, + .set_hwmode = iris_vpu36_set_hwmode, +}; diff --git a/drivers/media/platform/qcom/iris/iris_vpu_common.h b/drivers/media/platform/qcom/iris/iris_vpu_common.h index a8df9af0d3da..34ecb18aefb3 100644 --- a/drivers/media/platform/qcom/iris/iris_vpu_common.h +++ b/drivers/media/platform/qcom/iris/iris_vpu_common.h @@ -12,6 +12,7 @@ extern const struct vpu_ops iris_vpu2_ops; extern const struct vpu_ops iris_vpu3_ops; extern const struct vpu_ops iris_vpu33_ops; extern const struct vpu_ops iris_vpu35_ops; +extern const struct vpu_ops iris_vpu36_ops; extern const struct vpu_ops iris_vpu4x_ops; struct vpu_ops { diff --git a/drivers/media/platform/qcom/iris/iris_vpu_register_defines.h b/drivers/media/platform/qcom/iris/iris_vpu_register_defines.h index 72168b9ffa73..c44c85eac3b5 100644 --- a/drivers/media/platform/qcom/iris/iris_vpu_register_defines.h +++ b/drivers/media/platform/qcom/iris/iris_vpu_register_defines.h @@ -7,6 +7,7 @@ #define __IRIS_VPU_REGISTER_DEFINES_H__ #define VCODEC_BASE_OFFS 0x00000000 +#define VCODEC1_BASE_OFFS 0x00040000 #define AON_MVP_NOC_RESET 0x0001F000 #define CPU_BASE_OFFS 0x000A0000 #define WRAPPER_BASE_OFFS 0x000B0000 @@ -14,6 +15,8 @@ #define AON_BASE_OFFS 0x000E0000 #define VCODEC_SS_IDLE_STATUSN (VCODEC_BASE_OFFS + 0x70) +#define VCODEC1_SS_IDLE_STATUSN (VCODEC1_BASE_OFFS + 0x70) +#define DMA_NOC_IDLE BIT(22) #define AON_WRAPPER_MVP_NOC_RESET_REQ (AON_MVP_NOC_RESET + 0x000) #define VIDEO_NOC_RESET_REQ (BIT(0) | BIT(1)) @@ -35,6 +38,8 @@ #define CPU_CS_AHB_BRIDGE_SYNC_RESET (CPU_CS_BASE_OFFS + 0x160) #define CORE_BRIDGE_SW_RESET BIT(0) #define CORE_BRIDGE_HW_RESET_DISABLE BIT(1) +#define VCODEC1_BRIDGE_SW_RESET BIT(2) +#define VCODEC1_BRIDGE_HW_RESET_DISABLE BIT(3) #define CPU_CS_X2RPMH (CPU_CS_BASE_OFFS + 0x168) #define MSK_SIGNAL_FROM_TENSILICA BIT(0) @@ -52,14 +57,21 @@ #define WRAPPER_DEBUG_BRIDGE_LPI_STATUS (WRAPPER_BASE_OFFS + 0x58) #define WRAPPER_IRIS_CPU_NOC_LPI_CONTROL (WRAPPER_BASE_OFFS + 0x5C) #define REQ_POWER_DOWN_PREP BIT(0) +#define REQ_VCODEC1_POWER_DOWN_PREP BIT(1) #define WRAPPER_IRIS_CPU_NOC_LPI_STATUS (WRAPPER_BASE_OFFS + 0x60) #define NOC_LPI_STATUS_DONE BIT(0) /* Indicates the NOC handshake is complete */ #define NOC_LPI_STATUS_DENY BIT(1) /* Indicates the NOC handshake is denied */ #define NOC_LPI_STATUS_ACTIVE BIT(2) /* Indicates the NOC is active */ +#define NOC_LPI_VCODEC1_STATUS_DONE BIT(8) +#define NOC_LPI_VCODEC1_STATUS_DENY BIT(9) +#define NOC_LPI_VCODEC1_STATUS_ACTIVE BIT(10) #define WRAPPER_IRIS_VCODEC_VPU_WRAPPER_SPARE_0 (WRAPPER_BASE_OFFS + 0x78) #define WRAPPER_CORE_POWER_STATUS (WRAPPER_BASE_OFFS + 0x80) +#define VCODEC0_POWER_STATUS BIT(1) +#define VCODEC1_POWER_STATUS BIT(4) + #define WRAPPER_CORE_CLOCK_CONFIG (WRAPPER_BASE_OFFS + 0x88) #define CORE_CLK_RUN 0x0 -- 2.34.1