Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp1189698rdb; Fri, 9 Feb 2024 13:12:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IEUPZruXfMWLmbJeVfqUEHMNgg1H7I3bO5oZZf75MYjBvfGrFIrDRa/pxNPbT7sggtarGzQ X-Received: by 2002:a05:6a21:2d07:b0:19e:bab7:6185 with SMTP id tw7-20020a056a212d0700b0019ebab76185mr368345pzb.31.1707513145707; Fri, 09 Feb 2024 13:12:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707513145; cv=pass; d=google.com; s=arc-20160816; b=Qs4ejF9uZujs7gAn1cY/HwuNKM+nybwf0zvOu4Ae0dz/UDPdNAZVe4UASmLRux49sA 1A2C4GaPF/QPPqfsMXkVoaktPIU942GkWGO0pMovd5Ze7MehYCPTP4NmW/BzqcpoafW5 scbBOKFn1UPeB+kTnAqeTrncb0l6osUqWWNIo+zNr8duQiAes+im5Oma4fWQkEwW3fGx 3Qy1r3FR5xRC5ArmkWL9Yf2hD5YK8YCCqBqq/renuqcimVM969UmOzL4023JZIn+/xKC ZatrXHvofmHzo968iXYt7vuwekDvH4fFCvmgPFri/L/YlcbA9TZL8q45W8vixJgsR42M 7/jA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:from :dkim-signature; bh=lLSVoQCZITmHHkE2ANSeJMkPS5k1b3W1O27n/YVH+Ps=; fh=z2unmBovTaOUpr4bwGVdY88eBn24DiJHnBHZqrQTIOM=; b=PwMkm1ujm0EYsPShRsEATkpH4XKTahb/UK6YOdNsEQlZYwt8hXtMwnazrieStfXmfh 1YlmJ+w3rIGFsV1SxWZm1vT3ljLb8iAlUCx3aIMtT1Sb2fev+FYr9xb6KPxfG3gbbkfH oaFc+j3mF3h7q8gRRamROER9kejxNsc/Kj13vpePwgwnSafIaRcmmpx9eKeaxhJktudK UvctyWg9v4BqBJEokWonDq82lb6nsfd2VEn1BlfKf6HhUhKQ/GU5waHELG0uUZEtmdT/ XHm3xaMb1ztL4XqISAx+Etxchh4hY9i07CWhmI9QtPPP56VyL/MnCZVttDei0c72YrvC 4ywQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="W/s7J4Cu"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-59990-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59990-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org X-Forwarded-Encrypted: i=2; AJvYcCUjpz0NJs6LNKp4zsY8qWYHl7eTNh+u7BNkdMg3ZszLKIqNnsat3noIyWi9Prdjn5PCgakViHBBnEH5K1V4ef2ShDI8FYcu9D8uJcJHew== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id du17-20020a056a002b5100b006de1e26adb5si874721pfb.275.2024.02.09.13.12.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 13:12:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-59990-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="W/s7J4Cu"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-59990-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-59990-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 9AE2028C58A for ; Fri, 9 Feb 2024 21:11:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D2F653984F; Fri, 9 Feb 2024 21:09:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="W/s7J4Cu" Received: from mail-ed1-f52.google.com (mail-ed1-f52.google.com [209.85.208.52]) (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 D78F53984B for ; Fri, 9 Feb 2024 21:09:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707512991; cv=none; b=MIH05wgW+J5lO/DfIoEpVtIpo9tKoCHCj1OwopWi4U8Sx6+zD2OXGn1AQ1B6SN5BdL3/EeZraFgd+NdCuUBoeX0TxqHj6k878YluUIknfIDg4SCNqkGzpBUOtDjwvQOov2cvcVZGlLeycbjfEWJwY9tKAUclmd4t23VjDOdbcW8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707512991; c=relaxed/simple; bh=TgTIkiOxuNQ1a1CE04BAe5d7kMkxUJYrxgLOnh2qf5U=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=EpZ2k5dXym7BYo8KSV0ZN75kd7gle5QF6zkx+zS7/MIv569qg7gil/nNcMsTdrXSjNgiWaLTdBjdojMaL9sSntVGwSWRNjYw4dYyz1lxPnS6Qij3I8W/jIptjmgZ93MFAPhDyWjfsQruqSJF/YgPQNMJ52QSgF5ix9AXmKKZiW8= 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=W/s7J4Cu; arc=none smtp.client-ip=209.85.208.52 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 Received: by mail-ed1-f52.google.com with SMTP id 4fb4d7f45d1cf-5600c43caddso1743644a12.2 for ; Fri, 09 Feb 2024 13:09:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1707512987; x=1708117787; darn=vger.kernel.org; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:from:to:cc:subject:date:message-id:reply-to; bh=lLSVoQCZITmHHkE2ANSeJMkPS5k1b3W1O27n/YVH+Ps=; b=W/s7J4Cu6qRaSxwrvGoHGbMgZUnDrx1hw0y1dByjSYxcMf3/pCtszK9dy+B5opF8Fc +cY54Il+55NYhZfpMTltsKstUE/9CRXRPKGDHfHroCPh63JkijmGXPM36l/z+cQIdW2I H2JA/shkkKBjsSIbYW7k1dMPzE8wdriPdy5Ti4ejXsJMemOTvuSvYcGsjV6puoukad+H lHMnEvkNqL5ss5g8vBKF3jlCeUzGOsJjd9KHJdMgIiUuOMentxLi4WFZdifmnVndEDtz cbIEN89a7AJFHXjFdS9UFv51gs9M3IEdYZ8OM6pAYVSf2m3yc5691VOQMpRU+AkQPs0J l1gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707512987; x=1708117787; h=cc:to:content-transfer-encoding:mime-version:message-id:date :subject:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=lLSVoQCZITmHHkE2ANSeJMkPS5k1b3W1O27n/YVH+Ps=; b=lBFc1l/Y52ELR42TlCPkoHku1vU8dBmDihYxCT0vRchvFwhWNB98pef/v4KAvQ2Tn/ rTnodftqDnbgDOAqv8NCgcjMN9w8DCxr+TUTFPJAAtl3ja7B3rbUpWyomSw4i0EtdDav 3i7SMAUV7LuCFOVZb0gvUCg4m0lSzIGxoGu+PmyOddQgbphDmkhXlZ51eVHFQMebn5Om IAPPzab78lqix6veECqVv6pzsnH48edcEVeis0pdchMME8+Ld6KZvLuoO1XWU3tQWo4f +72NGSRJFVEu0cIj/b9GK1N8P9RQdJhOGjFTqgfBlEcR/URxW5bzRdFaOQJUYL+1ewU1 lSxg== X-Gm-Message-State: AOJu0YyLPEhO2fuBTGtGIGXwM3RCo5nLZLHq44cbWyABhs7cIbxjHvLG XhMApzLAc18BnksnLc6+L3oRTGXGZTki0A3DObLCWJ71RvL3oo8MqFNWaoE7hs61OUaMGgcX+h0 m X-Received: by 2002:a17:906:6892:b0:a3b:9d2d:dec2 with SMTP id n18-20020a170906689200b00a3b9d2ddec2mr164242ejr.22.1707512987347; Fri, 09 Feb 2024 13:09:47 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCVDN4Bk0X2qND9LTPtdLq3XpGE1bm+IMiLgts4D8Kt0sFk8oNDClJLj2m1d6IlOOWeT+6PvCe3FaJ17JViG7Wao3KR7oiI5ryxkUjW41pNrzZz0P4oTVrhYtq1uy7P5OzbEM2Pfvz2iOUGijBY1eAXz9XURn5Wk2Y5O8Vtmrbb/OLH6NsDpk86F/Mz6KYKAt1+kFTafGktgBZOGQlyvmuQA9lCoQIonlKMUjmbmbZNIyU/xNvjesszg6ywMTain3R+wWasxz+qt9iBDqTVDIcXmTMvlGbMnVmWPyX+o7KGICUTiuJTrq+Vc0jCi0QY01mhUb7Fz/hatTCbV8IRp6cci8lSlUm7kuokZbRpHVk/5szhzVIXypvIS6LBoXt3mogjhge1e4W/fFwk0YX4rlSW8vBdv0zMVOpPavcGU0eT0Vfjsbax6fpphD3uqUuK9vlJSe3PGyzdNF64NbnIdkjc/k5OhMsWSTeoK5HDi3gx1DKA51V/ty17PJWyJpH3EbjO3ag== Received: from [10.167.154.1] (037008245233.garwolin.vectranet.pl. [37.8.245.233]) by smtp.gmail.com with ESMTPSA id vo5-20020a170907a80500b00a3be3b27d0bsm1056517ejc.49.2024.02.09.13.09.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 13:09:46 -0800 (PST) From: Konrad Dybcio Subject: [PATCH v2 00/20] Venus cleanups Date: Fri, 09 Feb 2024 22:09:44 +0100 Message-Id: <20230911-topic-mars-v2-0-3dac84b88c4b@linaro.org> 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 X-B4-Tracking: v=1; b=H4sIAJiUxmUC/22Nyw6CMBBFf4XM2pq2GB6u+A/DogMDTIItmSLRE P7dytrlOcm9Z4dIwhThnu0gtHHk4BPYSwbd5PxIivvEYLXNdW2MWsPCnXo6iYoKjWhtUd+MgTR AF0mhON9NaeJf85zkIjTw+yw82sQTxzXI5wxu5mf/fm9GaeXKPq9wqErssZnZOwnXICO0x3F8A QJrgOS6AAAA To: Stanimir Varbanov , Vikash Garodia , Bryan O'Donoghue , Andy Gross , Bjorn Andersson , Mauro Carvalho Chehab , Dikshita Agarwal , Philipp Zabel Cc: Marijn Suijten , Stanimir Varbanov , Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1707512985; l=3004; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=TgTIkiOxuNQ1a1CE04BAe5d7kMkxUJYrxgLOnh2qf5U=; b=4E4Xj8JeeWumhLvEF97sjvNXDl6V4F3zd2uZrwHnLMGfgoO7ZGRov80cFAWxL4uXFVyaVrdHd RVufMbhax15Baz/ovN9jGOLHIzXFqjiq2eE5BVJbof2zqgcDd71/ikd X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= With the driver supporting multiple generations of hardware, some mold has definitely grown over the code.. This series attempts to amend this situation a bit by commonizing some code paths and fixing some bugs while at it. Only tested on SM8250. Definitely needs testing on: - SDM845 with old bindings - SDM845 with new bindings or 7180 - MSM8916 - MSM8996 Signed-off-by: Konrad Dybcio --- Changes in v2: - Fix "set but unused" warning in "Drop cache properties in resource struct" - Fix modular build with "Commonize vdec_get()" - Rebase - Test again on 8250, since nobody else tested other platforms since the last submission (or at least hasn't reported that), I'm assuming nobody cares - Needs to be tested atop [1] and similar, it's in latest -next already - Link to v1: https://lore.kernel.org/r/20230911-topic-mars-v1-0-a7d38bf87bdb@linaro.org [1] https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/commit/?h=for-next&id=d2cd22c9c384aa50c0b4530e842bd078427e6279 --- Konrad Dybcio (20): media: venus: pm_helpers: Only set rate of the core clock in core_clks_enable media: venus: pm_helpers: Rename core_clks_get to venus_clks_get media: venus: pm_helpers: Add kerneldoc to venus_clks_get() media: venus: core: Set OPP clkname in a common code path media: venus: pm_helpers: Kill dead code media: venus: pm_helpers: Move reset acquisition to common code media: venus: core: Constify all members of the resource struct media: venus: core: Deduplicate OPP genpd names media: venus: core: Get rid of vcodec_num media: venus: core: Drop cache properties in resource struct media: venus: core: Use GENMASK for dma_mask media: venus: core: Remove cp_start media: venus: pm_helpers: Commonize core_power media: venus: pm_helpers: Remove pm_ops->core_put media: venus: core: Define a pointer to core->res media: venus: pm_helpers: Simplify vcodec clock handling media: venus: pm_helpers: Commonize getting clocks and GenPDs media: venus: pm_helpers: Commonize vdec_get() media: venus: pm_helpers: Commonize venc_get() media: venus: pm_helpers: Use reset_bulk API drivers/media/platform/qcom/venus/core.c | 139 ++++------- drivers/media/platform/qcom/venus/core.h | 66 +++-- drivers/media/platform/qcom/venus/firmware.c | 3 +- drivers/media/platform/qcom/venus/hfi_venus.c | 10 +- drivers/media/platform/qcom/venus/pm_helpers.c | 323 +++++++++---------------- drivers/media/platform/qcom/venus/pm_helpers.h | 10 +- drivers/media/platform/qcom/venus/vdec.c | 9 +- drivers/media/platform/qcom/venus/venc.c | 9 +- 8 files changed, 213 insertions(+), 356 deletions(-) --- base-commit: 445a555e0623387fa9b94e68e61681717e70200a change-id: 20230911-topic-mars-e60bb2269411 Best regards, -- Konrad Dybcio