From patchwork Thu Jan 10 17:16:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shayenne Moura X-Patchwork-Id: 10756305 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6001091E for ; Thu, 10 Jan 2019 17:16:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 421B929B22 for ; Thu, 10 Jan 2019 17:16:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 32C6829DFE; Thu, 10 Jan 2019 17:16:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CF0E929B22 for ; Thu, 10 Jan 2019 17:16:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E64D86F3DB; Thu, 10 Jan 2019 17:16:39 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qt1-x843.google.com (mail-qt1-x843.google.com [IPv6:2607:f8b0:4864:20::843]) by gabe.freedesktop.org (Postfix) with ESMTPS id 139716F3DB for ; Thu, 10 Jan 2019 17:16:38 +0000 (UTC) Received: by mail-qt1-x843.google.com with SMTP id t33so14066915qtt.4 for ; Thu, 10 Jan 2019 09:16:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=vJ/IYTL7nBwK2EWEMM/wGih63gWPJo1gu5ym8hfvgdg=; b=Nnmz32Kg47ahXrk6ITrMYEmldFZmHjEkrIqzuVBQ+gq9i6I4qymjTKaR5FAoRalOzG eWvd4PvFTmJUt0L5XHOWAuSenxOtigL0kSkCSkeqdz/6biDB4vh/Z3UzyPUunJEcM7RH tDEA+iXw86UFo7K4E+95XoTErxQCcKbtHdCKfgRZyqtaSCouYhraMndhwL46lDwUQK9f k6WLJMFMWSEhosLlnX5F8no9Yb+DEfQhlA3cJHsOU8A0qk/V6uIkPuPvlNoGDb2ULj67 dyE6KvoajJ3Ks0VF4Z2zf6lO6BAQf2dU79U8SrGaVa5zxXjFx2lQViqlJ+fJDJlDckvs SfmA== X-Gm-Message-State: AJcUukdmkUXipY+LSoaytdbMoikPhproZ+FycbD5yy7W0hfgMid9YJwK Y2o9Mt12AzGaCtKoXE7rR9Q= X-Google-Smtp-Source: ALg8bN5ObYNj24rlldo6ZTo/DUN2fhX0uCuj8yZsdmxkyU/N53kcHJipl2YWrn32ekprvbKG53WLtA== X-Received: by 2002:a37:dd43:: with SMTP id n64mr10378187qki.7.1547140597021; Thu, 10 Jan 2019 09:16:37 -0800 (PST) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id n72sm41914592qki.26.2019.01.10.09.16.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Jan 2019 09:16:36 -0800 (PST) Date: Thu, 10 Jan 2019 15:16:30 -0200 From: Shayenne Moura To: Maarten Lankhorst , Maxime Ripard , Sean Paul , David Airlie , Rob Clark , Benjamin Gaignard , Vincent Abriou , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , Tomi Valkeinen , Neil Armstrong , Carlo Caione , Kevin Hilman Subject: [PATCH v3 2/7] drm: omapdrm: Cleanup drm_display_mode print str Message-ID: <3e741fa74da8ff79c54c43377dc2831fbb2cd8d4.1547137815.git.shayenneluzmoura@gmail.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171215 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This patch adjust the print string of drm_display_mode object to remove drm_mode_object dependency in omapdrm files. Signed-off-by: Shayenne Moura Reviewed-by: Sebastian Reichel --- Changes in v2: - Use DRM_MODE_FMT/ARG macros (Daniel) - Make the commit message more clear Changes in v3: - No changes drivers/gpu/drm/omapdrm/omap_connector.c | 9 ++------- drivers/gpu/drm/omapdrm/omap_crtc.c | 8 ++------ 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/omap_connector.c b/drivers/gpu/drm/omapdrm/omap_connector.c index b81302c4bf9e..874d8f3cbff6 100644 --- a/drivers/gpu/drm/omapdrm/omap_connector.c +++ b/drivers/gpu/drm/omapdrm/omap_connector.c @@ -305,14 +305,9 @@ static int omap_connector_mode_valid(struct drm_connector *connector, drm_mode_destroy(dev, new_mode); done: - DBG("connector: mode %s: " - "%d:\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x", + DBG("connector: mode %s: " DRM_MODE_FMT, (ret == MODE_OK) ? "valid" : "invalid", - mode->base.id, mode->name, mode->vrefresh, mode->clock, - mode->hdisplay, mode->hsync_start, - mode->hsync_end, mode->htotal, - mode->vdisplay, mode->vsync_start, - mode->vsync_end, mode->vtotal, mode->type, mode->flags); + DRM_MODE_ARG(mode)); return ret; } diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c index caffc547ef97..40acf4ce7c9f 100644 --- a/drivers/gpu/drm/omapdrm/omap_crtc.c +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c @@ -427,12 +427,8 @@ static void omap_crtc_mode_set_nofb(struct drm_crtc *crtc) struct omap_crtc *omap_crtc = to_omap_crtc(crtc); struct drm_display_mode *mode = &crtc->state->adjusted_mode; - DBG("%s: set mode: %d:\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x", - omap_crtc->name, mode->base.id, mode->name, - mode->vrefresh, mode->clock, - mode->hdisplay, mode->hsync_start, mode->hsync_end, mode->htotal, - mode->vdisplay, mode->vsync_start, mode->vsync_end, mode->vtotal, - mode->type, mode->flags); + DBG("%s: set mode: " DRM_MODE_FMT, + omap_crtc->name, DRM_MODE_ARG(mode)); drm_display_mode_to_videomode(mode, &omap_crtc->vm); }