From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 6A7F93ACF02 for ; Thu, 17 Sep 2026 05:01:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789621306; cv=none; b=O6p0X+TG5LFaYY3r++MJtNtuilDMi9stQdGUu665V2XVF7jrtajPkUhhTZf8/0f8UiCi+70viiR2HoLrmwPPyW+sUnGReMdrYwU7Rnk5/tDh5l6jP0fTOkAydl3QtPIvNDs4KQHopI+IuawZTFDx89o7KJGVTMRSpynfvOs0Qxo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789621306; c=relaxed/simple; bh=AnqQ3dMMWwjfS1DZyYObOXrVudWl+j4L2KPuJCDobNo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=DjuK5kOcYywMpsi7DGpgpj3iDbrOoKYV1jvKYsNGSKkzusXXXTKpwRoo3MAjWkY4OhfH0wXg35omS19h0PA6NaYswlkm5hU9JXXJxHfTgeByU9RfXXrykZ8hj2H/ZyI+MNKaZSPXUy9vEmI9GWmJFppjH4btgZxQlDK59ZXcefE= 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=HAfiTCU3; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=eoPMB88f; arc=none smtp.client-ip=205.220.168.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="HAfiTCU3"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="eoPMB88f" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 68H44AOK4038572 for ; Thu, 17 Sep 2026 05:01:43 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= H4Js5Limpe9fDaU3+cneqpv0WTKfYeCktYQ1Y+hEgFk=; b=HAfiTCU3zD0BtAKM DWbomKrCvNrHSGE/0Ob7BfWF/xMC9c2dn9L4bha12p8JG4vlIi3D7qvMIFa4Xj5G dmxs5GHTM/gNvCn/ZCr4dYMoTgt4foFhoUBsUaJQbT8Y6mfShsyP41Mls/S/yC9W qMNExP4Z66J4RW1zPwR/YQnoemjvhw68nEYe1Z8v3FE8BK0FWbKKL8k4K+ZNmZLe 2Xx4bZHMJM/VzElRum4N/MiumsWr3QP97aGt3ugJiPSWI55LRNwg212Qi6VuZq5H IuVNvesBB2DXSUo4Z9mmFh0KawSzyn6xD8GypUqw7Jej07Hymg5qEZ/v38Y/y6kg n32ZtQ== Received: from mail-oi1-f198.google.com (mail-oi1-f198.google.com [209.85.167.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4gr8uw063p-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Thu, 17 Sep 2026 05:01:43 +0000 (GMT) Received: by mail-oi1-f198.google.com with SMTP id 5614622812f47-4c55ba309c2so665288b6e.1 for ; Wed, 16 Sep 2026 22:01:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1789621303; x=1790226103; 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=H4Js5Limpe9fDaU3+cneqpv0WTKfYeCktYQ1Y+hEgFk=; b=eoPMB88f03oVwqY8emHIrqQRXTrap0JrclMaixBPrnqFLUW4ueGku1/dapTt8JvmPg SxtXCjYk4ZsRfDYq5p7js04SXHS0nFOrrq44h3DEisLj3l4OJfZDwGfWjSPH1/yyX/22 SjAHEbSi/Qwj+mtNhCPyKdfMLSISDuLYM67OMwFmkbhGOLbDHuA4jXoLH4eWHK21Civ4 vJqQFvKjXIewfYySnWL/QG4j/EoapWclHMrzaR7ZLyuS7aP9jPd0bA4QdA95fgoMKp+7 LKPzxvvPAapSiFHPpEV6L0h8RZ8qXJRY6fPIXUitVVc0EHt9sD0aoE7s92HM8cD4/TwC /a+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1789621303; x=1790226103; 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=H4Js5Limpe9fDaU3+cneqpv0WTKfYeCktYQ1Y+hEgFk=; b=PSYCeopJytSlIOnI0rucvKfipKn89Y9+IBH/uxa8TsstHulYG6MgmUCux98QHkmLkc NRUb2zeNaJIYhz+tJJLYCtJENCARfuOrlD4z1mqQDuZKAifIe7FPt6DE6qXLXK+fHpMX B9dtCGX0d6mpGX37+C7oubb0ufHzD0FUAXYlGnlmmkp25h8wC/oIFXzYROJt0oaxL7+w yJQ7tzagZXGA7npZSGyPyzvYOv3BKZWFvf9agcpIrIeW3yMTCzYCkSzSe3jxOf7zV4EB CImjMoVRBllkFy5KG5l7r5+IJVJ8eagD2bbe+B1zWcW9bUvYEPexJYmNqH07/eYMr4vk ufOw== X-Forwarded-Encrypted: i=1; AKwUvBz+omqbQS1JCB4hW0yI9IewOa2WpJkMozc57x1hdSa+LoksBG60UjvA+zvYp9f738CClH1M316SykqdbA==@vger.kernel.org X-Gm-Message-State: AFuF++kbB6bZjOfmVGMO/f/v8l4TqZ3W4wZvZZRdVN8R/ij6FSDXim5m aGvsniD03YGCLBKn4wwZC5JD8B3TKY3msSMX7m4kwrYlsYbCmIzB1H8NqYL4Xgfz+/4ntudBGKB C97uFNzUHElpPUGhvoRYLaAtVY8ZymEu8dy5CIMSmVY2PJUlrw/0zrxxo0kaMdqqM7Q== X-Gm-Gg: AYBFou28o/lD/a31Fb9Mi+4LMGmg74iFA+6KVfJOnIvvT1BvDhRu+wUhtNZAKRhK5dx zeosZVafFeNtKC8F6l0ir+Zyg8v/j0Wivl/LkF5pKyFYnFUE2NSoynKeyt/xaAjUmswyl44Q4Us aWrimGyjGIMq6mgyJ1GmrZSPXm1XP774ZcrwR5qrrcdM/xueVNez22ReJvf7fUDfsPzOfhKbevB StNyeKwLTTwg601OdGDq7lxhMWHUqmhbp8G1r7rnafyyofaNS3Bk+pK4514u2iAv2BtlDFxh5Ul K4mjX3xunkjBBclLbZk4U6lRvLHvR7geeN2uEiVEhKbuWPggo1jewHrnLJRlErQJeXzJYJqFenj YxwxA2DoXa/jAN6FYgucHQLllh5ys+vvjCA== X-Received: by 2002:a05:6808:1921:b0:4b9:a8ac:480 with SMTP id 5614622812f47-4ca4c6bab9emr6269626b6e.30.1789621302548; Wed, 16 Sep 2026 22:01:42 -0700 (PDT) X-Received: by 2002:a05:6808:1921:b0:4b9:a8ac:480 with SMTP id 5614622812f47-4ca4c6bab9emr6269610b6e.30.1789621302068; Wed, 16 Sep 2026 22:01:42 -0700 (PDT) Received: from hu-bvisredd-hyd.qualcomm.com ([202.46.23.25]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-33bf5b2753csm23544223eec.31.2026.09.16.22.01.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Sep 2026 22:01:41 -0700 (PDT) From: Vishnu Reddy Date: Thu, 17 Sep 2026 10:30:23 +0530 Subject: [PATCH v11 4/9] media: iris: Add power sequence for glymur Precedence: bulk X-Mailing-List: linux-media@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: <20260917-glymur-v11-4-e0c8bc914742@oss.qualcomm.com> References: <20260917-glymur-v11-0-e0c8bc914742@oss.qualcomm.com> In-Reply-To: <20260917-glymur-v11-0-e0c8bc914742@oss.qualcomm.com> To: Bryan O'Donoghue , 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 , Abel Vesa Cc: Krzysztof Kozlowski , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Vishnu Reddy X-Mailer: b4 0.15.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1789621265; l=9655; i=busanna.reddy@oss.qualcomm.com; s=20260216; h=from:subject:message-id; bh=AnqQ3dMMWwjfS1DZyYObOXrVudWl+j4L2KPuJCDobNo=; b=UB6lXyyNLDOW2wpVeBUy/gkPzzw4bYAnz6RR+cW+uX/X+Klq5X1IZ3h8jVjJGPSQIZphuLMp2 Lz6XJsonrdjBASosDcAN2Pmi08/Zky9TQrH03hg4j4TL5Ezg2VWMXUr X-Developer-Key: i=busanna.reddy@oss.qualcomm.com; a=ed25519; pk=9vmy9HahBKVAa+GBFj1yHVbz0ey/ucIs1hrlfx+qtok= X-Proofpoint-ORIG-GUID: Y9S3wdY5dVTVCpP5WNt2lWUoP3APqQoc X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwOTE3MDA2MyBTYWx0ZWRfX4KJh61cllz3K 8p0sUox2/pYpULOmHSPDA0ue+ERULdFHwuzT/Sx9Ba+HBsjncHhckNmeH8B3Vo/N6NgCEERwUNU k8NmfUHiHlZYoK4GwX5WqotTWmlEpdWH+3QMCOm30SVqtN3qQvh2b2MTLY7uaUah016lpqvEJdJ n3VOgC1LQGD0rRRPIwPcDOkmGH7BXgfkn9BU7PglC8kNEl1dzosmO5y4Za9Wu1umPe3fqW6M65d xO4VX/7nudoXwvF6T/+DwhVIgZgiC5Zer8L2AIKGKvn5UIFzxUhIbu/UA5uvHfwar8rT7VP5eyB tnQahz0lGR0bdBX8yr5OrUWQn9Tig0aIX52x43XVA+k4iPySrAQniiUX7HFHOwpX8gNFeVO6Mq7 9DbjZS4JmNn7dooTEFxsYzypY+HArXnTdUUL7JAs+MgMxyMtEDlUSI/qrXuaSUS+e+Hb0lH77zW /eqjnaYCi1WsSuh2ohQ== X-Proofpoint-GUID: Y9S3wdY5dVTVCpP5WNt2lWUoP3APqQoc X-Proofpoint-Spam-Info: AW1haW4tMjYwOTE3MDA2MyBTYWx0ZWRfXypOH020Qdnsk YaHOu+y/sZ3ReRaasykRuCOLmi7xQ3NoeIJS65ol4Kf2Lt+9toQCoyMOXWfok+xvrnmjROqrVQ0 XE2Lj8IMpxHfwU69Y21piY/r9GfOyvg= X-Authority-Analysis: v=2.4 cv=dMUzC+Zb c=1 sm=1 tr=0 ts=6aab7437 cx=c_pps a=4ztaESFFfuz8Af0l9swBwA==:117 a=ZePRamnt/+rB5gQjfz0u9A==:17 a=IkcTkHD0fZMA:10 a=VdqzKS8jKosA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=YMgV9FUhrdKAYTUUvYB2:22 a=EUspDBNiAAAA:8 a=j0zrPJlDeI9ZXVQ5fz0A:9 a=QEXdDO2ut3YA:10 a=TPnrazJqx2CeVZ-ItzZ-:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-09-16_03,2026-09-16_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 bulkscore=0 impostorscore=0 suspectscore=0 spamscore=0 phishscore=0 adultscore=0 clxscore=1015 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2609040000 definitions=main-2609170063 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 | 127 ++++++++++++++++++++- drivers/media/platform/qcom/iris/iris_vpu_common.h | 1 + .../platform/qcom/iris/iris_vpu_register_defines.h | 12 ++ 3 files changed, 135 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..7b07d33d6119 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,114 @@ 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); + + ret = readl_poll_timeout(core->reg_base + AON_WRAPPER_MVP_NOC_LPI_STATUS, + value, value & lpi_status_done[core_id], 200, 2000); + writel(0, core->reg_base + AON_WRAPPER_MVP_NOC_LPI_CONTROL); + if (ret) + goto disable_power; + + 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 +356,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 09799a375c14..63bf0cec58e2 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