From patchwork Tue Dec 18 13:38:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shayenne Moura X-Patchwork-Id: 10735669 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 5FEFD924 for ; Tue, 18 Dec 2018 13:38:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4D2E92A0B5 for ; Tue, 18 Dec 2018 13:38:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4179F2A0BE; Tue, 18 Dec 2018 13:38: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 F37032A0B5 for ; Tue, 18 Dec 2018 13:38:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1103B6EBD0; Tue, 18 Dec 2018 13:38:18 +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 22D0A6EBD0 for ; Tue, 18 Dec 2018 13:38:16 +0000 (UTC) Received: by mail-qt1-x842.google.com with SMTP id n21so18137192qtl.6 for ; Tue, 18 Dec 2018 05:38:16 -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:mime-version :content-disposition:user-agent; bh=ORICpf2dl6GUo7+siLAXSGZnXxg4OAmXsWTVd3NYN74=; b=V8Xqcj1oCoEfDJIJHA71RuNOxtt7aqZ3K2s1wgCusIZ3BDnlnk5qCkqQRJQMdAWg1f 4ZK1hVyfldtAyspfksnJ5AU1MynJReVMWIDbLyw5CTOSOT8gg4/WlMw8DZcr9QD0Odc4 VuiF+HE/Zt/4EOq0G0LAz0ONK2x50TDTNu/otDaTO0nHAcfaFuaO3zVzu4sa0I1S/GHO 3OSV3o9a4xfXo9UzXjPDLURRN/y+NIqmFQNsG2HdIqZqpBc3aRNEriJJMriwGfp5vxrL W2BxRBA6jQAbv55/BZbuoNXAuHZEAqsgSoikXNMj0YqD/jaQW5b20Ugm6x3KalAst11a ThBA== X-Gm-Message-State: AA+aEWYf8a2KUaA4RzOnVA7THCxr8Yx6P/EbEkmNBUmLDJ8pT/snd9Xd ycY6AUxIYF/QH1/014+H7oQ= X-Google-Smtp-Source: AFSGD/Ur8OLq6a6vcHX/kkW0OJldUIvXaqG/2iI+PAaitjwlHVxqZKPwayDt0cNB40F92FolYknrgQ== X-Received: by 2002:aed:3482:: with SMTP id x2mr16787518qtd.72.1545140295231; Tue, 18 Dec 2018 05:38:15 -0800 (PST) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id j38sm10233963qtj.72.2018.12.18.05.38.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 18 Dec 2018 05:38:14 -0800 (PST) Date: Tue, 18 Dec 2018 11:38:10 -0200 From: Shayenne Moura To: Maarten Lankhorst , Maxime Ripard , Sean Paul , David Airlie Subject: [PATCH 2/7] drm: Remove use of drm_mode_object Message-ID: <20181218133810.aqhmqflvl5mqrfgo@smtp.gmail.com> MIME-Version: 1.0 Content-Disposition: inline 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 --- 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);