From patchwork Thu Dec 20 12:28:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shayenne Moura X-Patchwork-Id: 10738821 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 2B3C813A4 for ; Thu, 20 Dec 2018 12:28:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 18EBE28372 for ; Thu, 20 Dec 2018 12:28:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0B40D2838B; Thu, 20 Dec 2018 12:28:42 +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 3589E28372 for ; Thu, 20 Dec 2018 12:28:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 519C889FA7; Thu, 20 Dec 2018 12:28:40 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qk1-x742.google.com (mail-qk1-x742.google.com [IPv6:2607:f8b0:4864:20::742]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3DD5989FA7 for ; Thu, 20 Dec 2018 12:28:39 +0000 (UTC) Received: by mail-qk1-x742.google.com with SMTP id y16so832357qki.7 for ; Thu, 20 Dec 2018 04:28:39 -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=62KEInXrjRaB/3jWw4KmGBRgyYPeGURKb6+SwrUGB8Y=; b=ACUAP9PHMAXwJp35nzCnDxo3qcmC5fIomZMxEP0V/1e0Zi/LPYTuvMMcer4aT/OJ2v +qh7GGoeZOOWGF4t7fhu2jkgzXtnpKCBtOy6/pswGxgW20dPVn8Z7feRgbFbffr4uCfk PPee68mOJoQ1nV3/uHQVjONORGas7eRluuiUwmb/0S6gy1Qe5YJn2KoiWftAsf3B39Qb LXaezl4YmlQQz0ExhAahaReCK4jY5eRQqBfQoHrHhk86VjZLBZKMYeHh2mg+kBr+KGn9 hr/c6dydYuHwRjaBlBfA9CIlypHZ2cmhfHKbCKqyKyo7n7IBpgSD6vI+vgK1LuI6Ln5n 8Lqg== X-Gm-Message-State: AA+aEWbZjY6M1ghRuQGEbbzc9jAto8MjP8W+fyRSZ/mly9rxSh4bJbZM quXBd2oLhuDRbx2XE/npp/E= X-Google-Smtp-Source: AFSGD/UkUXy8HJMNDJENY1efDyUeJwZ4sF91Mo0E5muuECexN+wfxneve2+0K9kjOl474PizEHN13w== X-Received: by 2002:a37:9604:: with SMTP id y4mr24987338qkd.279.1545308918366; Thu, 20 Dec 2018 04:28:38 -0800 (PST) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id c49sm3980226qtc.94.2018.12.20.04.28.34 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 Dec 2018 04:28:37 -0800 (PST) Date: Thu, 20 Dec 2018 10:28:32 -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 v2 6/7] drm: Remove use of drm_mode_object 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 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: - 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);