From patchwork Wed Dec 1 22:26:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 519736 Delivered-To: patch@linaro.org Received: by 2002:a05:6e04:2287:0:0:0:0 with SMTP id bl7csp901329imb; Wed, 1 Dec 2021 14:26:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJwNGGS6sbC4JoWlfMU9F06L+M4P88kvW5K0l/G7U3DV1Oon2tWP+QZhkCpLEaf9ahMWkniv X-Received: by 2002:a17:90a:bb84:: with SMTP id v4mr1344966pjr.4.1638397607173; Wed, 01 Dec 2021 14:26:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1638397607; cv=none; d=google.com; s=arc-20160816; b=onA6rAIYTqmlM8maLhEXafVcO3vlTTREf3ACvXDQxLVy+3GsLD/fsLv9Xgu6aJmbAA 7vMzcLsxQbtDgzl7j5+dvnRVo/+7Y2fyUc7mMe8z50HIdyvMMdZ5erPUYdv1MdSdjBWY D6N8CjkW6jrOJhjd+mJ3X8AM59m34aQEqkkeDhrK51vzZHVQwGfl9sTnq1o7nAEgjsI/ nOSgksTh1S/BjmTh4LzbENxavjv9Wn/LhZzZRRzuSlfJv4NHH+NPM8N+RfCC83Vo9rs9 oIC/xKq3TCVpC2QkBgzKlZ7mcGzbCdkSkQ94Q4JEOObWRn0wnzdvGeKd4Zi7jFo2Gedh zEQA== 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:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=0qHFC39MMQLTtRc5sw1zcOnT/8/n0zap/VYN85e7NQY=; b=yNny+yVPK7p4yz1WAC9k9y4TynhP9NGwtYFrlXL2x3OFzJ9XfoGwhCsjQ+L63094RI eJBvaChUtJDn3jNJtO4vpHMwPoupt90DCsd1QaQ5RgSWc+K6DVfzZV6fJ0c2aAXFRR1t RgxsoSNkPrwf7BtIpa/Zj/FiUYdo+4famHsDlDNTPnRxlOTNQDdwO6A6EJ3UlxJE8Ysp 4dPo0qeKL4Beng/+0gVnJSO7Spx9N+3iXXR8rGJvqzoBqSZ9686jRPQmrpNVjYkOappQ Oz0WBSVbe/DQ2ii8mpsMpl9CUc8d61KDVR8luv8kX/O69HUAsO//ooJ+pLi9d6UWCdKB qKlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="xQyZ/T3V"; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 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. [131.252.210.177]) by mx.google.com with ESMTPS id y185si1065241pgd.513.2021.12.01.14.26.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Dec 2021 14:26:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="xQyZ/T3V"; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 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 B41546E0F8; Wed, 1 Dec 2021 22:26:40 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by gabe.freedesktop.org (Postfix) with ESMTPS id 29FD66E0F8 for ; Wed, 1 Dec 2021 22:26:39 +0000 (UTC) Received: by mail-lj1-x22d.google.com with SMTP id k23so51160471lje.1 for ; Wed, 01 Dec 2021 14:26:39 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=0qHFC39MMQLTtRc5sw1zcOnT/8/n0zap/VYN85e7NQY=; b=xQyZ/T3V3d+B4MyJooZjnOvbi3IkbJ/m6Tdy99ST4t37kGSiJQ7wVmPxPLQvfKg9q3 aXAZZvwuAJ7VKVNgBRmx8U4eIgcT7h7+rYRM5UrzZLcmfun4Po+6yWdA6qGFhb91rQsA MnwmrXVmBqlIeYp+uBhTOpmArpG9mOsLO4+LD0IFB2l8JJ4s2TZ1ukvCNRTx3MxfkzYM QTvDNI2CAwzxeMU/sCJZHzzR3RBQKUTdzDtqIwAt3ZFDfdjp++DY40LKCpRhq0fduTPh DgK37yjhoFA/sm5WasiLNDwWkWNUPOHukhxrkN81g/3LYwxuDtr3+1sulGZfPA1VTRHm QCpw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=0qHFC39MMQLTtRc5sw1zcOnT/8/n0zap/VYN85e7NQY=; b=4+ztil7mAYc1MGBUcSB5RQyF5TLpkqDxHdKSycw7UiJxTD88FC/o6xRNIfEaU0UVoW Hy9VrCTIPsomd7gNSjHrghMJAcGJfEPENt5d6QsvP86UpW+1wK6mnfC3GnU6e9skY0hA LgQfLVvWQILYy0SDKiYoVeDv/oXQggSS2gS5CmCr/f75yGv3vmWnLQfpx4WO2xk3Q2lO X2jT4qUA3LkcMCK7LslLEqolWj5/xyz5K957h/SVnUpwAG2e20Ar17qcRBPACMoLNtR+ nmvJq7/1ctjk/cPcvTMZP1DjsWY5UZ8eyPsfAyqLdggCyz9PIJZv0isfQcAddRBQ2+al nZpA== X-Gm-Message-State: AOAM532sWuLrwTBcSZganfJfq7x7eBBnkPVb6baVQu92VBz5BcGH2CZE IaqkMjbnFics7M2dXnfoFEeUBw== X-Received: by 2002:a2e:3304:: with SMTP id d4mr8026724ljc.377.1638397597359; Wed, 01 Dec 2021 14:26:37 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id u7sm117004lfs.144.2021.12.01.14.26.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Dec 2021 14:26:37 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v1 1/8] drm/msm/dpu: move disable_danger out of plane subdir Date: Thu, 2 Dec 2021 01:26:26 +0300 Message-Id: <20211201222633.2476780-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211201222633.2476780-1-dmitry.baryshkov@linaro.org> References: <20211201222633.2476780-1-dmitry.baryshkov@linaro.org> 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: Stephen Boyd , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, David Airlie , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The disable_danger debugfs file is not related to a single plane. Instead it is used by all registered planes. Move it from plane subtree to the global subtree next to danger_status and safe_status files, so that the new file supplements them. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 70 +++++++++++++++++++++ drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 74 +---------------------- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h | 6 ++ 3 files changed, 77 insertions(+), 73 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c index 6c457c419412..259d438bc6e8 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c @@ -101,6 +101,73 @@ static int dpu_debugfs_safe_stats_show(struct seq_file *s, void *v) } DEFINE_SHOW_ATTRIBUTE(dpu_debugfs_safe_stats); +static ssize_t _dpu_plane_danger_read(struct file *file, + char __user *buff, size_t count, loff_t *ppos) +{ + struct dpu_kms *kms = file->private_data; + int len; + char buf[40]; + + len = scnprintf(buf, sizeof(buf), "%d\n", !kms->has_danger_ctrl); + + return simple_read_from_buffer(buff, count, ppos, buf, len); +} + +static void _dpu_plane_set_danger_state(struct dpu_kms *kms, bool enable) +{ + struct drm_plane *plane; + + drm_for_each_plane(plane, kms->dev) { + if (plane->fb && plane->state) { + dpu_plane_danger_signal_ctrl(plane, enable); + DPU_DEBUG("plane:%d img:%dx%d ", + plane->base.id, plane->fb->width, + plane->fb->height); + DPU_DEBUG("src[%d,%d,%d,%d] dst[%d,%d,%d,%d]\n", + plane->state->src_x >> 16, + plane->state->src_y >> 16, + plane->state->src_w >> 16, + plane->state->src_h >> 16, + plane->state->crtc_x, plane->state->crtc_y, + plane->state->crtc_w, plane->state->crtc_h); + } else { + DPU_DEBUG("Inactive plane:%d\n", plane->base.id); + } + } +} + +static ssize_t _dpu_plane_danger_write(struct file *file, + const char __user *user_buf, size_t count, loff_t *ppos) +{ + struct dpu_kms *kms = file->private_data; + int disable_panic; + int ret; + + ret = kstrtouint_from_user(user_buf, count, 0, &disable_panic); + if (ret) + return ret; + + if (disable_panic) { + /* Disable panic signal for all active pipes */ + DPU_DEBUG("Disabling danger:\n"); + _dpu_plane_set_danger_state(kms, false); + kms->has_danger_ctrl = false; + } else { + /* Enable panic signal for all active pipes */ + DPU_DEBUG("Enabling danger:\n"); + kms->has_danger_ctrl = true; + _dpu_plane_set_danger_state(kms, true); + } + + return count; +} + +static const struct file_operations dpu_plane_danger_enable = { + .open = simple_open, + .read = _dpu_plane_danger_read, + .write = _dpu_plane_danger_write, +}; + static void dpu_debugfs_danger_init(struct dpu_kms *dpu_kms, struct dentry *parent) { @@ -110,6 +177,9 @@ static void dpu_debugfs_danger_init(struct dpu_kms *dpu_kms, dpu_kms, &dpu_debugfs_danger_stats_fops); debugfs_create_file("safe_status", 0600, entry, dpu_kms, &dpu_debugfs_safe_stats_fops); + debugfs_create_file("disable_danger", 0600, entry, + dpu_kms, &dpu_plane_danger_enable); + } static int _dpu_debugfs_show_regset32(struct seq_file *s, void *data) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c index ca190d92f0d5..6ea4db061c9f 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c @@ -1350,7 +1350,7 @@ static void dpu_plane_reset(struct drm_plane *plane) } #ifdef CONFIG_DEBUG_FS -static void dpu_plane_danger_signal_ctrl(struct drm_plane *plane, bool enable) +void dpu_plane_danger_signal_ctrl(struct drm_plane *plane, bool enable) { struct dpu_plane *pdpu = to_dpu_plane(plane); struct dpu_kms *dpu_kms = _dpu_plane_get_kms(plane); @@ -1363,73 +1363,6 @@ static void dpu_plane_danger_signal_ctrl(struct drm_plane *plane, bool enable) pm_runtime_put_sync(&dpu_kms->pdev->dev); } -static ssize_t _dpu_plane_danger_read(struct file *file, - char __user *buff, size_t count, loff_t *ppos) -{ - struct dpu_kms *kms = file->private_data; - int len; - char buf[40]; - - len = scnprintf(buf, sizeof(buf), "%d\n", !kms->has_danger_ctrl); - - return simple_read_from_buffer(buff, count, ppos, buf, len); -} - -static void _dpu_plane_set_danger_state(struct dpu_kms *kms, bool enable) -{ - struct drm_plane *plane; - - drm_for_each_plane(plane, kms->dev) { - if (plane->fb && plane->state) { - dpu_plane_danger_signal_ctrl(plane, enable); - DPU_DEBUG("plane:%d img:%dx%d ", - plane->base.id, plane->fb->width, - plane->fb->height); - DPU_DEBUG("src[%d,%d,%d,%d] dst[%d,%d,%d,%d]\n", - plane->state->src_x >> 16, - plane->state->src_y >> 16, - plane->state->src_w >> 16, - plane->state->src_h >> 16, - plane->state->crtc_x, plane->state->crtc_y, - plane->state->crtc_w, plane->state->crtc_h); - } else { - DPU_DEBUG("Inactive plane:%d\n", plane->base.id); - } - } -} - -static ssize_t _dpu_plane_danger_write(struct file *file, - const char __user *user_buf, size_t count, loff_t *ppos) -{ - struct dpu_kms *kms = file->private_data; - int disable_panic; - int ret; - - ret = kstrtouint_from_user(user_buf, count, 0, &disable_panic); - if (ret) - return ret; - - if (disable_panic) { - /* Disable panic signal for all active pipes */ - DPU_DEBUG("Disabling danger:\n"); - _dpu_plane_set_danger_state(kms, false); - kms->has_danger_ctrl = false; - } else { - /* Enable panic signal for all active pipes */ - DPU_DEBUG("Enabling danger:\n"); - kms->has_danger_ctrl = true; - _dpu_plane_set_danger_state(kms, true); - } - - return count; -} - -static const struct file_operations dpu_plane_danger_enable = { - .open = simple_open, - .read = _dpu_plane_danger_read, - .write = _dpu_plane_danger_write, -}; - static int _dpu_plane_init_debugfs(struct drm_plane *plane) { struct dpu_plane *pdpu = to_dpu_plane(plane); @@ -1498,11 +1431,6 @@ static int _dpu_plane_init_debugfs(struct drm_plane *plane) pdpu->debugfs_root, (u32 *) &sblk->danger_vblank); - debugfs_create_file("disable_danger", - 0600, - pdpu->debugfs_root, - kms, &dpu_plane_danger_enable); - return 0; } #else diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h index 52792526e904..7667b1f81bd4 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.h @@ -132,4 +132,10 @@ void dpu_plane_clear_multirect(const struct drm_plane_state *drm_state); int dpu_plane_color_fill(struct drm_plane *plane, uint32_t color, uint32_t alpha); +#ifdef CONFIG_DEBUG_FS +void dpu_plane_danger_signal_ctrl(struct drm_plane *plane, bool enable); +#else +static inline void dpu_plane_danger_signal_ctrl(struct drm_plane *plane, bool enable) {} +#endif + #endif /* _DPU_PLANE_H_ */ From patchwork Wed Dec 1 22:26:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 519738 Delivered-To: patch@linaro.org Received: by 2002:a05:6e04:2287:0:0:0:0 with SMTP id bl7csp901454imb; Wed, 1 Dec 2021 14:26:55 -0800 (PST) X-Google-Smtp-Source: ABdhPJwxBtMiZ7fab64sp4JvFZDOYkz9eKE51MKHKGCnPOySkxQGvKLo6jVyupCQSx4RKBG5wdaE X-Received: by 2002:a17:90a:ac0b:: with SMTP id o11mr1251118pjq.143.1638397614896; Wed, 01 Dec 2021 14:26:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1638397614; cv=none; d=google.com; s=arc-20160816; b=q0fb+hPBOVZzgqC+4qqv4t3W7g7u0kYfhS/RzVxLFtrMTiutsZcTTqLsOdv+JXIWNe r521hLthoaeTNxa5rSgvZDkIkUFW55dBMUO/2v8orUHqHVBeWOj7SESKmPdkYM5IjdWn INBPwIV5697gyzix0xvXFZMWip1rpcGRXTZv6iTMN1hdzYZM87/dqFj5j4RK0MQTHVXW svW2dpbwhokTOs9XTfezdbqs1X2Sg5U2X6UpxAz83kKsZ8h6mfQbnD75OnC8e0u3ZuVl CS6tWlXUYt52jlqz0CUIJ/lwQTAOKq+89bWaKHaKHR7Z9UJxuBM83hRyN+VOSq4jf46z YJ0g== 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:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=QyBeyBWo65CT6xBgTBhfrozb0bd0F4LFSrE6RAMpJzI=; b=E0uSwQo4/RoPkF+7kRgf1V2ePF5u4OLUcC3egt6em7gD5w+NUuwUVIA07aULd2PSXD gd2epW4no4gFF29FX0p4W9QogG6LiT7wIo7mryNxvrZ+VU0/Yj42hxlRWzGG37Wmmu9a fFzidN0OaGBSrTdkmgfG7ddHABGjr0ViVfLm2U2EAEzKS7Cztdqgkwpr5bbDNwrBrnKC HPYdnDYqW7an7wL+nEhbf6DKiP6AMF0rP58p+JqtWWKSnJydd7jp+y5kPAhJQQY9O3Yo kad8Qc79xS37pcU/3BNNCB1lXPSXX2E3dDsQ0rzCF+M9sBz+fpTC48oFF61NfqGmiFpr vArw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=sK7eFA3m; 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 x7si739241pjv.149.2021.12.01.14.26.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Dec 2021 14:26:54 -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=sK7eFA3m; 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 586D76E8BC; Wed, 1 Dec 2021 22:26:41 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by gabe.freedesktop.org (Postfix) with ESMTPS id C94436E5A1 for ; Wed, 1 Dec 2021 22:26:39 +0000 (UTC) Received: by mail-lj1-x22d.google.com with SMTP id 207so51020373ljf.10 for ; Wed, 01 Dec 2021 14:26:39 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=QyBeyBWo65CT6xBgTBhfrozb0bd0F4LFSrE6RAMpJzI=; b=sK7eFA3m+/qIm4InYAdUjHyflgJOPhbZO0tlnNIjvXk2ys/rqr1BOKT3XPAh/NHoPB +n8pPsvqHQFOH0aLEJhEbX0oroiWtMp1eSv7/Sj/k126jPjoSqTC08BUX8wKrJCAcS8z gdI7sHJ7QRFnhqwXg0czGXLa8wBGaBNmRakIWicAgIJOsgGz2NYfgRRo2JaINCaYZUuE NcqHEnffPSufbrhvCAJgCSsF++f+wstM81yAjFyVu3O00oQGzgQZvi65UNgiFrtlvCDR fxm7lUOSk85c1GTzCQiJewtCqGOLHv8FJc36PUI/6ON1z5J4uaj2MbKcgapsogFYwDLg 5ftg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=QyBeyBWo65CT6xBgTBhfrozb0bd0F4LFSrE6RAMpJzI=; b=g5HS7+Ix/gCE2v15t53St0limPxktBuojdTJyziPlp7iI187iPrCOBUuWgavBUyUc+ GvSQEWhklOeid9x/R/k2jXHg/r1b6/Bjpr42joaVGkocea8C5pYWFt5ReH+neJEpSFSC 4xiEWlPGlFk1rs3VkcwqhOuUDsbgHzTytE8Hya57nt+3xYnUHBvYvK8wWF+EIHUglWY7 qYrZ/gtiGdYJpo9cfL4IKiqQaDaFhWMs411ZFMzjyVb6XowBfWDVGfz1MPWtTIpPKn5a TxoM3Bfg/VfRCkJvodbvAQZfL0KT+Ns/Z5B2yu49LTNFw1Ewq4O4nlxJnJt3zrzlTTAM qISg== X-Gm-Message-State: AOAM532uqri3B2NiJaBxNS7kGTaiZf1eJ9C7SgEW17IzP7Ep7qz6YjhF fIqQYw0xpf4GFnmqKJCIe0Yw8g== X-Received: by 2002:a05:651c:1696:: with SMTP id bd22mr8162728ljb.57.1638397598092; Wed, 01 Dec 2021 14:26:38 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id u7sm117004lfs.144.2021.12.01.14.26.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Dec 2021 14:26:37 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v1 2/8] drm/msm/dpu: fix safe status debugfs file Date: Thu, 2 Dec 2021 01:26:27 +0300 Message-Id: <20211201222633.2476780-3-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211201222633.2476780-1-dmitry.baryshkov@linaro.org> References: <20211201222633.2476780-1-dmitry.baryshkov@linaro.org> 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: Stephen Boyd , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, David Airlie , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Make safe_status debugfs fs file actually return safe status rather than danger status data. Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c index 259d438bc6e8..e7f0cded2c6b 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c @@ -73,8 +73,8 @@ static int _dpu_danger_signal_status(struct seq_file *s, &status); } else { seq_puts(s, "\nSafe signal status:\n"); - if (kms->hw_mdp->ops.get_danger_status) - kms->hw_mdp->ops.get_danger_status(kms->hw_mdp, + if (kms->hw_mdp->ops.get_safe_status) + kms->hw_mdp->ops.get_safe_status(kms->hw_mdp, &status); } pm_runtime_put_sync(&kms->pdev->dev); From patchwork Wed Dec 1 22:26:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 519739 Delivered-To: patch@linaro.org Received: by 2002:a05:6e04:2287:0:0:0:0 with SMTP id bl7csp901494imb; Wed, 1 Dec 2021 14:26:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJxNFQi2rIoAFePR9OxEQR/X1iK2kQExDG2BoLiiBlkBTiTzNwv2eWGFpiC76W3lMLfXJAD+ X-Received: by 2002:a17:90b:1b03:: with SMTP id nu3mr1275621pjb.240.1638397617181; Wed, 01 Dec 2021 14:26:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1638397617; cv=none; d=google.com; s=arc-20160816; b=VItbeUmk0KIDhiZ8UeCx5rkmd2GMmcfvgOGaOOimhP83ePDNPD9p4dfRJpn4jPS3ze UjXPnVgI1attAR5s+naQM0Rh3o4tGBHfkb62iDXoyEZ1KF8DIN0R76BmQe54oHr/MK9f 11Fj9t3VcRCzZz3dvXPLSpyAXaDm/fIkztbNJCTqZ6K0FNQvqn3xkdG+34QvUC1utYQR KZ6MT8mlnknkD7uFGfLnu5EuJVlzeWeIljn7gHtehhMnY27TZ4U3C2jAnizydhqWX5Dn p+euTA4YJhBJIXenntLkIfZa3rmUNnp3COl2a1JoIj2c0rB3+AJPsDXPosrRfpMJCzaV zM4A== 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:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=fWCoIosLOkr8+Xp5Tky7xqwPwu8pC3ri4jt2sulhCRE=; b=MwaQJciSk1mlm6jRerl5rrn6BE+JB9ehGlbOEZefMFFPdg5ou4lAs/Q8T+e71ToB3y ieyalnqj0Pgp9cZPHyjGaRtC2aYXLju2NhVH5AX7Q2lgT/XuP0iaPqZA+JnWgeHlr+hw bhPedA3qqIrxzRMBgmC8R9Xdapo4+9AI7sWZZnkEDjToLFxHoB43dE1aeXUNZhZMvxwX HPXzGPbqhWoFpodIT4GQNxgdCdAQvZIVGwPMSd8bZGb6IHg0dqeim9tgbgQhFTy8WvGu qWno3f3dEWzJqPZ2IQQv6QEgNx3ZItOAlNZ9Ed4QCPjmSt/s2mxkVpPAt53EZ/cel2NF R03g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=Xb2SvLb1; 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 d12si664482pjw.79.2021.12.01.14.26.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Dec 2021 14:26:57 -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=Xb2SvLb1; 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 4535F6E91B; Wed, 1 Dec 2021 22:26:42 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) by gabe.freedesktop.org (Postfix) with ESMTPS id 678C56E0F8 for ; Wed, 1 Dec 2021 22:26:40 +0000 (UTC) Received: by mail-lj1-x234.google.com with SMTP id u22so51106962lju.7 for ; Wed, 01 Dec 2021 14:26:40 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=fWCoIosLOkr8+Xp5Tky7xqwPwu8pC3ri4jt2sulhCRE=; b=Xb2SvLb1ZZ9tHGymd8d9tmuvelPOGxTOoUuK6Q+FG9Z7F/abPDzE7TWHp5oaeghX1o 4An2eEl8JdsG302stGkaHUsC3nGi2P63gWMK0mpa9/nHbZcm4HAlW9xNEzAxzqurhFW2 wzRu8qBkPI0gInFNlPjNACnxkzc00sxQqGzQvDu9rt50yzoqeKmdaffo7vzjqxEkLAaG mMQ/LqlRPSlq2vFUF+EeSgwh6FkbCcptBR8jHmOd5Vz1+kPQ1aDnM/NkpN8KWoJOolxP sR+kXa31AlkkzO29iSFuo7gkIhOE/+nBlJ4zJoENqYuJDY42NuJqTUjUhOYUZ5C4Ausf fijg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=fWCoIosLOkr8+Xp5Tky7xqwPwu8pC3ri4jt2sulhCRE=; b=osIHeCdynusSYeAtSs2z9TKEcfoxw5qHSZslx87kTzykenquvUFuLWTF8o21FjydyP //mWtfF3s7IeSvo/aJ1AFuqOVcITIpD6HvEWJVpQwQ/3DS8/GsKNfCWoavqLu+rM99Mp NK41xzfyVebfnZ3RAaDeTAJJ2EjLfYbJqaqs17h5Jc18zu4wkPSnD1NgzslCvV3xELcB +82Lla5b6kPXEMYQixyfXObNlrzCyrmy9Kf/dv5VVr4R4+5B8nODuTe9TJji+MPI53E5 9uWK1SsCwcn8Nk2uUncPAMNajlRLOJ91s9YzjK6/kgojgjI90TJmi6SxL0De40+v+k/i +F8A== X-Gm-Message-State: AOAM533mfKtPO/ToY+ZbPO86DaNYhwhHRgSxEaZPgdmUpuAoOEdDu3MU wLjrhsnZkfqr1bDfhrXpF/HZ9Q== X-Received: by 2002:a2e:9dc8:: with SMTP id x8mr8170843ljj.502.1638397598784; Wed, 01 Dec 2021 14:26:38 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id u7sm117004lfs.144.2021.12.01.14.26.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Dec 2021 14:26:38 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v1 3/8] drm/msm/dpu: make danger_status/safe_status readable Date: Thu, 2 Dec 2021 01:26:28 +0300 Message-Id: <20211201222633.2476780-4-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211201222633.2476780-1-dmitry.baryshkov@linaro.org> References: <20211201222633.2476780-1-dmitry.baryshkov@linaro.org> 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: Stephen Boyd , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, David Airlie , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Change \t to \n in the print format to stop putting all SSPP status in a single line. Splitting it to one SSPP per line is much more readable. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c index e7f0cded2c6b..4c04982c71b2 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c @@ -82,7 +82,7 @@ static int _dpu_danger_signal_status(struct seq_file *s, seq_printf(s, "MDP : 0x%x\n", status.mdp); for (i = SSPP_VIG0; i < SSPP_MAX; i++) - seq_printf(s, "SSPP%d : 0x%x \t", i - SSPP_VIG0, + seq_printf(s, "SSPP%d : 0x%x \n", i - SSPP_VIG0, status.sspp[i]); seq_puts(s, "\n"); From patchwork Wed Dec 1 22:26:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 519740 Delivered-To: patch@linaro.org Received: by 2002:a05:6e04:2287:0:0:0:0 with SMTP id bl7csp901532imb; Wed, 1 Dec 2021 14:26:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJwRDTuBZcMpAt8F9vf2qaEiWfA8+fyiijFpGdlYcBwT6Q5jgtI7t8G02ZnXLtB9aSvzyD20 X-Received: by 2002:a17:90a:2ec8:: with SMTP id h8mr1253043pjs.168.1638397619420; Wed, 01 Dec 2021 14:26:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1638397619; cv=none; d=google.com; s=arc-20160816; b=XFoWsHdw2oNr/osG4VATb67nVyMIohqC7CKaQhYwCdN7V+UDauk50giJXXxzq3XSkk rw6iEe/zwku+Ljwh4146GpFx1N2AeLiooymU6Kon48d5GCx32mQOLzx1M2kAqXFPWEF4 0dG2Mg4nY+k4mRTvNW3OSmJpzIEqpPfRuURToT/97yjz1UGvsNev3l1S243wcD9YL1E/ zm2p1oGyPYj2/ztDQ1Fils5OOiFk0Luj7lB9RPHk49s/LqQbjK3qLN2dsLpEBv+P0E5/ WHxBFs4L1G9agrITBANPwzdmKC+wRuDz+zZwdgFyB2h533tIVbo0rrzdCL9fCcFqI2kU S78A== 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:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=F6F3WPxfyMvxOGFVFzP69ATi4vGo49QVFI+qg3mn8Wg=; b=Ljkod9xpUHGTJavkhJThwWZRxyuWe64dSEgSW9wxl8MJABKliYGv6tFyki5hijLYp4 gMdfPREUaKefa1xMIQfMws8xPe5JCO4OILFRIFAbglVqg8HvlsrAZpI70pMW+BagZuQM YqmFbokHsj/YEJIqO/9AdtY7lVswK5zsmMsQ1KYMp9PvcL7pIlRo/MGJGiTWfiV+5h1v iojH6izjKm8nQ93RowrSrKk9dl3+zirpWdG2pdAM0Qa+Ob8nORCC48Dd9KygYEDdXSIR s+iJkrKWlXYQ0CVpwL/ciOojgoYh2PrJ4mUv/V5kDGV0GaFkUj56cHkoztPpM41W62th TOIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=o7ErKwOI; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 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. [131.252.210.177]) by mx.google.com with ESMTPS id go10si616539pjb.105.2021.12.01.14.26.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Dec 2021 14:26:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=o7ErKwOI; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 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 EF1276E944; Wed, 1 Dec 2021 22:26:42 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by gabe.freedesktop.org (Postfix) with ESMTPS id 055FE6E5A1 for ; Wed, 1 Dec 2021 22:26:41 +0000 (UTC) Received: by mail-lj1-x230.google.com with SMTP id m12so12933161ljj.6 for ; Wed, 01 Dec 2021 14:26:40 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=F6F3WPxfyMvxOGFVFzP69ATi4vGo49QVFI+qg3mn8Wg=; b=o7ErKwOInkuJ/TeFfq8CxMf8JeSlpaYibVC+EzB6kuYi1h5PjYv/+Yrrqmv/VC2Phz odHWNsKT6hMpfLMc+RUuoabaabA5QlUU/iOgucmBLoZ7KEAPz0TTkHtlFfhJN+dXZsG8 YHKv4KeSD+tFlotOpoZhRwKoGiLoNPJ/TTekUHIyluUyyLXyXs5msB/Af0QFwp3dUh+g sJPKv0+uBpAhLzPUx960lGn3KJEzkjLzGt9UwxcSRyL2ET4gb4MYEiJIsYpGY+6PGI6z IAuPsfaIsHQruW0pjAH0x/bOr/TDE1llmDiVNrZRLTR8jfYNuq3GN6Lrt6oN+63jxLge plvA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=F6F3WPxfyMvxOGFVFzP69ATi4vGo49QVFI+qg3mn8Wg=; b=wmYK68quBGV3FtBIldSXmVG1+MMSe43wa6ec+7tFkD4Pt0yqBsfEi/TcRyleJfbSEW s0QCngcrBiFY0iSDiOg2sHH+1cHQOfSjE6vxzlMxcaepcLLKYU2Vb3FZMWXqWjCG5D05 Bjis8X+YOGXHJrTnWzK1GP6EbxvfITcD2aXUjnktrtDUmTwunLVqp2T5tYl8FWh+vvYQ 6ozUKs/N2FUrdzJHhHBO+ADKYOWNvKd5+KF6ZlaXFAznyKJmfK1pRpHkDt2aRyigIi15 Tim9Qxd84ae1LJMaB6Wy1CI6qLhpGvhKl7VqMnIEqlxlE2shz9RgdzYh+SjU3aR0q5ec STVQ== X-Gm-Message-State: AOAM531qkTCqMkE+Ckki3SizEg+lY/nJ2Jqkass2eTBakM2Zup/z0n5E 5rhbGWkTvzaUICxpfaI9GlWa3Q== X-Received: by 2002:a2e:b751:: with SMTP id k17mr7950866ljo.467.1638397599403; Wed, 01 Dec 2021 14:26:39 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id u7sm117004lfs.144.2021.12.01.14.26.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Dec 2021 14:26:39 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v1 4/8] drm/msm/dpu: drop plane's default_scaling debugfs file Date: Thu, 2 Dec 2021 01:26:29 +0300 Message-Id: <20211201222633.2476780-5-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211201222633.2476780-1-dmitry.baryshkov@linaro.org> References: <20211201222633.2476780-1-dmitry.baryshkov@linaro.org> 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: Stephen Boyd , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, David Airlie , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Proper support for the 'default_scaling' debugfs file was removed during DPU driver pre-merge cleanup. Remove leftover file. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c index 6ea4db061c9f..f80ee3ba9a8a 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c @@ -114,7 +114,6 @@ struct dpu_plane { struct dpu_debugfs_regset32 debugfs_src; struct dpu_debugfs_regset32 debugfs_scaler; struct dpu_debugfs_regset32 debugfs_csc; - bool debugfs_default_scale; }; static const uint64_t supported_format_modifiers[] = { @@ -1398,10 +1397,6 @@ static int _dpu_plane_init_debugfs(struct drm_plane *plane) dpu_debugfs_create_regset32("scaler_blk", 0400, pdpu->debugfs_root, &pdpu->debugfs_scaler); - debugfs_create_bool("default_scaling", - 0600, - pdpu->debugfs_root, - &pdpu->debugfs_default_scale); } if (cfg->features & BIT(DPU_SSPP_CSC) || From patchwork Wed Dec 1 22:26:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 519741 Delivered-To: patch@linaro.org Received: by 2002:a05:6e04:2287:0:0:0:0 with SMTP id bl7csp901563imb; Wed, 1 Dec 2021 14:27:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJzRpVOZrQDZ2Zsg9wfyTLckByOjWFn+EAQMU25Ca8+x9PTRphpuTuijI3yqKGCPXxUJi85E X-Received: by 2002:a17:90a:fcc:: with SMTP id 70mr1233387pjz.189.1638397621244; Wed, 01 Dec 2021 14:27:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1638397621; cv=none; d=google.com; s=arc-20160816; b=CdPg+JBlhf8Y/1W1YmdDZkiwdFD1mCdGQQ8Nu84A8l2ImysHNePwJ6UbPVI40yAJke bMQMr4g0ntKtz2M1xMJomr8uT3GfW2pyCMXRaA5JzYejLuIh0jr5CW4QNmsjAe0OMODz Mn/gbsmAw5YKDoaJLW7s50yZfTV4ejdWe0rY6Ip+1D8TfutNZofx/WSPOIa1xTtua2Wb RJs8uMUcFjh2KLBvtu7rN3+SE2GqKjFiswPV8ULyIwVJp1nif93t/ih9URnPEOfvEKRP xhDyijLJ3y4NlmNGeARmwphHmCRHS/P1SMrDbefDAQhYTHDLGaTSpguPS0AiqyReu6rD zcZw== 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:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=IPVLDgnWhiffGg+ltlm6jFDDP7VKjhpJAJFiDVdO8N0=; b=MQckGt2HmYuruD6BXRjDklagx9sw6c5fyIWE9pzRhWWj4vk60nOVKKLsyJ7LwIU2Zl ia1LvJlmcpk5V4RJvllUV50gYSe0GRX0pIN3uvZtOPnomFQU70iAH/V769sMUVXvJltl KOoJgQ6lCcOqPZ0n8RytdHMDCEws5OrSYOi3ipK1/ccKmseLOOQPpeRv52RuB+MBUecS /J3GosiDDlLgIb3k410isge6qUxG3IxSZlUJYQtuhruszYGO831Jij3nWTbUAscyvrEM QUlPd5myxqjkYJ3cILaRiY2I4R85qPzjGTdnpbpR9xp81bECiDPiOrK0jjaU2yicMjmP X40A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ffxswi7e; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 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. [131.252.210.177]) by mx.google.com with ESMTPS id h10si1228376pls.321.2021.12.01.14.27.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Dec 2021 14:27:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ffxswi7e; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 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 10BEA6E5A1; Wed, 1 Dec 2021 22:26:44 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x229.google.com (mail-lj1-x229.google.com [IPv6:2a00:1450:4864:20::229]) by gabe.freedesktop.org (Postfix) with ESMTPS id C31776E5A1 for ; Wed, 1 Dec 2021 22:26:41 +0000 (UTC) Received: by mail-lj1-x229.google.com with SMTP id z8so51100623ljz.9 for ; Wed, 01 Dec 2021 14:26:41 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=IPVLDgnWhiffGg+ltlm6jFDDP7VKjhpJAJFiDVdO8N0=; b=ffxswi7e6qVsGwiUetlg2L9vL1KHpzBwwSPSnXcaqR0F41NLuoj5+MLMxsYH137iwu 3k8xqvbXPdWJQ8PFyzOYbJCJlYh7SowrTTwNYar2gKU0n6dAyms1UvLqmLhT3gmpx9iV gHqDa9L28bygXdk0YVphcmvvFrHgtVGRELM61CsjhwjaBu+Ht1AtJymz0E2Gyev57xgu romX3Q6yJu6sGu08xTeu4qDo1L4OfvS7bA5X3uSmfSlnJu0L4wNz814JQWpazv7mxM0J MsLCAp3/HB9+X86Jj4suguB9WlIS4zqZXFrpPWzvF5BwZBL4Z/tv3jGNcJSGZZ64bH5x uhCA== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=IPVLDgnWhiffGg+ltlm6jFDDP7VKjhpJAJFiDVdO8N0=; b=g7LK2FM8ITe1ApydfralqzKgBLpdFSUQ4bbNavgG1xA3cotJYAthHPuNcVHOdEuqsk sjxF+nga02m0QufTLquiN38QGbtie3Q2vo9uJ9jsiZrvrO5a/bOpWMFlFQ5rv2363FQe +Ae3UAdbrXPBivpe5eH7RMDjTCzWCVoDjvAyIwf1PAvAgyt6/w9bV52DE8iamQF9OHn4 7DesUoRHZt5Y0bO3lO4oRPxi4MH6mR6YILQWKP2a3uXX7yLtJgg2UTcy/3Rio3IjL0T4 tK2DlhYn1iDerhqhPbA5Cj28k1DSdwC0WArZWN8pbOqhiXrtBaa0a6ZpwbThidGNsFdQ 5KAg== X-Gm-Message-State: AOAM532q6Ey2hakV3O56aHUyphYydilNfOSEfVtkHKGxq1YezWm0DbjZ EGil9oi1uZgeilMfqIiBQZHwYA== X-Received: by 2002:a2e:b8cf:: with SMTP id s15mr8225808ljp.364.1638397600114; Wed, 01 Dec 2021 14:26:40 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id u7sm117004lfs.144.2021.12.01.14.26.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Dec 2021 14:26:39 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v1 5/8] drm/msm/dpu: stop manually removing debugfs files for the DPU plane Date: Thu, 2 Dec 2021 01:26:30 +0300 Message-Id: <20211201222633.2476780-6-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211201222633.2476780-1-dmitry.baryshkov@linaro.org> References: <20211201222633.2476780-1-dmitry.baryshkov@linaro.org> 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: Stephen Boyd , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, David Airlie , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" DRM code handles removing all debugfs recursively. Drop plane-specific code to perform that. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 28 ++++++++--------------- 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c index f80ee3ba9a8a..d3176f58708e 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c @@ -110,7 +110,6 @@ struct dpu_plane { struct dpu_mdss_cfg *catalog; /* debugfs related stuff */ - struct dentry *debugfs_root; struct dpu_debugfs_regset32 debugfs_src; struct dpu_debugfs_regset32 debugfs_scaler; struct dpu_debugfs_regset32 debugfs_csc; @@ -1368,15 +1367,16 @@ static int _dpu_plane_init_debugfs(struct drm_plane *plane) struct dpu_kms *kms = _dpu_plane_get_kms(plane); const struct dpu_sspp_cfg *cfg = pdpu->pipe_hw->cap; const struct dpu_sspp_sub_blks *sblk = cfg->sblk; + struct dentry *debugfs_root; /* create overall sub-directory for the pipe */ - pdpu->debugfs_root = + debugfs_root = debugfs_create_dir(plane->name, plane->dev->primary->debugfs_root); /* don't error check these */ debugfs_create_xul("features", 0600, - pdpu->debugfs_root, (unsigned long *)&pdpu->pipe_hw->cap->features); + debugfs_root, (unsigned long *)&pdpu->pipe_hw->cap->features); /* add register dump support */ dpu_debugfs_setup_regset32(&pdpu->debugfs_src, @@ -1384,7 +1384,7 @@ static int _dpu_plane_init_debugfs(struct drm_plane *plane) sblk->src_blk.len, kms); dpu_debugfs_create_regset32("src_blk", 0400, - pdpu->debugfs_root, &pdpu->debugfs_src); + debugfs_root, &pdpu->debugfs_src); if (cfg->features & BIT(DPU_SSPP_SCALER_QSEED3) || cfg->features & BIT(DPU_SSPP_SCALER_QSEED3LITE) || @@ -1395,7 +1395,7 @@ static int _dpu_plane_init_debugfs(struct drm_plane *plane) sblk->scaler_blk.len, kms); dpu_debugfs_create_regset32("scaler_blk", 0400, - pdpu->debugfs_root, + debugfs_root, &pdpu->debugfs_scaler); } @@ -1406,24 +1406,24 @@ static int _dpu_plane_init_debugfs(struct drm_plane *plane) sblk->csc_blk.len, kms); dpu_debugfs_create_regset32("csc_blk", 0400, - pdpu->debugfs_root, &pdpu->debugfs_csc); + debugfs_root, &pdpu->debugfs_csc); } debugfs_create_u32("xin_id", 0400, - pdpu->debugfs_root, + debugfs_root, (u32 *) &cfg->xin_id); debugfs_create_u32("clk_ctrl", 0400, - pdpu->debugfs_root, + debugfs_root, (u32 *) &cfg->clk_ctrl); debugfs_create_x32("creq_vblank", 0600, - pdpu->debugfs_root, + debugfs_root, (u32 *) &sblk->creq_vblank); debugfs_create_x32("danger_vblank", 0600, - pdpu->debugfs_root, + debugfs_root, (u32 *) &sblk->danger_vblank); return 0; @@ -1440,13 +1440,6 @@ static int dpu_plane_late_register(struct drm_plane *plane) return _dpu_plane_init_debugfs(plane); } -static void dpu_plane_early_unregister(struct drm_plane *plane) -{ - struct dpu_plane *pdpu = to_dpu_plane(plane); - - debugfs_remove_recursive(pdpu->debugfs_root); -} - static bool dpu_plane_format_mod_supported(struct drm_plane *plane, uint32_t format, uint64_t modifier) { @@ -1472,7 +1465,6 @@ static const struct drm_plane_funcs dpu_plane_funcs = { .atomic_duplicate_state = dpu_plane_duplicate_state, .atomic_destroy_state = dpu_plane_destroy_state, .late_register = dpu_plane_late_register, - .early_unregister = dpu_plane_early_unregister, .format_mod_supported = dpu_plane_format_mod_supported, }; From patchwork Wed Dec 1 22:26:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 519742 Delivered-To: patch@linaro.org Received: by 2002:a05:6e04:2287:0:0:0:0 with SMTP id bl7csp901592imb; Wed, 1 Dec 2021 14:27:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJyATCHCdK895wLMuI/SCUI/lQzDzmNUna2XkkEJzuLE6n3hqo7BNBpja86kNZFYB1DVJUCx X-Received: by 2002:a17:903:283:b0:142:1243:d879 with SMTP id j3-20020a170903028300b001421243d879mr11090019plr.61.1638397623020; Wed, 01 Dec 2021 14:27:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1638397623; cv=none; d=google.com; s=arc-20160816; b=yKXW1v04bLhMNGGHF9ThqzhP5iF2ut8qKxuaoD1VyApRtY3oDQNSscDKpbaO7DynLh JAgcur7hGhJFn6pKBxVjwdpCJXZupmbRaROSiHBmaUcU+ncbVggJAw5CzQntV7bi7Zao o3u9IPiA40NQ+NRJ6hTHtK39CWKcF7OdiysXVXGk33rs5BrLCyf3ZEqP8XIhomz/9eZi plODNWtkHnWakVY2HhItDEslHlLhqSUxjhbReKqNXKaOl+ktHe0A7/TVmR3M2yczWP3S yEdwF/OUOp/FzlM93JYtpxyL4hstiPGJMbAurLzXVlLzeO7LWjvTyOXId0JZyXgLaFsH nJKA== 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:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=TJdNyjaCPbt0SX5JXfaq3vc4wNX+Lqbrq4BbSv0o6ck=; b=BFcl6RZj4yntncFTezwxIpnF6PQlPGoHZYe2fHTZ7Ofo2QklnmjrOvxD2KoEQAW3+U SIS/qTLVieJVgqi9mNnqFnISZnNpxd7ns7WzJ0uyHdbxU1z6M5MjuCp4nUtd2d3DuOav vcF8ZXAncIo7ejZ7F3jseVpJEYlOfOGKNhu36ZdpIKVoITK6XOI8mNuopbkdX6mNlT2H tmF0wC9qeGd0cqUxtOyAagukinABkVqNdFV+rOtxzvlPHaxFaSpK21xySsVZO+4AhKRv BXHAZU4K6MetuQ0yXOeZjyCCRQdMoyhy0/DiCba6qcOSK4c8LyqCtKWBQMGSO5FoGP6U IHdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=gRsXariZ; 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 ob11si922156pjb.136.2021.12.01.14.27.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Dec 2021 14:27:03 -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=gRsXariZ; 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 2BB306E951; Wed, 1 Dec 2021 22:26:43 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6DD0A6E8DA for ; Wed, 1 Dec 2021 22:26:42 +0000 (UTC) Received: by mail-lj1-x22a.google.com with SMTP id e11so50990190ljo.13 for ; Wed, 01 Dec 2021 14:26:42 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=TJdNyjaCPbt0SX5JXfaq3vc4wNX+Lqbrq4BbSv0o6ck=; b=gRsXariZ+vA4q+zfrI7GwlR5hsOVobuQjJde3sOr+LExlL97lCDlsMjqtPDLpQr4V1 IZpV7cO55ckE5qQKTfZd7I+t9zZEKxHx8P11+L8w3vu+UvYCF/i6oNgO4ghlr9KupX4d CnjG1ZAd0YNqHI6pW8M17W8Jqv2F7wqZ7b557/5tkNasuQf8mE/6AtrQzWQpD77GzZHV aqFWrB/W8APB4DEDUp2VY6PWmadSFuT4x2skWtVkF4kjCuxN8sw3LJiYGxjnxGpyMtxw rP828lszpIPbT/mYGxbCYK/cBOU90LFbxbSkA66lJ1ZrxzOD+Y8/LDuMw+ZzTBD7Dl48 6uNg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=TJdNyjaCPbt0SX5JXfaq3vc4wNX+Lqbrq4BbSv0o6ck=; b=P8N7Z1AHS4NbUA5R/Fpqv03zKb2GfCU+lzHyjDG0uYZ/MpwXG2/wE05Y9gk5yryBL8 uUfuzVm5pjZJ9MX/Cys+/yYtcuV48iIkx+sP/wAsCWrpCP+kNarQ/5Ytz6+qM9GIFXqC caWUJ0RgDclKunKau2QZVpWaT4YhIVLQ0Z+ZVGPSiHQnuAEue7ScM63aqIoEt0wbhDy5 TwUj1jUccsZAr+YRUW6pvYcI+KdOcSYUwX0C66wdqUsYWhZW8JHEO0SCXMOBh9RTvfLx I/IMVl49P+yRwMzcG3uR1uvyWKstXEoWvfaono1Uvv7ALGfCt76vt3Z0hYrr82xlmdUu Dmtg== X-Gm-Message-State: AOAM531e8kMdLorjGPu8NVQAEHJuMJAmSChYeiKqUaOAKptb0GbwIP+f I69cGTr6ijberqmJ4DzcqL4HfQ== X-Received: by 2002:a05:651c:11cf:: with SMTP id z15mr7974458ljo.30.1638397600784; Wed, 01 Dec 2021 14:26:40 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id u7sm117004lfs.144.2021.12.01.14.26.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Dec 2021 14:26:40 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v1 6/8] drm/msm/dpu: stop manually removing debugfs files for the DPU CRTC Date: Thu, 2 Dec 2021 01:26:31 +0300 Message-Id: <20211201222633.2476780-7-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211201222633.2476780-1-dmitry.baryshkov@linaro.org> References: <20211201222633.2476780-1-dmitry.baryshkov@linaro.org> 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: Stephen Boyd , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, David Airlie , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" DRM code handles removing all debugfs recursively. Drop CRTC-specific code to perform that. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 15 ++++----------- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h | 3 --- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c index d290809d59bd..9899f7424131 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c @@ -1424,15 +1424,16 @@ DEFINE_SHOW_ATTRIBUTE(dpu_crtc_debugfs_state); static int _dpu_crtc_init_debugfs(struct drm_crtc *crtc) { struct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc); + struct dentry *debugfs_root; - dpu_crtc->debugfs_root = debugfs_create_dir(dpu_crtc->name, + debugfs_root = debugfs_create_dir(dpu_crtc->name, crtc->dev->primary->debugfs_root); debugfs_create_file("status", 0400, - dpu_crtc->debugfs_root, + debugfs_root, dpu_crtc, &_dpu_debugfs_status_fops); debugfs_create_file("state", 0600, - dpu_crtc->debugfs_root, + debugfs_root, &dpu_crtc->base, &dpu_crtc_debugfs_state_fops); @@ -1450,13 +1451,6 @@ static int dpu_crtc_late_register(struct drm_crtc *crtc) return _dpu_crtc_init_debugfs(crtc); } -static void dpu_crtc_early_unregister(struct drm_crtc *crtc) -{ - struct dpu_crtc *dpu_crtc = to_dpu_crtc(crtc); - - debugfs_remove_recursive(dpu_crtc->debugfs_root); -} - static const struct drm_crtc_funcs dpu_crtc_funcs = { .set_config = drm_atomic_helper_set_config, .destroy = dpu_crtc_destroy, @@ -1465,7 +1459,6 @@ static const struct drm_crtc_funcs dpu_crtc_funcs = { .atomic_duplicate_state = dpu_crtc_duplicate_state, .atomic_destroy_state = dpu_crtc_destroy_state, .late_register = dpu_crtc_late_register, - .early_unregister = dpu_crtc_early_unregister, .verify_crc_source = dpu_crtc_verify_crc_source, .set_crc_source = dpu_crtc_set_crc_source, .enable_vblank = msm_crtc_enable_vblank, diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h index 4328e133d71c..b8785c394fcc 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.h @@ -129,7 +129,6 @@ struct dpu_crtc_frame_event { * @drm_requested_vblank : Whether vblanks have been enabled in the encoder * @property_info : Opaque structure for generic property support * @property_defaults : Array of default values for generic property support - * @debugfs_root : Parent of debugfs node * @vblank_cb_count : count of vblank callback since last reset * @play_count : frame count between crtc enable and disable * @vblank_cb_time : ktime at vblank count reset @@ -160,8 +159,6 @@ struct dpu_crtc { struct drm_pending_vblank_event *event; u32 vsync_count; - struct dentry *debugfs_root; - u32 vblank_cb_count; u64 play_count; ktime_t vblank_cb_time; From patchwork Wed Dec 1 22:26:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 519743 Delivered-To: patch@linaro.org Received: by 2002:a05:6e04:2287:0:0:0:0 with SMTP id bl7csp901614imb; Wed, 1 Dec 2021 14:27:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJwvm81qZrldSv1yfuH8JR0auByI9hXbewO8aa5jT1kVuO+smokTeZe0rIOtnyiohLl/Qs5Q X-Received: by 2002:a05:6a00:1489:b0:49f:daa8:c727 with SMTP id v9-20020a056a00148900b0049fdaa8c727mr8909671pfu.56.1638397624694; Wed, 01 Dec 2021 14:27:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1638397624; cv=none; d=google.com; s=arc-20160816; b=i0l5Uj6oNgURBMCdgpsIjjy8waKfPV5Nr4s7/7/byrpBk9lfteLMySn2thlhocbYGS 6/t9Sc3yuKFLcI5yonrW5H5BIvJV66Hzebp6+ndpm4xhQkbAekLnyF9/RMQul01tDYNk aUR9Z1bDpAsTPH5NHT0FdOfXrOTy9d2/xSqB9BWGPcRUzsOlaMZGZotDomVlq0yJ5vXg 6ipDcB3mr1eIoYdmLJl43+/IIU0dF+D6aynPzx8006Amz5SzNYzpt2yugbG0a983+jVD rYJpBoqsam/W2l8dbH9LgWawVE9YI0dLsu1uEOrr5zAO2TzM22In8lm1P5o5oTbhruWx Rcmw== 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:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=notfP1OjEVUqD6diGKORg1DThS/PAwpugZOcLB9s/EA=; b=cq1f2hsxKU9R8aG+7gSBSwTmZ36/Mft3iWGChjXd/5IQxT/UTVRaiD4eJKGzeXvu0q ro/TPohsmQwTEsfyg5IG9mSfTKBE9843tpyLwr9W1T9G2vSAHjL0a6YgGdVH84B/D4jD 7xHVgP47llP2jZayMc+/XDm3gy5hlvRe3gS/LHl9q8dfW3XFPMBmehALDZLCu8+f8DNO wjObR2qSXye3fVQ+l93j6TfM+6ftkx57G+NFbNcnAxUj9uJF1NtNdKReV+GpxTUlczf4 eAvyxXgpDzu9NHQLkj2Gys/5+OSvagvso/MEzy91B7vsGBMhwwJmpEtvLJuOZJ6IBJdq L7uQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ZZGVpSp7; 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 f66si1277797pgc.556.2021.12.01.14.27.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Dec 2021 14:27:04 -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=ZZGVpSp7; 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 0CD4F6E8EF; Wed, 1 Dec 2021 22:26:48 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by gabe.freedesktop.org (Postfix) with ESMTPS id 719C06E952 for ; Wed, 1 Dec 2021 22:26:43 +0000 (UTC) Received: by mail-lj1-x22d.google.com with SMTP id l7so51074559lja.2 for ; Wed, 01 Dec 2021 14:26:43 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=notfP1OjEVUqD6diGKORg1DThS/PAwpugZOcLB9s/EA=; b=ZZGVpSp7W4jOs0K9u4b2fTnl5kl7vhEGXXkuvxlVjtCszqbtXjGuFb8vje5A+szfZW FTQgx4ZueemhIKSm3WYUKCTLNGcywo7gcEpvDPR+J5UiGU24IE/j7NP/sxjsCfhu0ZL6 d/0GS708qj78XgC4g7W4oboBS1DHex743wN3IBd6thSSBEljAI7g6pdMag2+4om9qhuz 5CVCPmufGz8yw/b+pq1pbLBEkADlX+A4Xqpd5HScmidKEncpZLDqjqPifUUguSYrh8jW M7XgXPh6T4NVIBEG2U+CsoBclbI7uMmPc7s1mdEhaELXlDgM5I/3EqAOie+HSa4T7kVa /dqw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=notfP1OjEVUqD6diGKORg1DThS/PAwpugZOcLB9s/EA=; b=41pYDDQ9tqD6TAQl72yH8bRZ98QVYzJ9N8QbdPaLWl1feFzT19yxZ20oANnwNO9BjR APqgP8FRlg/Y2xUdPYsaDsbwFx1eOqB2GS7NRSvj1rdkIQc3BjjgBZ/wwXmAocGZ5wh6 u4o6Ng8UwkGWECOb4hnXfdUY0y+Oa4clz6x4LnKA6NyuBDFGzmS2pPSrMtIfZYGy7E+K GiQwG38y+K/MIf8ucCh+ZMRb+i0tUFWFMfZy8RVTnRx3hD3KcyFpzT7YlBAufeefgYUL 9/Pfs34QeyGIDTofdr+/Nb/ZM0/upxMobteOgeEnkmg5f74dFlEBaUjbzasP+BHOGu7J qb1w== X-Gm-Message-State: AOAM531yAcwrjqyRNkt3aVUKJ2FB+y8wRyWr3GupwVhGsfEPpiq343rm +fxlbfhyilwYmfC/FT3wjnPj3Q== X-Received: by 2002:a05:651c:210f:: with SMTP id a15mr8000910ljq.486.1638397601658; Wed, 01 Dec 2021 14:26:41 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id u7sm117004lfs.144.2021.12.01.14.26.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Dec 2021 14:26:41 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v1 7/8] drm/msm/dpu: simplify DPU's regset32 code Date: Thu, 2 Dec 2021 01:26:32 +0300 Message-Id: <20211201222633.2476780-8-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211201222633.2476780-1-dmitry.baryshkov@linaro.org> References: <20211201222633.2476780-1-dmitry.baryshkov@linaro.org> 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: Stephen Boyd , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, David Airlie , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Squash dpu_debugfs_setup_regset32() into dpu_debugfs_create_regset32(). it makes little sense to have separate function to just setup the structure. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 32 ++++++++++++------- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h | 38 +++-------------------- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 27 +++++----------- 3 files changed, 33 insertions(+), 64 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c index 4c04982c71b2..7e7a619769a8 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c @@ -182,6 +182,15 @@ static void dpu_debugfs_danger_init(struct dpu_kms *dpu_kms, } +/* + * Companion structure for dpu_debugfs_create_regset32. + */ +struct dpu_debugfs_regset32 { + uint32_t offset; + uint32_t blk_len; + struct dpu_kms *dpu_kms; +}; + static int _dpu_debugfs_show_regset32(struct seq_file *s, void *data) { struct dpu_debugfs_regset32 *regset = s->private; @@ -229,24 +238,23 @@ static const struct file_operations dpu_fops_regset32 = { .release = single_release, }; -void dpu_debugfs_setup_regset32(struct dpu_debugfs_regset32 *regset, +void dpu_debugfs_create_regset32(const char *name, umode_t mode, + void *parent, uint32_t offset, uint32_t length, struct dpu_kms *dpu_kms) { - if (regset) { - regset->offset = offset; - regset->blk_len = length; - regset->dpu_kms = dpu_kms; - } -} + struct dpu_debugfs_regset32 *regset; -void dpu_debugfs_create_regset32(const char *name, umode_t mode, - void *parent, struct dpu_debugfs_regset32 *regset) -{ - if (!name || !regset || !regset->dpu_kms || !regset->blk_len) + if (WARN_ON(!name || !dpu_kms || !length)) + return; + + regset = devm_kzalloc(&dpu_kms->pdev->dev, sizeof(*regset), GFP_KERNEL); + if (!regset) return; /* make sure offset is a multiple of 4 */ - regset->offset = round_down(regset->offset, 4); + regset->offset = round_down(offset, 4); + regset->blk_len = length; + regset->dpu_kms = dpu_kms; debugfs_create_file(name, mode, parent, regset, &dpu_fops_regset32); } diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h index 775bcbda860f..b53cdeb1b5c4 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.h @@ -160,33 +160,9 @@ struct dpu_global_state * * Documentation/filesystems/debugfs.rst * - * @dpu_debugfs_setup_regset32: Initialize data for dpu_debugfs_create_regset32 * @dpu_debugfs_create_regset32: Create 32-bit register dump file - * @dpu_debugfs_get_root: Get root dentry for DPU_KMS's debugfs node */ -/** - * Companion structure for dpu_debugfs_create_regset32. Do not initialize the - * members of this structure explicitly; use dpu_debugfs_setup_regset32 instead. - */ -struct dpu_debugfs_regset32 { - uint32_t offset; - uint32_t blk_len; - struct dpu_kms *dpu_kms; -}; - -/** - * dpu_debugfs_setup_regset32 - Initialize register block definition for debugfs - * This function is meant to initialize dpu_debugfs_regset32 structures for use - * with dpu_debugfs_create_regset32. - * @regset: opaque register definition structure - * @offset: sub-block offset - * @length: sub-block length, in bytes - * @dpu_kms: pointer to dpu kms structure - */ -void dpu_debugfs_setup_regset32(struct dpu_debugfs_regset32 *regset, - uint32_t offset, uint32_t length, struct dpu_kms *dpu_kms); - /** * dpu_debugfs_create_regset32 - Create register read back file for debugfs * @@ -195,20 +171,16 @@ void dpu_debugfs_setup_regset32(struct dpu_debugfs_regset32 *regset, * names/offsets do not need to be provided. The 'read' function simply outputs * sequential register values over a specified range. * - * Similar to the related debugfs_create_regset32 API, the structure pointed to - * by regset needs to persist for the lifetime of the created file. The calling - * code is responsible for initialization/management of this structure. - * - * The structure pointed to by regset is meant to be opaque. Please use - * dpu_debugfs_setup_regset32 to initialize it. - * * @name: File name within debugfs * @mode: File mode within debugfs * @parent: Parent directory entry within debugfs, can be NULL - * @regset: Pointer to persistent register block definition + * @offset: sub-block offset + * @length: sub-block length, in bytes + * @dpu_kms: pointer to dpu kms structure */ void dpu_debugfs_create_regset32(const char *name, umode_t mode, - void *parent, struct dpu_debugfs_regset32 *regset); + void *parent, + uint32_t offset, uint32_t length, struct dpu_kms *dpu_kms); /** * dpu_debugfs_get_root - Return root directory entry for KMS's debugfs diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c index d3176f58708e..ef66af696a40 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c @@ -108,11 +108,6 @@ struct dpu_plane { bool is_virtual; struct list_head mplane_list; struct dpu_mdss_cfg *catalog; - - /* debugfs related stuff */ - struct dpu_debugfs_regset32 debugfs_src; - struct dpu_debugfs_regset32 debugfs_scaler; - struct dpu_debugfs_regset32 debugfs_csc; }; static const uint64_t supported_format_modifiers[] = { @@ -1379,35 +1374,29 @@ static int _dpu_plane_init_debugfs(struct drm_plane *plane) debugfs_root, (unsigned long *)&pdpu->pipe_hw->cap->features); /* add register dump support */ - dpu_debugfs_setup_regset32(&pdpu->debugfs_src, + dpu_debugfs_create_regset32("src_blk", 0400, + debugfs_root, sblk->src_blk.base + cfg->base, sblk->src_blk.len, kms); - dpu_debugfs_create_regset32("src_blk", 0400, - debugfs_root, &pdpu->debugfs_src); if (cfg->features & BIT(DPU_SSPP_SCALER_QSEED3) || cfg->features & BIT(DPU_SSPP_SCALER_QSEED3LITE) || cfg->features & BIT(DPU_SSPP_SCALER_QSEED2) || - cfg->features & BIT(DPU_SSPP_SCALER_QSEED4)) { - dpu_debugfs_setup_regset32(&pdpu->debugfs_scaler, + cfg->features & BIT(DPU_SSPP_SCALER_QSEED4)) + dpu_debugfs_create_regset32("scaler_blk", 0400, + debugfs_root, sblk->scaler_blk.base + cfg->base, sblk->scaler_blk.len, kms); - dpu_debugfs_create_regset32("scaler_blk", 0400, - debugfs_root, - &pdpu->debugfs_scaler); - } if (cfg->features & BIT(DPU_SSPP_CSC) || - cfg->features & BIT(DPU_SSPP_CSC_10BIT)) { - dpu_debugfs_setup_regset32(&pdpu->debugfs_csc, + cfg->features & BIT(DPU_SSPP_CSC_10BIT)) + dpu_debugfs_create_regset32("csc_blk", 0400, + debugfs_root, sblk->csc_blk.base + cfg->base, sblk->csc_blk.len, kms); - dpu_debugfs_create_regset32("csc_blk", 0400, - debugfs_root, &pdpu->debugfs_csc); - } debugfs_create_u32("xin_id", 0400, From patchwork Wed Dec 1 22:26:33 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 519744 Delivered-To: patch@linaro.org Received: by 2002:a05:6e04:2287:0:0:0:0 with SMTP id bl7csp901632imb; Wed, 1 Dec 2021 14:27:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJy2qojmjK9pLOeca6yEd2+BhabkaWuIXyI6dz7Qtdc0MBaBZlvf8durtteOdjtQ5vbiR1um X-Received: by 2002:a63:5748:: with SMTP id h8mr6695684pgm.235.1638397626162; Wed, 01 Dec 2021 14:27:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1638397626; cv=none; d=google.com; s=arc-20160816; b=JqeYPbIQHPfnSEyaEEqIzkA7LdQyRAjuJ8X98KBJi8Pi3HJpqtpNPcMrAcM8PcesHC DYjlPdmjiMG9MKNd7yDh5GR5D5TGYQNwY6XV5t6OD5InJxgZx+kylHXXEnob4TtgrR9B XCaoW4elpxYvuwzIcHWXCfroh1rCJcDAYUm4Xlvnn50dUskSrhw39GheVOGPK8ofK0t8 bZB21r2zKD3hK9McBLBdC5T3rHXJlo3D6bOa7tohJqTVTsjaR4jW5442RgEf3DmxwHIA 6vuMw2JQGddJ4gDwTZk11RDF8ssBVKgAZ4qm3G1kbIlN08+awALzgvB2l8Ssxw/psiM8 0rCA== 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:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=YRqnfrlexYYeGgagIUTamZ7RSQEhaY33J7GOhnJ7GdQ=; b=EvqxohOYQzPLKEAvEpGEQeCpJs3dzkDtY3DJc0uG4EFb/8lvR9UE3G76fG2UimNqNd eQB9DagGGn85+shHR0Feo3P+C/uKVX79GVRtRmJBZgMz7h6YoJ2JW54A2hyGBzA2tExV H+unh9oc0y/6TeaCq9G58Y2aNejS0FU3yDE+9IyI4598bbgORiLD3J76Yzvzsa6X8TUZ 0evnX08Qji4CgZ2payEbbRcFyR9o4EJra/lK0yxy5p1VUo4eTj6DuJFA2P0dv+cQOPNV pk86QG4fLc1ARa1bgmJq120+GClK+GntZJPW1Ag0zG+SHBxjTMAsmZeSAf+3vqo1OPgL yl0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=OKtfr+1I; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 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. [131.252.210.177]) by mx.google.com with ESMTPS id p10si1256257pgd.158.2021.12.01.14.27.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Dec 2021 14:27:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=OKtfr+1I; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 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 F3DA56E977; Wed, 1 Dec 2021 22:26:48 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) by gabe.freedesktop.org (Postfix) with ESMTPS id 27DE96E92F for ; Wed, 1 Dec 2021 22:26:44 +0000 (UTC) Received: by mail-lj1-x232.google.com with SMTP id k23so51160792lje.1 for ; Wed, 01 Dec 2021 14:26:44 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=YRqnfrlexYYeGgagIUTamZ7RSQEhaY33J7GOhnJ7GdQ=; b=OKtfr+1I+2gKgILYOWnJ48PN5lG/F4Rc2IJ4v66zyuk4hFgJxpdkEqwsQCxOwM5qu8 BnN01N0TVYd0qPRyHWfQpd7XIg2S2qtZWOW5sZEoVjuFK1OdDu9EeQZFvQWPiLHHX313 tp/2TTEoN02EuT5cKH6Q54fbhbc8sSm98GNXRGuE3iBtulGTyhl1GkeeK4OgBq4X6QMb ReCFPDiRIT6SehCblltg1IThuj4tUTRiBIDh5bZ8pu7RpyLJt6GKt6FUtjMXcB6Xaueo IlJ0lbY9N6ZXOAUm4VR0uvBfLz1DDsAKflwMrGBgtjlvyTgii015kNqLqxFrNl7YvkZN NOmw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=YRqnfrlexYYeGgagIUTamZ7RSQEhaY33J7GOhnJ7GdQ=; b=1KBcCYKvMEIILZqPBFftUlhII1YtkpVrNcmM9s/8oTyOILBTC8LNEkCkHlJFlny+v7 PkPwXXic1puRvue56yxnqYBcwnw63chX3Q3hoB83cWIW+MyS4oLCZ2WZGBS/I4VnDadN GRlCdFF8IAmworM/n2DRxNZ9LApnjl7AD5TFz5406l5Kj9uK3Uw1W7LCmJ0WdiIbZg81 FIgDcAIpvjfIvTnrDD5BnKaSUJEQcSYUYEUuMnGFgBPexIwLgJNxTP/e2Phe+yZrRW7V /8NSDHN0YtJCz2fqkJ9nT83bZGX1uYe+++2Ct39/MxPgEVoylUoYoDCG9RudXaxtgOfp 3uLw== X-Gm-Message-State: AOAM533wjEblBJUtMX0afvYr5GOgOF8rJv+adz8ENhnctpM+/BX0FSMt eEpL1gt7BqlHY3zpM1QqEJ9gZQ== X-Received: by 2002:a2e:2f1d:: with SMTP id v29mr8333578ljv.439.1638397602469; Wed, 01 Dec 2021 14:26:42 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id u7sm117004lfs.144.2021.12.01.14.26.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Dec 2021 14:26:41 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar Subject: [PATCH v1 8/8] drm/msm/dpu: move SSPP debugfs support from plane to SSPP code Date: Thu, 2 Dec 2021 01:26:33 +0300 Message-Id: <20211201222633.2476780-9-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211201222633.2476780-1-dmitry.baryshkov@linaro.org> References: <20211201222633.2476780-1-dmitry.baryshkov@linaro.org> 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: Stephen Boyd , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, David Airlie , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" We are preparing to change DPU plane implementation. Move SSPP debugfs code from dpu_plane.c to dpu_hw_sspp.c, where it belongs. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c | 67 +++++++++++++++++ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h | 4 + drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 1 + drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 82 +++------------------ 4 files changed, 84 insertions(+), 70 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c index d77eb7da5daf..ae3cf2e4d7d9 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c @@ -8,6 +8,8 @@ #include "dpu_hw_sspp.h" #include "dpu_kms.h" +#include + #define DPU_FETCH_CONFIG_RESET_VALUE 0x00000087 /* DPU_SSPP_SRC */ @@ -686,6 +688,71 @@ static void _setup_layer_ops(struct dpu_hw_pipe *c, c->ops.setup_cdp = dpu_hw_sspp_setup_cdp; } +#ifdef CONFIG_DEBUG_FS +int _dpu_hw_sspp_init_debugfs(struct dpu_hw_pipe *hw_pipe, struct dpu_kms *kms, struct dentry *entry) +{ + const struct dpu_sspp_cfg *cfg = hw_pipe->cap; + const struct dpu_sspp_sub_blks *sblk = cfg->sblk; + struct dentry *debugfs_root; + char sspp_name[32]; + + snprintf(sspp_name, sizeof(sspp_name), "%d", hw_pipe->idx); + + /* create overall sub-directory for the pipe */ + debugfs_root = + debugfs_create_dir(sspp_name, entry); + + /* don't error check these */ + debugfs_create_xul("features", 0600, + debugfs_root, (unsigned long *)&hw_pipe->cap->features); + + /* add register dump support */ + dpu_debugfs_create_regset32("src_blk", 0400, + debugfs_root, + sblk->src_blk.base + cfg->base, + sblk->src_blk.len, + kms); + + if (cfg->features & BIT(DPU_SSPP_SCALER_QSEED3) || + cfg->features & BIT(DPU_SSPP_SCALER_QSEED3LITE) || + cfg->features & BIT(DPU_SSPP_SCALER_QSEED2) || + cfg->features & BIT(DPU_SSPP_SCALER_QSEED4)) + dpu_debugfs_create_regset32("scaler_blk", 0400, + debugfs_root, + sblk->scaler_blk.base + cfg->base, + sblk->scaler_blk.len, + kms); + + if (cfg->features & BIT(DPU_SSPP_CSC) || + cfg->features & BIT(DPU_SSPP_CSC_10BIT)) + dpu_debugfs_create_regset32("csc_blk", 0400, + debugfs_root, + sblk->csc_blk.base + cfg->base, + sblk->csc_blk.len, + kms); + + debugfs_create_u32("xin_id", + 0400, + debugfs_root, + (u32 *) &cfg->xin_id); + debugfs_create_u32("clk_ctrl", + 0400, + debugfs_root, + (u32 *) &cfg->clk_ctrl); + debugfs_create_x32("creq_vblank", + 0600, + debugfs_root, + (u32 *) &sblk->creq_vblank); + debugfs_create_x32("danger_vblank", + 0600, + debugfs_root, + (u32 *) &sblk->danger_vblank); + + return 0; +} +#endif + + static const struct dpu_sspp_cfg *_sspp_offset(enum dpu_sspp sspp, void __iomem *addr, struct dpu_mdss_cfg *catalog, diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h index e8939d7387cb..cef281687bab 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.h @@ -381,6 +381,7 @@ struct dpu_hw_pipe { struct dpu_hw_sspp_ops ops; }; +struct dpu_kms; /** * dpu_hw_sspp_init - initializes the sspp hw driver object. * Should be called once before accessing every pipe. @@ -400,5 +401,8 @@ struct dpu_hw_pipe *dpu_hw_sspp_init(enum dpu_sspp idx, */ void dpu_hw_sspp_destroy(struct dpu_hw_pipe *ctx); +void dpu_debugfs_sspp_init(struct dpu_kms *dpu_kms, struct dentry *debugfs_root); +int _dpu_hw_sspp_init_debugfs(struct dpu_hw_pipe *hw_pipe, struct dpu_kms *kms, struct dentry *entry); + #endif /*_DPU_HW_SSPP_H */ diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c index 7e7a619769a8..de9efe6dcf7c 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c @@ -281,6 +281,7 @@ static int dpu_kms_debugfs_init(struct msm_kms *kms, struct drm_minor *minor) dpu_debugfs_danger_init(dpu_kms, entry); dpu_debugfs_vbif_init(dpu_kms, entry); dpu_debugfs_core_irq_init(dpu_kms, entry); + dpu_debugfs_sspp_init(dpu_kms, entry); for (i = 0; i < ARRAY_SIZE(priv->dp); i++) { if (priv->dp[i]) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c index ef66af696a40..cc7a7eb84fdd 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include "msm_drv.h" @@ -1356,78 +1355,22 @@ void dpu_plane_danger_signal_ctrl(struct drm_plane *plane, bool enable) pm_runtime_put_sync(&dpu_kms->pdev->dev); } -static int _dpu_plane_init_debugfs(struct drm_plane *plane) +/* SSPP live inside dpu_plane private data only. Enumerate them here. */ +void dpu_debugfs_sspp_init(struct dpu_kms *dpu_kms, struct dentry *debugfs_root) { - struct dpu_plane *pdpu = to_dpu_plane(plane); - struct dpu_kms *kms = _dpu_plane_get_kms(plane); - const struct dpu_sspp_cfg *cfg = pdpu->pipe_hw->cap; - const struct dpu_sspp_sub_blks *sblk = cfg->sblk; - struct dentry *debugfs_root; - - /* create overall sub-directory for the pipe */ - debugfs_root = - debugfs_create_dir(plane->name, - plane->dev->primary->debugfs_root); - - /* don't error check these */ - debugfs_create_xul("features", 0600, - debugfs_root, (unsigned long *)&pdpu->pipe_hw->cap->features); - - /* add register dump support */ - dpu_debugfs_create_regset32("src_blk", 0400, - debugfs_root, - sblk->src_blk.base + cfg->base, - sblk->src_blk.len, - kms); - - if (cfg->features & BIT(DPU_SSPP_SCALER_QSEED3) || - cfg->features & BIT(DPU_SSPP_SCALER_QSEED3LITE) || - cfg->features & BIT(DPU_SSPP_SCALER_QSEED2) || - cfg->features & BIT(DPU_SSPP_SCALER_QSEED4)) - dpu_debugfs_create_regset32("scaler_blk", 0400, - debugfs_root, - sblk->scaler_blk.base + cfg->base, - sblk->scaler_blk.len, - kms); - - if (cfg->features & BIT(DPU_SSPP_CSC) || - cfg->features & BIT(DPU_SSPP_CSC_10BIT)) - dpu_debugfs_create_regset32("csc_blk", 0400, - debugfs_root, - sblk->csc_blk.base + cfg->base, - sblk->csc_blk.len, - kms); - - debugfs_create_u32("xin_id", - 0400, - debugfs_root, - (u32 *) &cfg->xin_id); - debugfs_create_u32("clk_ctrl", - 0400, - debugfs_root, - (u32 *) &cfg->clk_ctrl); - debugfs_create_x32("creq_vblank", - 0600, - debugfs_root, - (u32 *) &sblk->creq_vblank); - debugfs_create_x32("danger_vblank", - 0600, - debugfs_root, - (u32 *) &sblk->danger_vblank); + struct drm_plane *plane; + struct dentry *entry = debugfs_create_dir("sspp", debugfs_root); - return 0; -} -#else -static int _dpu_plane_init_debugfs(struct drm_plane *plane) -{ - return 0; -} -#endif + if (IS_ERR(entry)) + return; -static int dpu_plane_late_register(struct drm_plane *plane) -{ - return _dpu_plane_init_debugfs(plane); + drm_for_each_plane(plane, dpu_kms->dev) { + struct dpu_plane *pdpu = to_dpu_plane(plane); + + _dpu_hw_sspp_init_debugfs(pdpu->pipe_hw, dpu_kms, entry); + } } +#endif static bool dpu_plane_format_mod_supported(struct drm_plane *plane, uint32_t format, uint64_t modifier) @@ -1453,7 +1396,6 @@ static const struct drm_plane_funcs dpu_plane_funcs = { .reset = dpu_plane_reset, .atomic_duplicate_state = dpu_plane_duplicate_state, .atomic_destroy_state = dpu_plane_destroy_state, - .late_register = dpu_plane_late_register, .format_mod_supported = dpu_plane_format_mod_supported, };