From patchwork Tue Mar 4 13:07:11 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 870189 Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C52B22046B9 for ; Tue, 4 Mar 2025 13:07:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741093640; cv=none; b=Gj6WJ7TkAfYqf4d89hE/pJo5PCsEfpHE8/NF8IuSSP67YtYNUxCuplTfmgUN7p5ITB/av5PQ5fADYiu1B2iyRW8rZrRJeRfpU5pa6zipjGbfbSbtSB3FncPPnmh4zsvAfSA8n40KIKFgvNNYoaKKliIUX/MD8r7/roFxu9/FROU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741093640; c=relaxed/simple; bh=eVAsey3JxdTzcp2dytGoCKkDVWArrUAtGBxSzsk01Zc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Hab1h1nxsjzlpmksRx6jgjsPOAQyYX2zdHuwkmPdLadWCAWDBeOP7TUi8T6bmftbFzcUdf49SWfNnY0njVLFt+MU/rGI1y+unIodVnaKaBbNGy9pbw4nw4J9boRGeOpgCQwrDovXkSBkNPKARlV+puARSNQTSBNoWGpRoPG3Wt8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=NLIMuJvg; arc=none smtp.client-ip=209.85.221.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="NLIMuJvg" Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-390eebcc331so2347878f8f.1 for ; Tue, 04 Mar 2025 05:07:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1741093636; x=1741698436; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=cuQPD4WHO0oVNRv+mxZovyBbMl3mHwOGIxiQAqnpkUE=; b=NLIMuJvgH+cc55I8VqOQYO6oHtM8h5SDDLFlxoZOFgmYOBBKC79kivJqLebm5TH2jY tPju7WC3wlIuNFhE0cAp75EtmRNBiqXNXBhrgg/XdhdzxAPuSZHcgv6EgBbAzR2KiALp OCqX64qZ2wSOwFtdqYXzwIGPZUBIKYvyDnKUv9l1r+xA4ZdTc9X4SYyRmjMezSNBNB4b bmOTk3UO4bX0+Z5f4ukZaCuA2cF/iFr24+p2+9neZimHvWjV7+sY/US+bh0JnhL650jD lQmYfWJajC2CJ+NpWaYi82EAmasWeKM5eZAsEQgrdyI5Hkyopnm9uzS+gY8LJoNxi6MO O5qA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741093636; x=1741698436; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cuQPD4WHO0oVNRv+mxZovyBbMl3mHwOGIxiQAqnpkUE=; b=SaRxyI6O6WAqHvMxfkY9pVkY3VsjANhIvmUSbCG4DOLIqVAvnLNWGtPDj72awJucSQ iMU5iAJgbo6K+JeLY4Bn73UcpmbuLndDAXt6ynuJ31VRQAd+ui4pD+zQGRmpg3Io+0lN 2PJvFfd62bkkxcorj89tPkfFnIvTtqqqedOTUEMyKlqEMRRohiOG74mnH2TFbIrpM+Cg Ts+3KHqNqDGaM4Hp2VZKrnPSXdWEuE/4UG4hJ75nvbkYvsy81PdJtJA1QmmlDGxGPFVe fY4IjEClNOrAjFpEHXW72Tk1n0z9+AWMjzPrVanDcrKLHDbcbFGfky5kan7ayIdgq4dW 6Eow== X-Forwarded-Encrypted: i=1; AJvYcCVnzx6RzbvhcvzHoOEyHH3X5/ddHzO5NonmpIUo6amK3Xs+8gp4Cwj5HUtl+bbFtD1MGyhHXHJ9psx3Au22@vger.kernel.org X-Gm-Message-State: AOJu0YydSq6M5M3YSsN+mPglcUuSQbd9OKjqX0LzK3gHKEmF8Prp9ROy iHbGe64BB3+WClwIfJ4sRFYgrK9bI+5k+j1HpuXhvua2USAzTOXT7Y0fbxLbt00= X-Gm-Gg: ASbGnctuBHKhPF88jQxaB3uW5GMzSDpVvSHxKZCIBZ+wVc6KU8rcLzWuoFjRJ0oFyl5 C0S4HG38jbIR4E+c0T/G19L4pk8S5m4tAFNZaVyb3SthJFO6mbpPyP6u+TD5T8iI9pr4wARVsz4 Jb7FvsQ6wOrNUb0HAYuDKNoKe7tv11t/AuUXFMLwKKyGcBFFqRWld1VzxP8r3uI+9aSJynhtw0v /DkLTFODkdFjzTbwqXdMSGsYtkF2p0FGyi86FLLiLpbW+CIf6mAiGaRQNqJVBrLn8e8rSLVaqdN 3q5Qt8rjm8TzIu+DPURRcBYqCjUB12D4jmvuRLvtcVFJc0CWQmfvYB4yY8M20YAVqmdYq0W6azi k21zCAA== X-Google-Smtp-Source: AGHT+IFHR8q/L6pe4BnBXKTY1Ga7eFmSDtcmLdUHWlgfJfHC/2yz9FYNMzKiIzY6WUs6i/rWq/DfjA== X-Received: by 2002:a05:6000:2a81:b0:38f:2c10:da1e with SMTP id ffacd0b85a97d-3911561959fmr1840760f8f.27.1741093636048; Tue, 04 Mar 2025 05:07:16 -0800 (PST) Received: from [127.0.1.1] (188-141-3-146.dynamic.upc.ie. [188.141.3.146]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-390e47b6cd8sm17401715f8f.44.2025.03.04.05.07.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Mar 2025 05:07:15 -0800 (PST) From: Bryan O'Donoghue Date: Tue, 04 Mar 2025 13:07:11 +0000 Subject: [PATCH 5/8] media: venus: core: Add SM8350 resource struct Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250304-b4-linux-media-comitters-sc8280xp-venus-v1-5-279c7ea55493@linaro.org> References: <20250304-b4-linux-media-comitters-sc8280xp-venus-v1-0-279c7ea55493@linaro.org> In-Reply-To: <20250304-b4-linux-media-comitters-sc8280xp-venus-v1-0-279c7ea55493@linaro.org> To: Stanimir Varbanov , Vikash Garodia , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Konrad Dybcio , Bjorn Andersson Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue , Johan Hovold , Konrad Dybcio X-Mailer: b4 0.15-dev-33ea6 From: Konrad Dybcio Add SM8350 configuration data and related compatible. Signed-off-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230731-topic-8280_venus-v1-5-8c8bbe1983a5@linaro.org [ johan: rebase on 6.9-rc1; convert vcodec_pmdomains ] Signed-off-by: Johan Hovold [ bod: added static video encoder/decoder desciptors ] Signed-off-by: Bryan O'Donoghue --- drivers/media/platform/qcom/venus/core.c | 41 ++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media/platform/qcom/venus/core.c index 93e5b9e1f70cc..dbce635f9fa45 100644 --- a/drivers/media/platform/qcom/venus/core.c +++ b/drivers/media/platform/qcom/venus/core.c @@ -1012,6 +1012,46 @@ static const struct venus_resources sm8250_res = { .enc_nodename = "video-encoder", }; +static const struct reg_val sm8350_reg_preset[] = { + { 0xb0088, 0, 0x11 }, +}; + +static const struct venus_resources sm8350_res = { + .freq_tbl = sm8250_freq_table, + .freq_tbl_size = ARRAY_SIZE(sm8250_freq_table), + .reg_tbl = sm8350_reg_preset, + .reg_tbl_size = ARRAY_SIZE(sm8350_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 = { "core" }, + .resets_num = 1, + .vcodec0_clks = { "vcodec0_core" }, + .vcodec_clks_num = 1, + .vcodec_pmdomains = (const char *[]) { "venus", "vcodec0" }, + .vcodec_pmdomains_num = 2, + .opp_pmdomain = (const char *[]) { "mx", NULL }, + .vcodec_num = 1, + .max_load = 7833600, /* 7680x4320@60fps */ + .hfi_version = HFI_VERSION_6XX, + .vpu_version = VPU_VERSION_IRIS2, + .num_vpp_pipes = 4, + .vmem_id = VIDC_RESOURCE_NONE, + .vmem_size = 0, + .vmem_addr = 0, + .dma_mask = GENMASK(31, 29) - 1, + .cp_start = 0, + .cp_size = 0x25800000, + .cp_nonpixel_start = 0x1000000, + .cp_nonpixel_size = 0x24800000, + .fwname = "qcom/vpu-2.0/venus.mbn", + .dec_nodename = "video-decoder", + .enc_nodename = "video-encoder", +}; + static const struct freq_tbl sc7280_freq_table[] = { { 0, 460000000 }, { 0, 424000000 }, @@ -1086,6 +1126,7 @@ static const struct of_device_id venus_dt_match[] = { { .compatible = "qcom,sc7180-venus", .data = &sc7180_res }, { .compatible = "qcom,sc7280-venus", .data = &sc7280_res }, { .compatible = "qcom,sm8250-venus", .data = &sm8250_res }, + { .compatible = "qcom,sm8350-venus", .data = &sm8350_res }, { } }; MODULE_DEVICE_TABLE(of, venus_dt_match);