From patchwork Thu Jan 10 18:13:28 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shayenne Moura X-Patchwork-Id: 10756619 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 24EC86C2 for ; Thu, 10 Jan 2019 18:13:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1310829E4B for ; Thu, 10 Jan 2019 18:13:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 066A829E52; Thu, 10 Jan 2019 18:13: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 9C41429E4B for ; Thu, 10 Jan 2019 18:13:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9DDD06F3FE; Thu, 10 Jan 2019 18:13:36 +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 0FEC26F3FE for ; Thu, 10 Jan 2019 18:13:36 +0000 (UTC) Received: by mail-qt1-x844.google.com with SMTP id k12so14419309qtf.7 for ; Thu, 10 Jan 2019 10:13: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=Vqxs4CCkse9DFkKtG9oudQesUgVanHsLqrC+W7b4ldw=; b=VVob6mnZVRz04Ln6B52C9WSwVXobCV7JhoSH74iktOf8IzklcRoJgUugSHj3mDuWl1 D36qiftCVcWETzondtdctQ2Ta//tIPzu5D3Oc39NJKdHkmKhDEvKTAAJj0uBT1FTBtBF 3ZkjH/VVZGueAZJl7Uhq1Z2a69J9O3oC3+lLUiXe0heNi64qcZ7YYJ1o7T7/G4LYEDiJ Sa5i9RefyOgHTqDZO9TCObIRbXj51yCtzYLp9GnDtstHkNNQfWwxo+w02aIrEjDh7FQj /hkQ5CR89hnK6YrQwB3n+jebA1ovlYt/G/ZHcAY99DOQE3icd6PkJDlTydaH/IIGDaSs sLVw== X-Gm-Message-State: AJcUukcqfcHXXRbugDZk0fiLiZ8Qrw48HDWyiaLwH7GRCWLisHAqmQJp DPaNwKS5VJz6wrxJ0zDhd5s= X-Google-Smtp-Source: ALg8bN6B4wfNe6znZp1NdU0f76WWa0q4/quBnrqJl68LGfuAw6lnOXiuX9eny5Bv4uQqO7B9ffuHWg== X-Received: by 2002:a0c:96b5:: with SMTP id a50mr10813225qvd.33.1547144015198; Thu, 10 Jan 2019 10:13:35 -0800 (PST) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id x199sm26363990qkb.39.2019.01.10.10.13.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 10 Jan 2019 10:13:34 -0800 (PST) Date: Thu, 10 Jan 2019 16:13:28 -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 v4 2/3] drm: Remove use of drm_mode_object Message-ID: <8736fd1374b94b31354521ef890d06d3c26db799.1547143069.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, v3, and v4: - No changes 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 3b5cf93233c1..fe7f7e9147b8 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c @@ -391,9 +391,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);