Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp884539pxb; Wed, 27 Oct 2021 14:26:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyeW48BB3czUX17GscQlA7f/BbHBKHOehgDjT2oJwTyEo20qPwIPrg988m4gMuUmUn2B4AQ X-Received: by 2002:a63:6ac2:: with SMTP id f185mr186469pgc.326.1635369892249; Wed, 27 Oct 2021 14:24:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635369892; cv=none; d=google.com; s=arc-20160816; b=wXuH44RdubLqxtTY9Ou57OwE7FsWoX3ZxH2cWpewhw9zG86tGX6ubw5x13tEAyhokj O6IqU5uSCAtL6yJGamR54xvEB1axBojb6+itqPUOvksMFi8Uo0rXj3SFJnFABMolOmbz kFXPn8d5EBZJnv8nE2FLTo97VJPiSt96N05qxUdhlTBLMD+qq9rOhjpOCEtxGvkaRX9L MpVui2+sxt23dZTD8HS/qP5s4D21jlETloP5tQ5pEzNaZBtnpnE9GXBMzet3URFTOVaM g/mnsDtP/Nq7AdxbPcZHEbTQvcAyDs1A8VXtkeWVAUfQPU5B58scFE2Y7GkD8vYAFmSU AugA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject:dkim-signature; bh=MpaJyX5zCorSGoJdZD4lCOmC8oZ3HzkpJbp1UDR5foE=; b=OTfPmKnrRfi60M+nLhdQPVX8xVnCDNVeEwLtfjMSEjxkEOP11BJke9TXOzEaHIc5Kw JiEaoiemr+bXH5ZM7yvvyWcyS7O2In1f46whMrqh3pfjBEQp6/eKLqXF8FXKeqGEPhJK 6TnkqhQlki8ud69Z9AeRxP+b+z1Q4KiyeEz5NYUr8eTwMXWzSAsbkZuRqHpateAASlrF Psrd296+NqU1XE77vR0b8aLb6xXg+Uxab1HpFWc0Ru9obUk6JVgSXJtJvl+PxqTEf1Up dzH4L9vqWwvc79X7LKPyVI9mClxpfTOT7o36dluAQXwsbwABu2F7lKdNu6f0wvdqBsrY /YOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=Dju3GL58; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v8si1761119pfu.337.2021.10.27.14.24.40; Wed, 27 Oct 2021 14:24:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=Dju3GL58; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240356AbhJ0MtM (ORCPT + 97 others); Wed, 27 Oct 2021 08:49:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241986AbhJ0MtL (ORCPT ); Wed, 27 Oct 2021 08:49:11 -0400 Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5CA71C061745 for ; Wed, 27 Oct 2021 05:46:46 -0700 (PDT) Received: by mail-wm1-x334.google.com with SMTP id 82-20020a1c0055000000b0032ccc3ad5c1so4223448wma.2 for ; Wed, 27 Oct 2021 05:46:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=subject:to:cc:references:from:organization:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=MpaJyX5zCorSGoJdZD4lCOmC8oZ3HzkpJbp1UDR5foE=; b=Dju3GL58M2PKH/L0/11HSg8MvprD+864BIxCnhj9V8CrNHMVTfxPh2/mk9i9bD85iQ 5GTSVDg8d5QTOiwNavha2AfB1oVD5hDwo0uScRqq5h6qROjQCvfO6Yjs78Lgdpoo7pj7 vXpHGx4N/qyWTequyJJJfjQIXCbQv5i8Yc6KS1AVXPVdT62kUkLsAnyj34fwaQlEZ8kz q/chbg+9P2h9byKvCgnM7rm5xviv2bqqJPA8mBNvBV7T2H0PYGIPiT0zlgBPQeJBYzjq /9wBl4ygPVO/ht78eB6rPRNjQuK/YwNufA2HXrz1bRkW62YBI19gXTCc+fe9wIVtFxov tKcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=MpaJyX5zCorSGoJdZD4lCOmC8oZ3HzkpJbp1UDR5foE=; b=id22la9Iii6t+ms6esqlm8XX83y7NUUINi/f+PrfDGKu2MSd0mpqFy2w4vSO3ZMBmv 2655F7OB7mY81Zux6YT98bTZ2igaYzc5mrO9Q8f8J30NofS8N83Pv7ulei6QPaD050Cv G1ws+6XfWWh6QqzoEhDw0eeoCUkKhRN1BTOO8J7x9dIeIE6tz5U0duqjEiTY6pdDtLLL rfdmKn5ODJqnKa8TWOl4XXdjDt+LviHgqiVgKqQ1Ug40MWqasTjf7yWI4ef6URqONQir St37Y2X0unnJs6XFcK3OgYIR/bc+My1HA2KkGd5NWnmIs66lVZ9Hjo/32o9k0bddd5vi 2wxA== X-Gm-Message-State: AOAM530Vg4GdwPMfJAwZpuI1/eYoULGiu4quKNJl4kmBtCyVCr/+7X3I y6WAbxx9GEJM3VwjvbELk8iJXvbrY6WwwA== X-Received: by 2002:a05:600c:19d3:: with SMTP id u19mr5315391wmq.164.1635338804779; Wed, 27 Oct 2021 05:46:44 -0700 (PDT) Received: from [172.20.10.7] ([37.166.181.245]) by smtp.gmail.com with ESMTPSA id z6sm4185332wmp.1.2021.10.27.05.46.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 27 Oct 2021 05:46:44 -0700 (PDT) Subject: Re: [PATCH v6 8/9] drm/omap: add plane_atomic_print_state support To: Tomi Valkeinen Cc: linux-omap@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, khilman@baylibre.com, Benoit Parrot References: <20211018142842.2511200-1-narmstrong@baylibre.com> <20211018142842.2511200-9-narmstrong@baylibre.com> <70a29d4d-eaab-5162-58b7-df9d9d3e7a9b@ideasonboard.com> From: Neil Armstrong Organization: Baylibre Message-ID: <0423c635-7121-b603-a52c-c68dde4c8c30@baylibre.com> Date: Wed, 27 Oct 2021 14:46:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <70a29d4d-eaab-5162-58b7-df9d9d3e7a9b@ideasonboard.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27/10/2021 14:23, Tomi Valkeinen wrote: > On 18/10/2021 17:28, Neil Armstrong wrote: >> From: Benoit Parrot >> >> Now that we added specific item to our subclassed drm_plane_state >> we can add omap_plane_atomic_print_state() helper to dump out our own >> driver specific plane state. >> >> Signed-off-by: Benoit Parrot >> Signed-off-by: Neil Armstrong >> --- >>   drivers/gpu/drm/omapdrm/omap_plane.c | 16 ++++++++++++++++ >>   1 file changed, 16 insertions(+) >> >> diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c >> index ce5ed45401fb..5001c8354e4f 100644 >> --- a/drivers/gpu/drm/omapdrm/omap_plane.c >> +++ b/drivers/gpu/drm/omapdrm/omap_plane.c >> @@ -348,6 +348,21 @@ omap_plane_atomic_duplicate_state(struct drm_plane *plane) >>       return &state->base; >>   } >>   +static void omap_plane_atomic_print_state(struct drm_printer *p, >> +                      const struct drm_plane_state *state) >> +{ >> +    struct omap_plane_state *omap_state = to_omap_plane_state(state); >> + >> +    drm_printf(p, "\toverlay=%s\n", omap_state->overlay ? >> +                    omap_state->overlay->name : "(null)"); >> +    if (omap_state->overlay) { >> +        drm_printf(p, "\t\tidx=%d\n", omap_state->overlay->idx); >> +        drm_printf(p, "\t\toverlay_id=%d\n", >> +               omap_state->overlay->id); >> +        drm_printf(p, "\t\tcaps=0x%x\n", omap_state->overlay->caps); >> +    } >> +} > > This prints: > >         overlay=gfx >                 idx=0 >                 overlay_id=0 >                 caps=0x3e > > I'm not sure if some of these details are needed. The name ("gfx") and overlay_id refer to the same thing, and while idx is in theory a different value, in practice it's always the same as overlay_id. And even if it was a different number, I think idx is kind of irrelevant, isn't it? > > caps can be figured out from the name of the overlay, but perhaps it doesn't hurt to print them here. Then again, if none of the other debug prints show the cap values (e.g. "requires cap 0x4), maybe printing the caps value is not really useful here. > > Maybe this could be just a single line, say: > > overlay=gfx > > or if caps is useful: > > overlay=gfx (caps=0x3e) > > What do you think? I'm ok with that. Thanks, Neil > >  Tomi