From patchwork Tue Jun 5 13:54:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 137744 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp990198lji; Tue, 5 Jun 2018 06:54:29 -0700 (PDT) X-Google-Smtp-Source: ADUXVKL5P6Yav7akmOKBwuyQ+N/B0eEAa6Cwu43o9UYgo6berrzzFb3vqJwl3OC1SzLlH0wSdChr X-Received: by 2002:a17:902:bb90:: with SMTP id m16-v6mr23588486pls.50.1528206869035; Tue, 05 Jun 2018 06:54:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528206869; cv=none; d=google.com; s=arc-20160816; b=TwUTOoQOPxmyy9W5WKy3BFRfDoZZgFF3a6Ic5IOxHlse8DOWcWyOvYWwjOBEPd3Oe/ 5qjP6njeKAT3kC2Eq4NE1P6S1DeNV3KBgk/qZyo/vZPltnFDWp1QvaVzCg3bH8fq+gRa ZY/59Gp3+TPltYdQhi688zVB1eD3EdYjrU8HRoJ+V82hYnt0iOGLzPqmJtTO+djBNZXj v89lqorOFcD19hTTqF9uZgHmNviFHKgqDaMjMjPGTZikAbt7XUbdy4nuQHYXRJM30wm7 n0FfcKS09bWip2gRr5sT5Z+CJe+1aEZrxz642nbI+/kkNfIB3QugWyt0VaJ1+uSLqtqA xEnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=EQ4pJGJBGWZQjGcCER5AmiohNcNl5G4/W44dW9E0zs4=; b=d+CGt75IFmrrV6DvtfSZHE4LGgKFNNVgpkT5Has6AXwqCfTlNlQ2Uj0i0C/N2lENmj MIkkYcev7BXPRmpAffeEf6IAgfc+RQiKqo2L+Y1Hz4zz0hBoy2elczXOaJsbfSww0UbR HS2UBx8Ezz4w2EDNQOh6+Yvbey0tzG6Zc2BrSwQ0P3pnAJ8M7GQ+CbZ+gduNyIVnNAsT QJ75t81umviZMg647geM6qSk1I0pKJsJF94gUdDmvk287UKA1Gp6PflmhMCVHT3cpTOr JZ7UXj6ImZcvE4x9EbKEBNniAwZC69MzxUAF2iAeSxPdldbn+lZ02xO27g5sySB9BcZb y9KA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bu77UBMK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d11-v6si25790000pll.255.2018.06.05.06.54.28; Tue, 05 Jun 2018 06:54:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bu77UBMK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751890AbeFENy0 (ORCPT + 30 others); Tue, 5 Jun 2018 09:54:26 -0400 Received: from mail-wr0-f195.google.com ([209.85.128.195]:37103 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751870AbeFENyX (ORCPT ); Tue, 5 Jun 2018 09:54:23 -0400 Received: by mail-wr0-f195.google.com with SMTP id d8-v6so2546169wro.4 for ; Tue, 05 Jun 2018 06:54:23 -0700 (PDT) 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; bh=EQ4pJGJBGWZQjGcCER5AmiohNcNl5G4/W44dW9E0zs4=; b=bu77UBMKECAKrk4uUQlVb37JtmjA3pg7fKfU06X86PyyLLrEsj7BNoLD4dU4i4F/Ko QHIlRm2XstO/MnPnxMdx6NBEpDakvY1Ha+kmDVgFIcsSfSwoBbIwkb0wR93BLiPFgIcM 9Xq7xmG6BLEfpbLkBZMAImSDi8zj+GLOFpUUs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=EQ4pJGJBGWZQjGcCER5AmiohNcNl5G4/W44dW9E0zs4=; b=Esk6XQ7STgTpoDYlfu9NvxPm6tFM/7Bv6L8nDbv+nXnFx8twM/6ite7/ImsfJWhHRF K8Fdh1Yi4a7uHPXf5UmpjPkrc8TSf14lMa3THq1ijkroCJGwEN9Nd1R6own/WEWG6ImR wswCUxV0XLuYzBXVOUOtcTn2Wkr/VbZTgrUzh/hoPoXz0BxcoCFQ16gOQwyw9hHhDQ1h jGRnfN08u8NB+dG5XYqP9oq/xQTwoOUNo+umFLIk8JaRVBItQS/dvV9g8m44na8u1P3v NKzqpIjl7fjI50wcYtJuvUgSKX+UNIYjHopRVmwa2pNb3qIG2JX1uApD/A/gvJ2t4DAN 7xrg== X-Gm-Message-State: ALKqPweGE01j8wEJ66CVD3JvErF6z/U02e6HtBlLHzt/dPQ4wS9c4pqX F8ZjTPsEnoaY3p6nL28diMHGLg== X-Received: by 2002:adf:dfc2:: with SMTP id q2-v6mr17731799wrn.113.1528206862455; Tue, 05 Jun 2018 06:54:22 -0700 (PDT) Received: from lmecxl0911.lme.st.com (bol62-h02-176-179-166-238.dsl.sta.abo.bbox.fr. [176.179.166.238]) by smtp.gmail.com with ESMTPSA id o53-v6sm76797785wrc.96.2018.06.05.06.54.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 Jun 2018 06:54:21 -0700 (PDT) From: Benjamin Gaignard To: gustavo@padovan.org, maarten.lankhorst@linux.intel.com, seanpaul@chromium.org, airlied@linux.ie, vincent.abriou@st.com Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Benjamin Gaignard Subject: [PATCH v1 1/7] drm: print plane state normalized zpos value Date: Tue, 5 Jun 2018 15:54:01 +0200 Message-Id: <20180605135407.20214-2-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20180605135407.20214-1-benjamin.gaignard@linaro.org> References: <20180605135407.20214-1-benjamin.gaignard@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When dumping plane state print normalized zpos value as done for the other plane state fields. Signed-off-by: Benjamin Gaignard --- drivers/gpu/drm/drm_atomic.c | 1 + 1 file changed, 1 insertion(+) -- 2.15.0 diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index 07fef42869aa..cd1d677617c8 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c @@ -988,6 +988,7 @@ static void drm_atomic_plane_print_state(struct drm_printer *p, drm_printf(p, "\tcrtc-pos=" DRM_RECT_FMT "\n", DRM_RECT_ARG(&dest)); drm_printf(p, "\tsrc-pos=" DRM_RECT_FP_FMT "\n", DRM_RECT_FP_ARG(&src)); drm_printf(p, "\trotation=%x\n", state->rotation); + drm_printf(p, "\tnormalized-zpos=%x\n", state->normalized_zpos); drm_printf(p, "\tcolor-encoding=%s\n", drm_get_color_encoding_name(state->color_encoding)); drm_printf(p, "\tcolor-range=%s\n", From patchwork Tue Jun 5 13:54:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 137745 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp990333lji; Tue, 5 Jun 2018 06:54:37 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIaoZwTncsDu8FmAhoGwAl/NCvE5ErSPEuKfZcAWCHbbMoG7YExJuO8wDepC+xBndF37xoE X-Received: by 2002:a62:1656:: with SMTP id 83-v6mr25649311pfw.61.1528206877174; Tue, 05 Jun 2018 06:54:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528206877; cv=none; d=google.com; s=arc-20160816; b=RBFHFiw07IHfClSYqQ0n4uUVfJBm7mUCpbUx9EiVg3pdPIROcDvr8tpuB9qd0IQe2g blecDWIF8krq5eb9fgBgeg80KU+JSdYv6MPaaz/jv+TsaD6O9JeqB5m7+Ed0cNJo3g1m TberJ8HQEHIb7aaF2FYtXhZXQsSONJQHJ6YksvCH52XOjG4+WUYZi86LbhoRO224/IoZ 0t94xeNra7XkJb7VvMr+7SFIoZrbM4EPoUg5cNDgd0kJ68bYDP9ONoPC8eChtcc4Gzgb 8nuFXbsF8osbLqNHPUY+mcEd9wyG8DEGD2IjmHayck3SJO0tG+h9V1fPxUfyeCFONwtf 1lJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=eUQ8RLKsiMMjVHSlKefqkVPnWfwwJ/Gy6Gy/q9hN/4A=; b=LnjEvvxdgtMJVdaSWt0sh3vqLJjzXgKDhUOpDZrCQP0j9nzGfsyU/0z7c17i50rcS/ W+4wpq9/2ldt3S7mAIcYrlk4hF2sdCM5QO5kCubR8Xyia3Log43hvmSj8w0vjILx+ufJ Aedtyodg2AqQrjgry9xT7KWSxUg9m0zO40MwgmCTJ93Yu9apIJCsk7fnj/vWcA653jxc Xll9KRA1GScRaEC4sGQAKDdgxEpiLWUKgQE9bNaYAmjMoG0dc1d3NV5KjjM+OQ30tFMN QvEAZl8n0FbwRgKg87+fsT3dAKuMBdRr2lesI3sMsEiAe2OrFUsucVY2upi9gbOU8pu5 N11g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Pzz9PG7v; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f6-v6si24914145plm.448.2018.06.05.06.54.36; Tue, 05 Jun 2018 06:54:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Pzz9PG7v; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752138AbeFENye (ORCPT + 30 others); Tue, 5 Jun 2018 09:54:34 -0400 Received: from mail-wm0-f49.google.com ([74.125.82.49]:40782 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751889AbeFENyZ (ORCPT ); Tue, 5 Jun 2018 09:54:25 -0400 Received: by mail-wm0-f49.google.com with SMTP id n5-v6so5272448wmc.5 for ; Tue, 05 Jun 2018 06:54:24 -0700 (PDT) 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; bh=eUQ8RLKsiMMjVHSlKefqkVPnWfwwJ/Gy6Gy/q9hN/4A=; b=Pzz9PG7vjbp+gP48S4AKmL7BTQJN7qbq5LHgaDAV8OLs8HnIMzn3MkyZy9VNaxl4Jm P5nBqtfw3nBp+ONRqmbYN0Eik4JOLSVnc74X7Qzu1WxkQB+DcbeNUOEQNELzdGbdPtIb pouhnaD7pvoevUrAj6Nxuput8ery9NGfVkS0o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=eUQ8RLKsiMMjVHSlKefqkVPnWfwwJ/Gy6Gy/q9hN/4A=; b=BKOef8CPhteEpV1gskNew3O392mtMkf7qnQ5sxKRSaJV3JEcy7A/0cV6Bd8i8hKe5R 66e69sF5bUSHn0Anh2gdf9wp1Q2SeY/PPv6wLSj/J/ScJMgRt1OAEqO+zKNsZlsMWqkr 0Y0Qjfhc3AdefiLHVPK1PT0KOFDiUTtNY2db1bule8ukc+aZTdak/tKkEXRKnJaOyOkO pWh1OppFJAfmmfzbwj42nfaEMJ7ufxO+TPpbNFzOVWawVMv3YkKdOQcIE1Q7/SVtw4cy WFeSeYlEbJfUqoeJsi1gEfbjw716/7w5ONqqwNFUZRuSRhTUB0z+I6iEOBGHUDFysixC 70xg== X-Gm-Message-State: APt69E1DqvjwQGgi2glmOjBgPRK1TvBnPCL2A2rh6+2263ZEnL2Mm3uP ksQYGeRLpMfw362hxfUkou5HsGtWBLo= X-Received: by 2002:a1c:6954:: with SMTP id e81-v6mr1133980wmc.124.1528206864095; Tue, 05 Jun 2018 06:54:24 -0700 (PDT) Received: from lmecxl0911.lme.st.com (bol62-h02-176-179-166-238.dsl.sta.abo.bbox.fr. [176.179.166.238]) by smtp.gmail.com with ESMTPSA id o53-v6sm76797785wrc.96.2018.06.05.06.54.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 Jun 2018 06:54:23 -0700 (PDT) From: Benjamin Gaignard To: gustavo@padovan.org, maarten.lankhorst@linux.intel.com, seanpaul@chromium.org, airlied@linux.ie, vincent.abriou@st.com Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Benjamin Gaignard Subject: [PATCH v1 2/7] drm: add hook to print encoder status Date: Tue, 5 Jun 2018 15:54:02 +0200 Message-Id: <20180605135407.20214-3-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20180605135407.20214-1-benjamin.gaignard@linaro.org> References: <20180605135407.20214-1-benjamin.gaignard@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Even if encoders don't have state it could be useful to get information from them when dumping of the other elements state. Add an optional hook in drm_encoder_funcs structure and call it after crtc print state. Signed-off-by: Benjamin Gaignard --- drivers/gpu/drm/drm_atomic.c | 15 +++++++++++++++ include/drm/drm_encoder.h | 12 ++++++++++++ 2 files changed, 27 insertions(+) -- 2.15.0 diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index cd1d677617c8..6a9f5be01172 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c @@ -28,6 +28,7 @@ #include #include +#include #include #include #include @@ -1799,6 +1800,15 @@ int drm_atomic_nonblocking_commit(struct drm_atomic_state *state) } EXPORT_SYMBOL(drm_atomic_nonblocking_commit); +static void drm_atomic_encoder_print(struct drm_printer *p, + struct drm_encoder *encoder) +{ + drm_printf(p, "encoder[%u]: %s\n", encoder->base.id, encoder->name); + + if (encoder->funcs->atomic_print) + encoder->funcs->atomic_print(p, encoder); +} + static void drm_atomic_print_state(const struct drm_atomic_state *state) { struct drm_printer p = drm_info_printer(state->dev->dev); @@ -1828,6 +1838,7 @@ static void __drm_state_dump(struct drm_device *dev, struct drm_printer *p, struct drm_mode_config *config = &dev->mode_config; struct drm_plane *plane; struct drm_crtc *crtc; + struct drm_encoder *encoder; struct drm_connector *connector; struct drm_connector_list_iter conn_iter; @@ -1850,6 +1861,10 @@ static void __drm_state_dump(struct drm_device *dev, struct drm_printer *p, drm_modeset_unlock(&crtc->mutex); } + drm_for_each_encoder(encoder, dev) { + drm_atomic_encoder_print(p, encoder); + } + drm_connector_list_iter_begin(dev, &conn_iter); if (take_locks) drm_modeset_lock(&dev->mode_config.connection_mutex, NULL); diff --git a/include/drm/drm_encoder.h b/include/drm/drm_encoder.h index fb299696c7c4..b847dad817b0 100644 --- a/include/drm/drm_encoder.h +++ b/include/drm/drm_encoder.h @@ -80,6 +80,18 @@ struct drm_encoder_funcs { * before data structures are torndown. */ void (*early_unregister)(struct drm_encoder *encoder); + + /** + * @atomic_print + * + * If driver could implement this optional hook for printing + * additional driver specific information. + * + * Do not call this directly, use drm_atomic_encoder_print() + * instead. + */ + void (*atomic_print)(struct drm_printer *p, + struct drm_encoder *encoder); }; /** From patchwork Tue Jun 5 13:54:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 137748 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp990720lji; Tue, 5 Jun 2018 06:54:57 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK9dgoSw6acgAJlgvy7bWFFlsCRBiN66zEVh/Cys/VhsU8zs4ukYziKNHmEMdmhugTjf0um X-Received: by 2002:a63:2b15:: with SMTP id r21-v6mr15780666pgr.269.1528206897515; Tue, 05 Jun 2018 06:54:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528206897; cv=none; d=google.com; s=arc-20160816; b=mRdw+u+DgV9YUDnDEU7RjGr+XxLdjZnT9TH8172YufmiK52bIL8sDDyVg572tvqYbv c2WnqbeHHPOFwm99k3/GVMbule75jWCq3ebL3B/KZsoDpU+i3vi/KddZ7GEofMGz18B3 S5Bj/0GdJUpvjDPXstyHr1XydDGWp8c0Z6AQr2CETvX12tNXNNaCPDlE6e+vjcTmHR4t P2gcMro13KiLAeSp1YRyihnYDeeIbvjM+uPjSlZDtfdJaQaXLJZ8Ex9KSA3X9cIAUjNS C2ipTqvOTmCbDvP71zTJg6aZnLm/5LMhHuVA5ji9KStetxnkeqGBPrga7IXKWgy7Q2vY mNkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=aAL165EV1IVDVsPuuUkOxh5s8/NauUcn3y/+ecIsdfs=; b=pJoZ5ucxJb8PkTo2wJnYyhuo7MHYVnJPB4jk8DRI5xIcw1/yGzowdmFIX8y9M/Kvgr LY3LNKKY3+4J9tSdNMoYRuRi7gjBaABu31AhunM6JPw7beZb973c+4nUTMuf1T2FQkRg RSiKPtRZS8hCSIU0BbzOS0AI4D4h8WdcFghV6WXFgjMZGvwJHZuW0BxTKWMfeUJv9xgF /LurPuo+nln0iUZu/8iO5O2PHG2yjtITdE4Q4SH1Jktics2dl3Emuo5Uwa2JmOWP0fKw M7vVi+p3nkgZQkf9PRjCupBZSbX6dOhY8t1t+hwhR5NzKPegWng4Iz+JJBVNAWqKV1KD pLUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fFydpBna; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e33-v6si47871698pld.231.2018.06.05.06.54.57; Tue, 05 Jun 2018 06:54:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fFydpBna; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752169AbeFENyz (ORCPT + 30 others); Tue, 5 Jun 2018 09:54:55 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:43557 "EHLO mail-wr0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751870AbeFENyd (ORCPT ); Tue, 5 Jun 2018 09:54:33 -0400 Received: by mail-wr0-f196.google.com with SMTP id d2-v6so2520266wrm.10 for ; Tue, 05 Jun 2018 06:54:33 -0700 (PDT) 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; bh=aAL165EV1IVDVsPuuUkOxh5s8/NauUcn3y/+ecIsdfs=; b=fFydpBna1g6cAkU9K5w1YPg31R+pZFeafACa5mFM5PFty4v9Egyf225qliYJC61HRS tcVXJQob8cZJ+eupsTe+IWaYBz4OTY7zKpE6v4RELMh8rZduR5mZ/nKNA4bs8o6N06Yn 9qwbbBllc/OxJ8A9zq/2A/6vampILrAwPIvqg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=aAL165EV1IVDVsPuuUkOxh5s8/NauUcn3y/+ecIsdfs=; b=d756fhWXdBrT2STK/ENuCMYC+ogf9Cof3r5axjNWOC3FdqKGz55lnpg1qUxzp2YWBX Yg2f5B7aEIMkCImuA2xyY9B3q3fKF4HMQpWTHZ60+IP7s4TtQL6SYdLshShisMTb3tsV WeMMrKZJWMPZbI0VpZYvu2+SA1IKUBoULdZs6xthZ/pFD6qI8KGjDbOU/TD87cNrVJ8I pcBEiF7otxArwys01XMqSdqwSCM2xHrGll8dhHloDTlfCG4XDPJ86aiDeD8RRLC1LuoA aWPCFbk/Fr/muG+rDVfZGGn0Lq0+efXHIn4MuZfpRPIYXPvlRL/1KJWjkCApLNigbVnM dnCg== X-Gm-Message-State: APt69E1nfrjyqFTJFW70w9zVZux2h3C5prHegttBXs+AGca4P6T0E2hn 4wcU9I8g0woVWDEX//Y8KHFKmg== X-Received: by 2002:adf:dd03:: with SMTP id a3-v6mr8307634wrm.2.1528206872596; Tue, 05 Jun 2018 06:54:32 -0700 (PDT) Received: from lmecxl0911.lme.st.com (bol62-h02-176-179-166-238.dsl.sta.abo.bbox.fr. [176.179.166.238]) by smtp.gmail.com with ESMTPSA id o53-v6sm76797785wrc.96.2018.06.05.06.54.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 Jun 2018 06:54:31 -0700 (PDT) From: Benjamin Gaignard To: gustavo@padovan.org, maarten.lankhorst@linux.intel.com, seanpaul@chromium.org, airlied@linux.ie, vincent.abriou@st.com Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Benjamin Gaignard Subject: [PATCH v1 6/7] drm: sti: make encoders use atomic_print_state instead of debugfs Date: Tue, 5 Jun 2018 15:54:06 +0200 Message-Id: <20180605135407.20214-7-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20180605135407.20214-1-benjamin.gaignard@linaro.org> References: <20180605135407.20214-1-benjamin.gaignard@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert all sti encoders to atomic_print usage rather than use a debugfs entry. Signed-off-by: Benjamin Gaignard --- drivers/gpu/drm/sti/sti_tvout.c | 162 ++++++++++++++++------------------------ 1 file changed, 63 insertions(+), 99 deletions(-) -- 2.15.0 diff --git a/drivers/gpu/drm/sti/sti_tvout.c b/drivers/gpu/drm/sti/sti_tvout.c index ea4a3b87fa55..8aa23710b695 100644 --- a/drivers/gpu/drm/sti/sti_tvout.c +++ b/drivers/gpu/drm/sti/sti_tvout.c @@ -442,10 +442,10 @@ static void tvout_hda_start(struct sti_tvout *tvout, bool main_path) tvout_write(tvout, 0, TVO_HD_DAC_CFG_OFF); } -#define DBGFS_DUMP(reg) seq_printf(s, "\n %-25s 0x%08X", #reg, \ +#define DBGFS_DUMP(reg) drm_printf(p, "\n\t\t%-25s 0x%08X", #reg, \ readl(tvout->regs + reg)) -static void tvout_dbg_vip(struct seq_file *s, int val) +static void tvout_dbg_vip(struct drm_printer *p, int val) { int r, g, b, tmp, mask; char *const reorder[] = {"Y_G", "Cb_B", "Cr_R"}; @@ -459,86 +459,94 @@ static void tvout_dbg_vip(struct seq_file *s, int val) "Aux (color matrix by-passed)", "", "", "", "", "", "Force value"}; - seq_putc(s, '\t'); + drm_printf(p, "\n\t\t\t"); mask = TVO_VIP_REORDER_MASK << TVO_VIP_REORDER_R_SHIFT; r = (val & mask) >> TVO_VIP_REORDER_R_SHIFT; mask = TVO_VIP_REORDER_MASK << TVO_VIP_REORDER_G_SHIFT; g = (val & mask) >> TVO_VIP_REORDER_G_SHIFT; mask = TVO_VIP_REORDER_MASK << TVO_VIP_REORDER_B_SHIFT; b = (val & mask) >> TVO_VIP_REORDER_B_SHIFT; - seq_printf(s, "%-24s %s->%s %s->%s %s->%s\n", "Reorder:", + drm_printf(p, "%-24s %s->%s %s->%s %s->%s", "Reorder:", reorder[r], reorder[TVO_VIP_REORDER_CR_R_SEL], reorder[g], reorder[TVO_VIP_REORDER_Y_G_SEL], reorder[b], reorder[TVO_VIP_REORDER_CB_B_SEL]); - seq_puts(s, "\t\t\t\t\t"); + drm_printf(p, "\n\t\t\t"); mask = TVO_VIP_CLIP_MASK << TVO_VIP_CLIP_SHIFT; tmp = (val & mask) >> TVO_VIP_CLIP_SHIFT; - seq_printf(s, "%-24s %s\n", "Clipping:", clipping[tmp]); - seq_puts(s, "\t\t\t\t\t"); + drm_printf(p, "%-24s %s", "Clipping:", clipping[tmp]); + drm_printf(p, "\n\t\t\t"); mask = TVO_VIP_RND_MASK << TVO_VIP_RND_SHIFT; tmp = (val & mask) >> TVO_VIP_RND_SHIFT; - seq_printf(s, "%-24s input data rounded to %s per component\n", + drm_printf(p, "%-24s input data rounded to %s per component", "Round:", round[tmp]); - seq_puts(s, "\t\t\t\t\t"); + drm_printf(p, "\n\t\t\t"); tmp = (val & TVO_VIP_SEL_INPUT_MASK); - seq_printf(s, "%-24s %s", "Input selection:", input_sel[tmp]); + drm_printf(p, "%-24s %s", "Input selection:", input_sel[tmp]); } -static void tvout_dbg_hd_dac_cfg(struct seq_file *s, int val) +static void tvout_dbg_hd_dac_cfg(struct drm_printer *p, int val) { - seq_printf(s, "\t%-24s %s", "HD DAC:", + drm_printf(p, "\t%-24s %s", "HD DAC:", val & 1 ? "disabled" : "enabled"); } -static int tvout_dbg_show(struct seq_file *s, void *data) +static void sti_tvout_print(struct drm_printer *p, struct drm_encoder *encoder) { - struct drm_info_node *node = s->private; - struct sti_tvout *tvout = (struct sti_tvout *)node->info_ent->data; + struct sti_tvout *tvout = to_sti_tvout(encoder); struct drm_crtc *crtc; - seq_printf(s, "TVOUT: (vaddr = 0x%p)", tvout->regs); - - seq_puts(s, "\n\n HDMI encoder: "); - crtc = tvout->hdmi->crtc; - if (crtc) { - seq_printf(s, "connected to %s path", - sti_crtc_is_main(crtc) ? "main" : "aux"); - DBGFS_DUMP(TVO_HDMI_SYNC_SEL); - DBGFS_DUMP(TVO_VIP_HDMI); - tvout_dbg_vip(s, readl(tvout->regs + TVO_VIP_HDMI)); - } else { - seq_puts(s, "disabled"); + drm_printf(p, "\tTVOUT: (vaddr = 0x%pK)\n", tvout->regs); + + if (encoder->encoder_type == DRM_MODE_ENCODER_TMDS) { + drm_printf(p, "\tHDMI encoder: "); + crtc = tvout->hdmi->crtc; + if (crtc) { + drm_printf(p, "connected to %s path", + sti_crtc_is_main(crtc) ? "main" : "aux"); + DBGFS_DUMP(TVO_HDMI_SYNC_SEL); + DBGFS_DUMP(TVO_VIP_HDMI); + tvout_dbg_vip(p, readl(tvout->regs + TVO_VIP_HDMI)); + } else { + drm_printf(p, "disabled\n"); + return; + } } - seq_puts(s, "\n\n DVO encoder: "); - crtc = tvout->dvo->crtc; - if (crtc) { - seq_printf(s, "connected to %s path", - sti_crtc_is_main(crtc) ? "main" : "aux"); - DBGFS_DUMP(TVO_DVO_SYNC_SEL); - DBGFS_DUMP(TVO_DVO_CONFIG); - DBGFS_DUMP(TVO_VIP_DVO); - tvout_dbg_vip(s, readl(tvout->regs + TVO_VIP_DVO)); - } else { - seq_puts(s, "disabled"); + if (encoder->encoder_type == DRM_MODE_ENCODER_LVDS) { + drm_printf(p, "\tDVO encoder: "); + crtc = tvout->dvo->crtc; + if (crtc) { + drm_printf(p, "connected to %s path", + sti_crtc_is_main(crtc) ? "main" : "aux"); + DBGFS_DUMP(TVO_DVO_SYNC_SEL); + DBGFS_DUMP(TVO_DVO_CONFIG); + DBGFS_DUMP(TVO_VIP_DVO); + tvout_dbg_vip(p, readl(tvout->regs + TVO_VIP_DVO)); + } else { + drm_printf(p, "disabled\n"); + return; + } } - seq_puts(s, "\n\n HDA encoder: "); - crtc = tvout->hda->crtc; - if (crtc) { - seq_printf(s, "connected to %s path", - sti_crtc_is_main(crtc) ? "main" : "aux"); - DBGFS_DUMP(TVO_HD_SYNC_SEL); - DBGFS_DUMP(TVO_HD_DAC_CFG_OFF); - tvout_dbg_hd_dac_cfg(s, - readl(tvout->regs + TVO_HD_DAC_CFG_OFF)); - DBGFS_DUMP(TVO_VIP_HDF); - tvout_dbg_vip(s, readl(tvout->regs + TVO_VIP_HDF)); - } else { - seq_puts(s, "disabled"); + if (encoder->encoder_type == DRM_MODE_ENCODER_DAC) { + drm_printf(p, "\tHDA encoder: "); + crtc = tvout->hda->crtc; + if (crtc) { + drm_printf(p, "connected to %s path", + sti_crtc_is_main(crtc) ? "main" : "aux"); + DBGFS_DUMP(TVO_HD_SYNC_SEL); + DBGFS_DUMP(TVO_HD_DAC_CFG_OFF); + tvout_dbg_hd_dac_cfg(p, + readl(tvout->regs + TVO_HD_DAC_CFG_OFF)); + DBGFS_DUMP(TVO_VIP_HDF); + tvout_dbg_vip(p, readl(tvout->regs + TVO_VIP_HDF)); + } else { + drm_printf(p, "disabled\n"); + return; + } } - seq_puts(s, "\n\n main path configuration"); + drm_printf(p, "\n\t\tmain path configuration"); DBGFS_DUMP(TVO_CSC_MAIN_M0); DBGFS_DUMP(TVO_CSC_MAIN_M1); DBGFS_DUMP(TVO_CSC_MAIN_M2); @@ -549,7 +557,7 @@ static int tvout_dbg_show(struct seq_file *s, void *data) DBGFS_DUMP(TVO_CSC_MAIN_M7); DBGFS_DUMP(TVO_MAIN_IN_VID_FORMAT); - seq_puts(s, "\n\n auxiliary path configuration"); + drm_printf(p, "\n\t\tauxiliary path configuration"); DBGFS_DUMP(TVO_CSC_AUX_M0); DBGFS_DUMP(TVO_CSC_AUX_M2); DBGFS_DUMP(TVO_CSC_AUX_M3); @@ -558,24 +566,7 @@ static int tvout_dbg_show(struct seq_file *s, void *data) DBGFS_DUMP(TVO_CSC_AUX_M6); DBGFS_DUMP(TVO_CSC_AUX_M7); DBGFS_DUMP(TVO_AUX_IN_VID_FORMAT); - seq_putc(s, '\n'); - return 0; -} - -static struct drm_info_list tvout_debugfs_files[] = { - { "tvout", tvout_dbg_show, 0, NULL }, -}; - -static int tvout_debugfs_init(struct sti_tvout *tvout, struct drm_minor *minor) -{ - unsigned int i; - - for (i = 0; i < ARRAY_SIZE(tvout_debugfs_files); i++) - tvout_debugfs_files[i].data = tvout; - - return drm_debugfs_create_files(tvout_debugfs_files, - ARRAY_SIZE(tvout_debugfs_files), - minor->debugfs_root, minor); + drm_printf(p, "\n"); } static void sti_tvout_encoder_dpms(struct drm_encoder *encoder, int mode) @@ -596,36 +587,9 @@ static void sti_tvout_encoder_destroy(struct drm_encoder *encoder) kfree(sti_encoder); } -static int sti_tvout_late_register(struct drm_encoder *encoder) -{ - struct sti_tvout *tvout = to_sti_tvout(encoder); - int ret; - - if (tvout->debugfs_registered) - return 0; - - ret = tvout_debugfs_init(tvout, encoder->dev->primary); - if (ret) - return ret; - - tvout->debugfs_registered = true; - return 0; -} - -static void sti_tvout_early_unregister(struct drm_encoder *encoder) -{ - struct sti_tvout *tvout = to_sti_tvout(encoder); - - if (!tvout->debugfs_registered) - return; - - tvout->debugfs_registered = false; -} - static const struct drm_encoder_funcs sti_tvout_encoder_funcs = { .destroy = sti_tvout_encoder_destroy, - .late_register = sti_tvout_late_register, - .early_unregister = sti_tvout_early_unregister, + .atomic_print = sti_tvout_print }; static void sti_dvo_encoder_enable(struct drm_encoder *encoder) From patchwork Tue Jun 5 13:54:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 137746 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp990458lji; Tue, 5 Jun 2018 06:54:42 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKwg+H0VSSCrSu1VLcTyu2elNjl/vKCnXwFCMfhuEa5KPDa0zLxOfyZjxofA3kbKRQc9y1l X-Received: by 2002:a17:902:7883:: with SMTP id q3-v6mr26842209pll.71.1528206882508; Tue, 05 Jun 2018 06:54:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528206882; cv=none; d=google.com; s=arc-20160816; b=nfKm8ybITSGTuIAX8a//yrOij6AIbmmLaJ+mtbpNtMM7K2m3SC4LheC8Ln1NKXGP0g Ig/ua8QFUm7063GQHKruEFC7bSviFMRTYxUXEwtrYAf+YiY9Flo+dwX2OVNWHNGlD6pf JuBgJvJOAczfvGZ/T5CL7tDJz8MNDbRaSykL+81w+92CTIeuWJAQrXLnAzewtTYnkUdX 0WjdE5i6BQnWO9hffhifjFIyZewWPAoRAYuPrrJq6tdpa6PMK5shO+zR1lsFihF9rbEc LT+w8MUGxgygetSZGp1Giryq9InIFWB2bfZ6171Lk6tWkbAVjnWTeQ1T1S+796PPGhFO txuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=LX5Ax/A7QrfEjVy8tdEiGXI2NPjRkDiNrXaHP/an6n8=; b=v+ronZkkugjpDUjMPXywN1fjxyP59fA8NeY4v3DqIKXtVHEDZ+30Ge2F28e0n9///f Y5ZwA2iD6KGJ5VZluYwWTfIseMkmE32QI+yezGC+xgffysTvFnJXHUZlC99jlEAYtZH9 As/fR1RDP6N33h9wEIhjNT7IFgJLENqc4NxBOJOGNE4rmvLjAXkZP2Ez8Wuv7bzXCR6m YFmbVPLYtCDplqCcYvYvW53+UbZM0m3u5bkJDJrNTEJrPnAACrjfUZaH4D/PCTRRY8gQ RkRnhjdZy7aT8jJXNu71iPPzzWbkpLfSJ5qNG82Jh42JdV2nVRzkLkKtsX0S/FIC8RUB rw6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iBOGIHTT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f6-v6si24914145plm.448.2018.06.05.06.54.42; Tue, 05 Jun 2018 06:54:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iBOGIHTT; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752156AbeFENyj (ORCPT + 30 others); Tue, 5 Jun 2018 09:54:39 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:36055 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751889AbeFENyf (ORCPT ); Tue, 5 Jun 2018 09:54:35 -0400 Received: by mail-wr0-f193.google.com with SMTP id f16-v6so2546832wrm.3 for ; Tue, 05 Jun 2018 06:54:34 -0700 (PDT) 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; bh=LX5Ax/A7QrfEjVy8tdEiGXI2NPjRkDiNrXaHP/an6n8=; b=iBOGIHTTj4MzOzLWzwSOUhvYBiWYuD2dkSMsLDmTY1iXdzVHFoPUDydFkrTqwMbHtc U8a3sEo1eEdC5XoLL7/VYMij3eXUtBFtTih9a8yrkd/UldbvnGGLVyisULf01l0yAtoh YmBNT/1PPyZGKqafFxswTxkwJYowRAdeBBx0Q= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=LX5Ax/A7QrfEjVy8tdEiGXI2NPjRkDiNrXaHP/an6n8=; b=O4EcGD8ems9K/Ajcbj1JT+VALep0iqU3Sk0DZ1I2FCfEiUr/nRGmLq/raRvVo8juGn a8SS/bGRU8VlLlmxBjP9f/ZL4Qdr6hMJlL3ix+E98JYUfuQjGsXZ1nsqJegKrQdu/zr6 xija79A7pi/FKcj4GxT9n/+uxKav0FPeH+L0yT3XxIEcNkUKSF2JEKrWcTDXNtkmKfcJ n0sjDhYBS25E1+coXG4p6fpqiJwb+o687UYv7HwUrSyQHMPjZe+ExcS0/jqBk8VWsW0w xO/nCmWplOD1S/FxX8gnc1uQfFbVAh4aF+Vu9iRsho2UKTgJ0F55Dmtm5sN9V90PtCeM Ym2w== X-Gm-Message-State: APt69E1ORT+TU15sTUt+Rum0VldZOqzun7Xk8jvXw3kPGP6NNolNVuDl Vg7I/ZMcIlNPkt9My6Wo7R7vEQ== X-Received: by 2002:adf:d08b:: with SMTP id y11-v6mr2317032wrh.152.1528206874331; Tue, 05 Jun 2018 06:54:34 -0700 (PDT) Received: from lmecxl0911.lme.st.com (bol62-h02-176-179-166-238.dsl.sta.abo.bbox.fr. [176.179.166.238]) by smtp.gmail.com with ESMTPSA id o53-v6sm76797785wrc.96.2018.06.05.06.54.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 Jun 2018 06:54:33 -0700 (PDT) From: Benjamin Gaignard To: gustavo@padovan.org, maarten.lankhorst@linux.intel.com, seanpaul@chromium.org, airlied@linux.ie, vincent.abriou@st.com Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Benjamin Gaignard Subject: [PATCH v1 7/7] drm: sti: remove the last call to debugfs Date: Tue, 5 Jun 2018 15:54:07 +0200 Message-Id: <20180605135407.20214-8-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 2.15.0 In-Reply-To: <20180605135407.20214-1-benjamin.gaignard@linaro.org> References: <20180605135407.20214-1-benjamin.gaignard@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks to all the hooks in drm structure, custom debugfs could be removed of sti driver. Signed-off-by: Benjamin Gaignard --- drivers/gpu/drm/sti/sti_drv.c | 50 ------------------------------------------- 1 file changed, 50 deletions(-) -- 2.15.0 diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c index 90c46b49c931..95b0ac4d819c 100644 --- a/drivers/gpu/drm/sti/sti_drv.c +++ b/drivers/gpu/drm/sti/sti_drv.c @@ -7,7 +7,6 @@ #include #include -#include #include #include #include @@ -72,53 +71,6 @@ static int sti_drm_fps_set(void *data, u64 val) DEFINE_SIMPLE_ATTRIBUTE(sti_drm_fps_fops, sti_drm_fps_get, sti_drm_fps_set, "%llu\n"); -static int sti_drm_fps_dbg_show(struct seq_file *s, void *data) -{ - struct drm_info_node *node = s->private; - struct drm_device *dev = node->minor->dev; - struct drm_plane *p; - - list_for_each_entry(p, &dev->mode_config.plane_list, head) { - struct sti_plane *plane = to_sti_plane(p); - - seq_printf(s, "%s%s\n", - plane->fps_info.fps_str, - plane->fps_info.fips_str); - } - - return 0; -} - -static struct drm_info_list sti_drm_dbg_list[] = { - {"fps_get", sti_drm_fps_dbg_show, 0}, -}; - -static int sti_drm_dbg_init(struct drm_minor *minor) -{ - struct dentry *dentry; - int ret; - - ret = drm_debugfs_create_files(sti_drm_dbg_list, - ARRAY_SIZE(sti_drm_dbg_list), - minor->debugfs_root, minor); - if (ret) - goto err; - - dentry = debugfs_create_file("fps_show", S_IRUGO | S_IWUSR, - minor->debugfs_root, minor->dev, - &sti_drm_fps_fops); - if (!dentry) { - ret = -ENOMEM; - goto err; - } - - DRM_INFO("%s: debugfs installed\n", DRIVER_NAME); - return 0; -err: - DRM_ERROR("%s: cannot install debugfs\n", DRIVER_NAME); - return ret; -} - static const struct drm_mode_config_funcs sti_mode_config_funcs = { .fb_create = drm_gem_fb_create, .output_poll_changed = drm_fb_helper_output_poll_changed, @@ -167,8 +119,6 @@ static struct drm_driver sti_driver = { .gem_prime_vunmap = drm_gem_cma_prime_vunmap, .gem_prime_mmap = drm_gem_cma_prime_mmap, - .debugfs_init = sti_drm_dbg_init, - .name = DRIVER_NAME, .desc = DRIVER_DESC, .date = DRIVER_DATE,