From patchwork Wed Jan 19 22:16:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 533281 Delivered-To: patch@linaro.org Received: by 2002:ac0:f7d2:0:0:0:0:0 with SMTP id i18csp1275088imr; Wed, 19 Jan 2022 14:16:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJyRB7YLJZmhzU7CTuBBf5GkaQ94JBIXBXTilhVFuTUdg7zgYrLR+LEjdFk/b7WbSu8uoYo+ X-Received: by 2002:a05:6402:42ce:: with SMTP id i14mr33574982edc.289.1642630587032; Wed, 19 Jan 2022 14:16:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642630587; cv=none; d=google.com; s=arc-20160816; b=k+cTY6M0ZWFsZMlMt4zhM6nyMtWP4pO6fL7mUhXyJt4L12H2JqA7cptJnIenBmlbEn Dc97KNJee6t2IKIyg6Q+qXokX5j6VathPfN+UF/4vA8w+GdOvOJpUUxnOAN83HUUfcT5 LCvr/eqBpm+wGArgRJ5wcffvEn/yekNIqW1y3OSBFFsv11ppQ/cvEMcT+X+0r+hOd0wh W7LNekjQ5TOHD6PYUaV6uMWIEAA2QbA0eXy5CGHWOTMmFdzu+4WXnV4+O9AwHcmoVSlh L63Xc2H7KPdik1b7FpK1UILpRpA1YMo7x/WE7o75AuJPL6A6UV8/CgzjPldr6eD+jFsU wzFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature :delivered-to; bh=wentIdGMex7cJsypmwDQmsmO24X3lRILvlbSaTQV1CE=; b=mUpnDiXjNXxtMVruJmcRj1NsryTdWWHJvIC263H8xASEfu2HE7zAQa9l+bylXjWe4j PwzuqYmRD1uQm41SugrwPhYsrOoB+JeXj2PgNS54v3rp0SEDBxBhv/ADA/uY55UaovSs H3A30imFpnzEvUaTDTV5cnhH97cbFIz8hkc8nnBnfnYedOvhl25orRat267vCKzRZmrZ dUqYLZNm93N0ySNa6ZkEnwC+/D6o8O82YmZ8aVCR6ujutFn1OlZAk6CraG6oGlOt4ItG 4HNU8lK6oSR+WS94DjiqBr5sPSHiAix6old04i5ZY5eh98Cz90Cq2Gp/fci44F/kdMIL WJFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=codcPLfy; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id d10si578104ejm.131.2022.01.19.14.16.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jan 2022 14:16:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=codcPLfy; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1AC1F10E1F5; Wed, 19 Jan 2022 22:16:21 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by gabe.freedesktop.org (Postfix) with ESMTPS id BDE0010E1F5 for ; Wed, 19 Jan 2022 22:16:19 +0000 (UTC) Received: by mail-lf1-x133.google.com with SMTP id s30so13951281lfo.7 for ; Wed, 19 Jan 2022 14:16:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=wentIdGMex7cJsypmwDQmsmO24X3lRILvlbSaTQV1CE=; b=codcPLfy/wN5lv0LpcSen1o7LnvOWLomPolURzU8l5GS0JIzHXuAX9sF+nJICfBwz+ FGZi88g5QZI4vnNCHAfjI88yrW2EexSYY4AA2eGlIg/VIRMS+Tk8ff6ITMezaNSdsXvz S6Hxhd0udKBxmDl7caK+uFMyz4WomgnAgTgFUTPlDP5/d+HYvyOqVw5ZI25IPDwbTI0q V/JtSbVSFwvbO4Tabrlv5IGYwsARj7a2xFPt54+DBxu/vyc9hlxf4+hb3x0VNYgJ1JlN vFLMI4ITTO3bjEIREuFFqqRMkUqmqq6AqgjiYpc/2DpoUPHwn1kO09EriGceEv455AYl BkSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=wentIdGMex7cJsypmwDQmsmO24X3lRILvlbSaTQV1CE=; b=sdCKBpO2HJKkyKC204C9OUwf41NVNH54duft6CfjSq4+pxXPfMngQRUTnrhMleNzeN NXeRQ1ZmEGwvoVAVgbC6JS8U4AcniSRTB9TXKQEq0qeGc8P8e45g4FKXTFsSqI9Z7zTg 1KguygTNqtjbaVOQMUGsz3z6AOP1LzhyswpZGdatwUPOr7EirRapR0w0gFg2amomG/ah mzzts3KQX9YG6NMrSaFtzi5v/madqE/rsd0h7soWBbu3yN8h3W8DQ/zaSxI/GyaCopqD NLixQ5ahycGBJyXAUZhbkGAq9eFG99TR2B8gKFGkIdrdEpGbWOjd6HOBrWle4L01st/W PoIQ== X-Gm-Message-State: AOAM533eIp8n7S5MeHweZhF7bcOsL34JePhOhjdL13FHXQ2O2eIxTOSz 6Zgsv+nAfhmmuZ+Z84o7BvncTns6vCcV9g== X-Received: by 2002:a2e:9646:: with SMTP id z6mr17891630ljh.51.1642630577935; Wed, 19 Jan 2022 14:16:17 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id b11sm89053lfb.277.2022.01.19.14.16.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jan 2022 14:16:17 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v3 0/3] drm/msm: rework clock handling Date: Thu, 20 Jan 2022 01:16:13 +0300 Message-Id: <20220119221616.3089119-1-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, Stephen Boyd , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" msm_dss_clk_*() functions significantly duplicate clk_bulk_* family of functions. Drop custom code and use bulk clocks directly. This also removes dependency of DP driver on the DPU driver internals. Prerequisites: [1] Changes since v2: - Retain conditional code/prints in DP code to ease debugging - Rebase on top of msm-next and [1] - Split helper functions to msm_io_utils.c as suggested by Jessica Changes since v1: - Rebase on top of current tree to fix conflicts Dmitry Baryshkov (3): drm/msm: move utility functions from msm_drv.c drm/msm/dpu: simplify clocks handling drm/msm/dp: rewrite dss_module_power to use bulk clock functions [1] https://patchwork.freedesktop.org/series/98521/ drivers/gpu/drm/msm/Makefile | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 24 +-- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.h | 6 +- drivers/gpu/drm/msm/disp/dpu1/dpu_io_util.c | 187 ------------------ drivers/gpu/drm/msm/disp/dpu1/dpu_io_util.h | 40 ---- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 46 ++--- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 4 +- drivers/gpu/drm/msm/disp/dpu1/dpu_mdss.c | 26 +-- drivers/gpu/drm/msm/dp/dp_ctrl.c | 19 +- drivers/gpu/drm/msm/dp/dp_parser.c | 21 +- drivers/gpu/drm/msm/dp/dp_parser.h | 17 +- drivers/gpu/drm/msm/dp/dp_power.c | 82 +++++--- drivers/gpu/drm/msm/msm_drv.c | 119 +---------- drivers/gpu/drm/msm/msm_drv.h | 1 + drivers/gpu/drm/msm/msm_io_utils.c | 176 +++++++++++++++++ 15 files changed, 305 insertions(+), 465 deletions(-) delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_io_util.c delete mode 100644 drivers/gpu/drm/msm/disp/dpu1/dpu_io_util.h create mode 100644 drivers/gpu/drm/msm/msm_io_utils.c base-commit: 6ed95285382d6f90a3c3a11d5806a5eb7db715c3 prerequisite-patch-id: b5572c353efa8ebefb32fc70e54bc537f78ff2bd prerequisite-patch-id: 40a854aee69b6ddf5b1c33cac3647efae3e3ebf1 prerequisite-patch-id: 8b687a19047983e26262a1bb2feda8a9fd5bc97f