From patchwork Thu Jan 10 17:16:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shayenne Moura X-Patchwork-Id: 10756303 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 9C16591E for ; Thu, 10 Jan 2019 17:16:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E44029DFE for ; Thu, 10 Jan 2019 17:16:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 71C5C29E07; Thu, 10 Jan 2019 17:16:19 +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 DE81029DFE for ; Thu, 10 Jan 2019 17:16:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BBAD56F3DA; Thu, 10 Jan 2019 17:16:16 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qt1-x842.google.com (mail-qt1-x842.google.com [IPv6:2607:f8b0:4864:20::842]) by gabe.freedesktop.org (Postfix) with ESMTPS id D0C396F3DA for ; Thu, 10 Jan 2019 17:16:14 +0000 (UTC) Received: by mail-qt1-x842.google.com with SMTP id l11so14093409qtp.0 for ; Thu, 10 Jan 2019 09:16:14 -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=4sBv23occtJ8NdvEuA1hoqjSMaDhdA3rncUfIV6yqY8=; b=Gya8Rr2t9KOZpaJDv1l7zAeBtAwr8OA9TsJnd1zahpul2CR2rLZYALwNCbLPa1pPOK 8mZdTv9zgVu35/HKuJ1Hg7L95ywvSQ8k6j/pTRQXpPcmuO5Y680s/eIE7ICHQ47dJD45 AfYto/IXYlfJFrqR8IKdZfEeLZdpPDUwQYdDFcPKX1aTVgceX3C29y+gETrib5hPOcNw L0OY4E4Vhf+OO4SccQrljZ22XWItV+u7Hj3dAjIi4TwUbexotyJ4oxjEmF6SUWaP4vfY XqIftnKhHQz9GUkB73JWduftz67YSozC07IOaxCsDWyWGV6PZEfj2oTh1uoHjf+h97X5 mlRA== X-Gm-Message-State: AJcUukdfDOZEeYWwBztgqyJ49+aTCmoULABrdC4Axiqc3OWWdUP2ePGV 3Oe7qBftmgbxKDYnntApF1c= X-Google-Smtp-Source: ALg8bN4b45o2NwmKpqciVHxeDJxpP4WoEPqPZoSUtvlt0DTYb68QgIhpF/vRwyWUihT3c3eUtRy4og== X-Received: by 2002:ac8:7a8d:: with SMTP id x13mr10673756qtr.357.1547140573873; Thu, 10 Jan 2019 09:16:13 -0800 (PST) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id x41sm46832036qth.92.2019.01.10.09.16.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Jan 2019 09:16:13 -0800 (PST) Date: Thu, 10 Jan 2019 15:16:07 -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 1/7] drm: msm: Cleanup drm_display_mode print str Message-ID: <997df5bb212fc5ddd41dfe91c6e48c483face3eb.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 msm files. Signed-off-by: Shayenne Moura --- Changes in v2: - Use DRM_MODE_FMT/ARG macros (Daniel). - Make the commit message more clear Changes in v3: - Resolve typo in v2 patch drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c | 10 ++-------- drivers/gpu/drm/msm/disp/mdp4/mdp4_dsi_encoder.c | 9 +-------- drivers/gpu/drm/msm/disp/mdp4/mdp4_dtv_encoder.c | 9 +-------- drivers/gpu/drm/msm/disp/mdp4/mdp4_lcdc_encoder.c | 9 +-------- drivers/gpu/drm/msm/disp/mdp5/mdp5_cmd_encoder.c | 9 +-------- drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 9 +-------- drivers/gpu/drm/msm/disp/mdp5/mdp5_encoder.c | 9 +-------- drivers/gpu/drm/msm/dsi/dsi_manager.c | 9 +-------- drivers/gpu/drm/msm/edp/edp_bridge.c | 9 +-------- 9 files changed, 10 insertions(+), 72 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c b/drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c index 457c29dba4a1..7b028f778960 100644 --- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c +++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c @@ -244,14 +244,8 @@ static void mdp4_crtc_mode_set_nofb(struct drm_crtc *crtc) 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", - mdp4_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, + mdp4_crtc->name, DRM_MODE_ARG(mode)); mdp4_write(mdp4_kms, REG_MDP4_DMA_SRC_SIZE(dma), MDP4_DMA_SRC_SIZE_WIDTH(mode->hdisplay) | diff --git a/drivers/gpu/drm/msm/disp/mdp4/mdp4_dsi_encoder.c b/drivers/gpu/drm/msm/disp/mdp4/mdp4_dsi_encoder.c index 6a1ebdace391..48ce218b8463 100644 --- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_dsi_encoder.c +++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_dsi_encoder.c @@ -58,14 +58,7 @@ static void mdp4_dsi_encoder_mode_set(struct drm_encoder *encoder, mode = adjusted_mode; - DBG("set mode: %d:\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x", - 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("set mode: " DRM_MODE_FMT, DRM_MODE_ARG(mode)); ctrl_pol = 0; if (mode->flags & DRM_MODE_FLAG_NHSYNC) diff --git a/drivers/gpu/drm/msm/disp/mdp4/mdp4_dtv_encoder.c b/drivers/gpu/drm/msm/disp/mdp4/mdp4_dtv_encoder.c index ba8e587f734b..f6bc86a35d8d 100644 --- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_dtv_encoder.c +++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_dtv_encoder.c @@ -104,14 +104,7 @@ static void mdp4_dtv_encoder_mode_set(struct drm_encoder *encoder, mode = adjusted_mode; - DBG("set mode: %d:\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x", - 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("set mode: " DRM_MODE_FMT, DRM_MODE_ARG(mode)); mdp4_dtv_encoder->pixclock = mode->clock * 1000; diff --git a/drivers/gpu/drm/msm/disp/mdp4/mdp4_lcdc_encoder.c b/drivers/gpu/drm/msm/disp/mdp4/mdp4_lcdc_encoder.c index 2bfb39082f54..d47b8f4af991 100644 --- a/drivers/gpu/drm/msm/disp/mdp4/mdp4_lcdc_encoder.c +++ b/drivers/gpu/drm/msm/disp/mdp4/mdp4_lcdc_encoder.c @@ -273,14 +273,7 @@ static void mdp4_lcdc_encoder_mode_set(struct drm_encoder *encoder, mode = adjusted_mode; - DBG("set mode: %d:\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x", - 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("set mode: " DRM_MODE_FMT, DRM_MODE_ARG(mode)); mdp4_lcdc_encoder->pixclock = mode->clock * 1000; diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_cmd_encoder.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_cmd_encoder.c index d6f79dc755b4..33972c1816ed 100644 --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_cmd_encoder.c +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_cmd_encoder.c @@ -134,14 +134,7 @@ void mdp5_cmd_encoder_mode_set(struct drm_encoder *encoder, { mode = adjusted_mode; - DBG("set mode: %d:\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x", - 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("set mode: " DRM_MODE_FMT, DRM_MODE_ARG(mode)); pingpong_tearcheck_setup(encoder, mode); mdp5_crtc_set_pipeline(encoder->crtc); } diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c index b1da9ce54379..4878b81c96fb 100644 --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c @@ -384,14 +384,7 @@ static void mdp5_crtc_mode_set_nofb(struct drm_crtc *crtc) 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", - 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, crtc->name, DRM_MODE_ARG(mode)); mixer_width = mode->hdisplay; if (r_mixer) diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_encoder.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_encoder.c index fcd44d1d1068..d2a56e55e53d 100644 --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_encoder.c +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_encoder.c @@ -118,14 +118,7 @@ static void mdp5_vid_encoder_mode_set(struct drm_encoder *encoder, mode = adjusted_mode; - DBG("set mode: %d:\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x", - 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("set mode: " DRM_MODE_FMT, DRM_MODE_ARG(mode)); ctrl_pol = 0; diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c index 80aa6344185e..7c8352a8ea97 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_manager.c +++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c @@ -536,14 +536,7 @@ static void dsi_mgr_bridge_mode_set(struct drm_bridge *bridge, struct mipi_dsi_host *host = msm_dsi->host; bool is_dual_dsi = IS_DUAL_DSI(); - DBG("set mode: %d:\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x", - 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("set mode: " DRM_MODE_FMT, DRM_MODE_ARG(mode)); if (is_dual_dsi && !IS_MASTER_DSI_LINK(id)) return; diff --git a/drivers/gpu/drm/msm/edp/edp_bridge.c b/drivers/gpu/drm/msm/edp/edp_bridge.c index 931a5c97cccf..153f350ce017 100644 --- a/drivers/gpu/drm/msm/edp/edp_bridge.c +++ b/drivers/gpu/drm/msm/edp/edp_bridge.c @@ -60,14 +60,7 @@ static void edp_bridge_mode_set(struct drm_bridge *bridge, struct edp_bridge *edp_bridge = to_edp_bridge(bridge); struct msm_edp *edp = edp_bridge->edp; - DBG("set mode: %d:\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x", - 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("set mode: " DRM_MODE_FMT, DRM_MODE_ARG(mode)); list_for_each_entry(connector, &dev->mode_config.connector_list, head) { if ((connector->encoder != NULL) && 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); } From patchwork Thu Jan 10 17:16:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shayenne Moura X-Patchwork-Id: 10756307 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 6515613BF for ; Thu, 10 Jan 2019 17:17:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4A79A29B6B for ; Thu, 10 Jan 2019 17:17:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3DEF929DC3; Thu, 10 Jan 2019 17:17:01 +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 ED50329B6B for ; Thu, 10 Jan 2019 17:17:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ECF746F3DC; Thu, 10 Jan 2019 17:16:59 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1F0F46F3DC for ; Thu, 10 Jan 2019 17:16:59 +0000 (UTC) Received: by mail-qt1-x841.google.com with SMTP id l12so14042264qtf.8 for ; Thu, 10 Jan 2019 09:16:59 -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=mfG5O/OXnDy9gzTm/iVTb3FlpQ/p9bXyoUYTpACFCLk=; b=HEXZ7xRlPvwEVPcCewFRT3OIzvnIsSOjuxUZNrs4oPwrn1zD442IsS6Twj99LvdbHI YiLrky/AvpEhA+lfl2BTjzTiSJiMOXh2C45KnuqXDS5RHZSR93JgBTOUDK+lcXQxD3Mi C18vwNL65ZMLjbdSaWaTsACoy2wnd3kKd6vwBqPAz04uVPO5mFl8C7wqIr/9ZrHC2RXs mIxMQaZ7g7Wq8zCQfy7Ltvo7oVHCwn27zL1nO6zmPF3g+5s7ZbhxGG1XYyVE+DaU7LZk FRQf8BhdrJuenOgSmpIfMelW0GXlrQZn+zIH5eBEYMrHAFfMfq+93rEanuxYGp530bwm qTqw== X-Gm-Message-State: AJcUukemdfkgttbEPpiOhsufOXqXED8IkJBlmx/59crHnobFVjWszX4w Qw/sQZx7L2zC2FevG8zmbKM= X-Google-Smtp-Source: ALg8bN4Zc4GrmNNYVW1OkuSxAbu4MRj8ezxVaCiG1EhCYfexRN7F2r0ameCQ0FBQksKGCsmULvu5LQ== X-Received: by 2002:ac8:2487:: with SMTP id s7mr10336146qts.116.1547140618193; Thu, 10 Jan 2019 09:16:58 -0800 (PST) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id b17sm35876941qkj.69.2019.01.10.09.16.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Jan 2019 09:16:57 -0800 (PST) Date: Thu, 10 Jan 2019 15:16:51 -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 3/7] drm: meson: Cleanup on drm_display_mode print str Message-ID: <70da9f0c1a6dfa2bd2eb4e12fd3a6f53df05855b.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 meson files. Signed-off-by: Shayenne Moura Reviewed-by: Neil Armstrong --- Changes in v2: - Use DRM_MODE_FMT/ARG macros (Daniel) - Make the commit message more clear Changes in v3: - No changes drivers/gpu/drm/meson/meson_dw_hdmi.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/meson/meson_dw_hdmi.c b/drivers/gpu/drm/meson/meson_dw_hdmi.c index d8c5cc34e22e..0b6c29cdd934 100644 --- a/drivers/gpu/drm/meson/meson_dw_hdmi.c +++ b/drivers/gpu/drm/meson/meson_dw_hdmi.c @@ -365,7 +365,7 @@ static int dw_hdmi_phy_init(struct dw_hdmi *hdmi, void *data, unsigned int wr_clk = readl_relaxed(priv->io_base + _REG(VPU_HDMI_SETTING)); - DRM_DEBUG_DRIVER("%d:\"%s\"\n", mode->base.id, mode->name); + DRM_DEBUG_DRIVER("\"%s\"\n", mode->name); /* Enable clocks */ regmap_update_bits(priv->hhi, HHI_HDMI_CLK_CNTL, 0xffff, 0x100); @@ -555,12 +555,7 @@ dw_hdmi_mode_valid(struct drm_connector *connector, int vic = drm_match_cea_mode(mode); enum drm_mode_status status; - DRM_DEBUG_DRIVER("Modeline %d:\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x\n", - 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_DEBUG_DRIVER("Modeline " DRM_MODE_FMT "\n", DRM_MODE_ARG(mode)); /* Check against non-VIC supported modes */ if (!vic) { @@ -650,8 +645,7 @@ static void meson_venc_hdmi_encoder_mode_set(struct drm_encoder *encoder, struct meson_drm *priv = dw_hdmi->priv; int vic = drm_match_cea_mode(mode); - DRM_DEBUG_DRIVER("%d:\"%s\" vic %d\n", - mode->base.id, mode->name, vic); + DRM_DEBUG_DRIVER("\"%s\" vic %d\n", mode->name, vic); /* VENC + VENC-DVI Mode setup */ meson_venc_hdmi_mode_set(priv, vic, mode); From patchwork Thu Jan 10 17:17:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shayenne Moura X-Patchwork-Id: 10756309 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 F29EB91E for ; Thu, 10 Jan 2019 17:17:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D816F29B6B for ; Thu, 10 Jan 2019 17:17:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC1F329D6F; Thu, 10 Jan 2019 17:17:50 +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 7EFD529B6B for ; Thu, 10 Jan 2019 17:17:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 739AB6F3DE; Thu, 10 Jan 2019 17:17:49 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) by gabe.freedesktop.org (Postfix) with ESMTPS id 398D26F3DE for ; Thu, 10 Jan 2019 17:17:48 +0000 (UTC) Received: by mail-qt1-x841.google.com with SMTP id y20so14034994qtm.13 for ; Thu, 10 Jan 2019 09:17:48 -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=QMzIK0mBMgiwms9QG6bHGnhAIOUPelgLkiWXu2a2hRU=; b=eRdiTo/GH9yX4VGjwpjeF7YDH45+TOwPeWK086vMWPfRDfT07HS6Ea7QrB9ZJHDCLF FAQI+D6bhpeGzheaq2xs8fO1uUeCYYy4a63MvEC+/+YBVkpkEE+ITn4kgNorguBuSZXo CjjGlM7L+ERjEZvYD/EZ1t3+E2iSP4IsL347ZGIYQL12OanuMmelxIAJg1FTKuPUAM0r 6hkIJO/CRqZtitgH7lEV56GmDOMHxdmqZS8+DM/EOfEQVf5OypJ4DYzDGo/XpE9qiuo/ wJZVm7/BU4uX6cSiAwWd+hnLhB5gsB42FVOLtK2qX6FHQfrupjpZrfO9qIgYdrJZvK88 dnbQ== X-Gm-Message-State: AJcUukfJ7U9ThxzyFwA2VJ1axi/AGz/AzkJ2GFYVBs1bzVnqinyCnuJ4 PzAMU7QCANswASgz6lMN6p8= X-Google-Smtp-Source: ALg8bN5jq5wlRC0GYhk8tdScPMH1Foe9P4EwjIyfWEGvZ2hoaaW0ANPIQ4djxwb7OrZfposf24bu+g== X-Received: by 2002:a0c:8ecc:: with SMTP id y12mr10551394qvb.41.1547140667324; Thu, 10 Jan 2019 09:17:47 -0800 (PST) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id 83sm45154817qkz.73.2019.01.10.09.17.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Jan 2019 09:17:46 -0800 (PST) Date: Thu, 10 Jan 2019 15:17:41 -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 4/7] drm: sti: Cleanup drm_display_mode print str Message-ID: <37d2776a34e83a56f1867e7727a72194ce1b6b4f.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 sti files. Signed-off-by: Shayenne Moura Acked-by: Benjamin Gaignard --- Changes in v2: - Use DRM_MODE_FMT/ARG macros (Daniel) - Make the commit message more clear Changes in v3: - No changes drivers/gpu/drm/sti/sti_crtc.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/sti/sti_crtc.c b/drivers/gpu/drm/sti/sti_crtc.c index ed76e52eb213..ec9f87483e39 100644 --- a/drivers/gpu/drm/sti/sti_crtc.c +++ b/drivers/gpu/drm/sti/sti_crtc.c @@ -53,18 +53,10 @@ sti_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode) struct clk *compo_clk, *pix_clk; int rate = mode->clock * 1000; - DRM_DEBUG_KMS("CRTC:%d (%s) mode:%d (%s)\n", - crtc->base.id, sti_mixer_to_str(mixer), - mode->base.id, mode->name); - - DRM_DEBUG_KMS("%d %d %d %d %d %d %d %d %d %d 0x%x 0x%x\n", - 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_DEBUG_KMS("CRTC:%d (%s) mode: (%s)\n", + crtc->base.id, sti_mixer_to_str(mixer), mode->name); + + DRM_DEBUG_KMS(DRM_MODE_FMT "\n", DRM_MODE_ARG(mode)); if (mixer->id == STI_MIXER_MAIN) { compo_clk = compo->clk_compo_main; From patchwork Thu Jan 10 17:18:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shayenne Moura X-Patchwork-Id: 10756311 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 320E391E for ; Thu, 10 Jan 2019 17:18:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1689829B1A for ; Thu, 10 Jan 2019 17:18:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0A12829B6B; Thu, 10 Jan 2019 17:18:44 +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 BFE2429B1A for ; Thu, 10 Jan 2019 17:18:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CF2586F3DF; Thu, 10 Jan 2019 17:18:42 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by gabe.freedesktop.org (Postfix) with ESMTPS id ACE3D6F3DF for ; Thu, 10 Jan 2019 17:18:41 +0000 (UTC) Received: by mail-qt1-x844.google.com with SMTP id l12so14053701qtf.8 for ; Thu, 10 Jan 2019 09:18:41 -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=qN2LbJR3NsKZsQgqr5h9W8jkonbeONwWnW8fLuoI2NA=; b=Phi2Z5G1sr4Yip9c39x1DXaE5gNWXZMa1Y/Jw+d+iO9S4UlSb7jSi5iYTnLOlArjYM JsHMqDauDwpXYVA/5Gnh+LfxrMWoXepNFzg7Ckxr6IsTCwjmw1N8XDU7220AaS+4sjwk 1fBmaRHBCfCpBGhBSykY8UBmBpVbFsWX1n3GLMja6xW3VrcAyLd/ADMymWd/Cj1EyUVy 7QtaHsS/Hk6GR9eLmYbIrkyAkb9QZ6NaoEgKfD2k9AjYn0//L9uJGvtryLzqxhynNUKH SoZTc9bBkYvKb0zW2UcyUzq6LaghhJPx/BFDsHZUkNTkguPhmBTMML/ysqsaM/NSq1Eg Rdcg== X-Gm-Message-State: AJcUukedHnk01nYxPSZK0xglhxWSSwj7coXVEKqz5f7uPnk/vX+0FgdH eEj8eMf4T1FYGZgNjyMvXqM= X-Google-Smtp-Source: ALg8bN468vI5CuqdpExXWlx75nQNu8lzN80AirHQxYEKCv64N+4OgnKv+e85aAdWs5X87DqXVe3u5g== X-Received: by 2002:a0c:ad9a:: with SMTP id w26mr10553472qvc.39.1547140720800; Thu, 10 Jan 2019 09:18:40 -0800 (PST) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id d85sm7000154qkb.89.2019.01.10.09.18.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Jan 2019 09:18:40 -0800 (PST) Date: Thu, 10 Jan 2019 15:18:34 -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 5/7] drm: i915: Cleanup drm_display_mode print str Message-ID: <35ff563d8a3a7cc59b99b08c2d2f57364bd52f82.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 i915 files. It modifies the print style to standardize the use of DRM_MODE_FMT. Signed-off-by: Shayenne Moura Reviewed-by: Jani Nikula --- Changes in v2: - Use DRM_MODE_FMT/ARG macros (Daniel) - Make the commit message more clear Changes in v3: - No changes drivers/gpu/drm/i915/i915_debugfs.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 7f455bca528e..a63d084c8e96 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -2948,14 +2948,7 @@ static void intel_seq_print_mode(struct seq_file *m, int tabs, for (i = 0; i < tabs; i++) seq_putc(m, '\t'); - seq_printf(m, "id %d:\"%s\" freq %d clock %d hdisp %d hss %d hse %d htot %d vdisp %d vss %d vse %d vtot %d type 0x%x flags 0x%x\n", - 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); + seq_printf(m, DRM_MODE_FMT "\n", DRM_MODE_ARG(mode)); } static void intel_encoder_info(struct seq_file *m, From patchwork Thu Jan 10 17:19:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shayenne Moura X-Patchwork-Id: 10756313 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 B351091E for ; Thu, 10 Jan 2019 17:19:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9669129BE3 for ; Thu, 10 Jan 2019 17:19:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 88D5029D85; Thu, 10 Jan 2019 17:19:14 +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 B84C629BE3 for ; Thu, 10 Jan 2019 17:19:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CB1966F3E2; Thu, 10 Jan 2019 17:19:12 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9D39A6F3E2 for ; Thu, 10 Jan 2019 17:19:11 +0000 (UTC) Received: by mail-qt1-x844.google.com with SMTP id y20so14043867qtm.13 for ; Thu, 10 Jan 2019 09:19:11 -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=4wzNd9DeG8t/wPBLcT852h6gcuKHG7AuIZJhFevKVHc=; b=OG0VKCd8e16rlQLcDYm8xzPd3cMGJ+gn+Pvyyl3nVW1lkfeuxahU8X1A6bTFHNbiDr 2009+c0um3laVYsfzlNW/YF8r2wmOZ4ph//IHdUkKj1S7hyxKwaMtlDCxzchT33jjKJf i8NuQV8rOEKK0+GHDB9BIZYUzQwfWmudEQz0t3+Lv2MGJhxUW0YLCcA0Xbm4IlZ9o29P XwZtmR21vZ82V3MDVARAAdOZi7BnO6srWVwBH4wxm36kO1UDoUsCBYsHo2HviiZY8fAP iLjVH4jGhOSCQMARzEpnzLieWZR3FV12pHbwrljfl/1/0AdabhaHkQUZsTn9O/dpEKG2 Lo4Q== X-Gm-Message-State: AJcUukfLL8/YvWI4HNILMhrblXW3kyFYf8uZQRofP5Ri33VyBOPjFg/6 fNl6tORdPT4Fq9JEq/50/yM= X-Google-Smtp-Source: ALg8bN5lddHwkN4xjqbgE60pIIInwgNR4/oYJZlr0iU/tR6M3nDX9tKML8LeBJ2LRHxPSqto/FnGLw== X-Received: by 2002:aed:2d66:: with SMTP id h93mr10315213qtd.130.1547140750695; Thu, 10 Jan 2019 09:19:10 -0800 (PST) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id x5sm42481591qtc.43.2019.01.10.09.19.07 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Jan 2019 09:19:10 -0800 (PST) Date: Thu, 10 Jan 2019 15:19:04 -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 6/7] drm: Remove use of drm_mode_object Message-ID: <7ca1476341d7261cbb7b67a6c0097323614967d9.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 removes the drm_mode_object prints, evaluation and use from drm_display_mode objects used in drm files. It removes dependency from drm_mode_object. Signed-off-by: Shayenne Moura Reviewed-by: Daniel Vetter --- Changes in v2 and v3: - No change drivers/gpu/drm/drm_crtc_helper.c | 5 ++--- drivers/gpu/drm/drm_modes.c | 9 --------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index a3c81850e755..cc5cc8d109a2 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c @@ -386,9 +386,8 @@ bool drm_crtc_helper_set_mode(struct drm_crtc *crtc, if (!encoder_funcs) continue; - DRM_DEBUG_KMS("[ENCODER:%d:%s] set [MODE:%d:%s]\n", - encoder->base.id, encoder->name, - mode->base.id, mode->name); + DRM_DEBUG_KMS("[ENCODER:%d:%s] set [MODE:%s]\n", + encoder->base.id, encoder->name, mode->name); if (encoder_funcs->mode_set) encoder_funcs->mode_set(encoder, mode, adjusted_mode); diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c index 24a750436559..adce9a26bac9 100644 --- a/drivers/gpu/drm/drm_modes.c +++ b/drivers/gpu/drm/drm_modes.c @@ -71,11 +71,6 @@ struct drm_display_mode *drm_mode_create(struct drm_device *dev) if (!nmode) return NULL; - if (drm_mode_object_add(dev, &nmode->base, DRM_MODE_OBJECT_MODE)) { - kfree(nmode); - return NULL; - } - return nmode; } EXPORT_SYMBOL(drm_mode_create); @@ -92,8 +87,6 @@ void drm_mode_destroy(struct drm_device *dev, struct drm_display_mode *mode) if (!mode) return; - drm_mode_object_unregister(dev, &mode->base); - kfree(mode); } EXPORT_SYMBOL(drm_mode_destroy); @@ -911,11 +904,9 @@ EXPORT_SYMBOL(drm_mode_set_crtcinfo); */ void drm_mode_copy(struct drm_display_mode *dst, const struct drm_display_mode *src) { - int id = dst->base.id; struct list_head head = dst->head; *dst = *src; - dst->base.id = id; dst->head = head; } EXPORT_SYMBOL(drm_mode_copy); From patchwork Thu Jan 10 17:19:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shayenne Moura X-Patchwork-Id: 10756315 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 C82AD91E for ; Thu, 10 Jan 2019 17:19:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ABAC629BE3 for ; Thu, 10 Jan 2019 17:19:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9DBE729DD1; Thu, 10 Jan 2019 17:19:38 +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 5247D29BE3 for ; Thu, 10 Jan 2019 17:19:38 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4EDA56F3E3; Thu, 10 Jan 2019 17:19:37 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qt1-x841.google.com (mail-qt1-x841.google.com [IPv6:2607:f8b0:4864:20::841]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3F8F46F3E3 for ; Thu, 10 Jan 2019 17:19:36 +0000 (UTC) Received: by mail-qt1-x841.google.com with SMTP id t33so14086437qtt.4 for ; Thu, 10 Jan 2019 09:19:36 -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=8s2eySBVl2wi5qhv2DmPYesK0RX4jSHzUHp4+w+zpXI=; b=HsbVzVM7KadwZXIrIobWLlk0l0UhUkVifLbkaf7dczHhqscVruB1ZOWSJPHkOariSl iQIZRG9RY4DbTLUZNeOZdyYncRF/K5vYaMg+6RIEJ35rE838WhAEwfVtiiCJV9t2wjVt Q+/V7YcRYf+vdXy94TngvNkyODdsGh24xl7/4pdw9ENZDCyXT6ylQw71OioLENOpwU8K S9szrvxrft2vqWwQxNYMMNwQ+e9Db3q/Zya6cqMQArtiOTzbskDdF0eG9ag+BkWEv5wG yKFALUdqu2zqytbmvmZhdzp3NwUaZU8MSlD1pRhl+3ywAP6y9g/lzRG2eJB1814Ggg8u LEQA== X-Gm-Message-State: AJcUukcCKqPVoHmr8vqZ6Y9jH+zAHhX2tyI3b786zph2HOjvRh9t6LKC WozJF5S1eRUaYs17HtR74Yw= X-Google-Smtp-Source: ALg8bN7TqNRIu5dJ/ANGQe1JKiQ6rHyV0wB4JXHNRLXvpZ59VrPBDA41QMDlp3h9LN/F83qnSxA6tQ== X-Received: by 2002:ac8:2a55:: with SMTP id l21mr10154899qtl.95.1547140775364; Thu, 10 Jan 2019 09:19:35 -0800 (PST) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id d85sm7002053qkb.89.2019.01.10.09.19.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Jan 2019 09:19:34 -0800 (PST) Date: Thu, 10 Jan 2019 15:19:29 -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 7/7] drm: Complete remove drm_mode_object dependency Message-ID: 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 finalizes the KMS cleanup task dependency from drm_display_mode. It removes the use of drm_mode_object from drm_display_mode struct and it removes the use of base.id and base.type from drm_display_mode struct print string. Signed-off-by: Shayenne Moura Reviewed-by: Daniel Vetter --- Changes in v2: - Make the commit message more clear Changes in v3: - No changes include/drm/drm_modes.h | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/include/drm/drm_modes.h b/include/drm/drm_modes.h index baded6514456..be4fed97e727 100644 --- a/include/drm/drm_modes.h +++ b/include/drm/drm_modes.h @@ -136,8 +136,7 @@ enum drm_mode_status { .hdisplay = (hd), .hsync_start = (hss), .hsync_end = (hse), \ .htotal = (ht), .hskew = (hsk), .vdisplay = (vd), \ .vsync_start = (vss), .vsync_end = (vse), .vtotal = (vt), \ - .vscan = (vs), .flags = (f), \ - .base.type = DRM_MODE_OBJECT_MODE + .vscan = (vs), .flags = (f) #define CRTC_INTERLACE_HALVE_V (1 << 0) /* halve V values for interlacing */ #define CRTC_STEREO_DOUBLE (1 << 1) /* adjust timings for stereo modes */ @@ -213,20 +212,6 @@ struct drm_display_mode { */ struct list_head head; - /** - * @base: - * - * A display mode is a normal modeset object, possibly including public - * userspace id. - * - * FIXME: - * - * This can probably be removed since the entire concept of userspace - * managing modes explicitly has never landed in upstream kernel mode - * setting support. - */ - struct drm_mode_object base; - /** * @name: * @@ -429,14 +414,14 @@ struct drm_display_mode { /** * DRM_MODE_FMT - printf string for &struct drm_display_mode */ -#define DRM_MODE_FMT "%d:\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x" +#define DRM_MODE_FMT "\"%s\": %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x" /** * DRM_MODE_ARG - printf arguments for &struct drm_display_mode * @m: display mode */ #define DRM_MODE_ARG(m) \ - (m)->base.id, (m)->name, (m)->vrefresh, (m)->clock, \ + (m)->name, (m)->vrefresh, (m)->clock, \ (m)->hdisplay, (m)->hsync_start, (m)->hsync_end, (m)->htotal, \ (m)->vdisplay, (m)->vsync_start, (m)->vsync_end, (m)->vtotal, \ (m)->type, (m)->flags