From patchwork Mon Feb 12 09:44:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 127966 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp3040676ljc; Mon, 12 Feb 2018 01:46:27 -0800 (PST) X-Google-Smtp-Source: AH8x226Q2k4WkD0ive79baWsGZRWw/vxBR/OPNmxnBag9OhcvzUGqzddD9slG4yIzPnxeShLLjHD X-Received: by 10.101.65.9 with SMTP id w9mr8932900pgp.214.1518428786944; Mon, 12 Feb 2018 01:46:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518428786; cv=none; d=google.com; s=arc-20160816; b=fin/4X6z5xCkh5nFvPLyvpswqdK/zKMsADIN4BzhN8SrDHjHmMDyv6tPx7sloOuwRR +4raF2v6+9Ewt0YAEFHJHMO1qDKSm6Gl6dFcAnwKx7eYUMGSA9v/Jtv8AW7/LWxEKDRw ZYab1vkSZD/ItWtaxERHLgX0eCydhPMakSyI4gaD70OyZlkjthlt7bizOBa8gwLj0E6b UkCnRh5BAFLruH82/zsahMNQJABPZPpr/Rll6PQVBrN502PA5aBpmsSduQrlhOz8JPtW biJvY53Lii02vR4nAnioRrlKldsU2fbC+CVqzMvdyVS6hVM4JTvhP4vjjZchnMSctuNa xCvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:delivered-to :arc-authentication-results; bh=EGxz7LOcf4bNnOr38eLREaA42tGKtx5A9UQnQoxZGHM=; b=OdT23xEr/ejJWOm5jMZkdr9hC6eV1y5BlaAKiLeVr4RsXA5DaenNFM8G3J3Zeno4vP aU13xYHNP8D3ZexaEQFT2YT5rHB5YAk0fuP0C9920UXORmyjbQR6rrdih6oHQJTnR6OA 8Yj+SEIALkfqDNcUiH7yeGlyD/2wUlY/iIhCU+6x8wZPZXNCWuWoaQIhxo9HeLH2J+8o Fi8N5ZCTkr9pVe8iUoKsPJ36Ksn04CkBRZqKn/+Zl5ILZBmDe2TGGKq50VM83P3EGjCv Ko6zL4g7i1TAj9jGbB+makzCNQp9UkDFI2mIiI5lvLZL29JajaAududa0HGKBvk2mkSv Us1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=iwAI+Y44; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id 30-v6si5671099plc.548.2018.02.12.01.46.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 12 Feb 2018 01:46:26 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=iwAI+Y44; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E52136E1A6; Mon, 12 Feb 2018 09:45:25 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from lelnx193.ext.ti.com (lelnx193.ext.ti.com [198.47.27.77]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8A0436E1A6 for ; Mon, 12 Feb 2018 09:45:24 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id w1C9jLkG016026; Mon, 12 Feb 2018 03:45:21 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1518428722; bh=wawGVfmdP4jIPZJhy0eD9xNunOlCLNCPeKUOpvA77X4=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=iwAI+Y44tPHIrBSZFWu7JGyMg2/3z58xG2HuH/EhKizwJVS6dFWrgB0G5DuP06o2j MHzDg57nKio7di7kTl0YgmUhcU+6RXF3bBV2QPCJHu0jcLsoQpi2NWhudDnHji4sNu uwp4aZn4WWGTI+KPN5CgMyNa+2v4h/2ebyyC6Rkc= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w1C9jLvM018856; Mon, 12 Feb 2018 03:45:21 -0600 Received: from DFLE113.ent.ti.com (10.64.6.34) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Mon, 12 Feb 2018 03:45:20 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Mon, 12 Feb 2018 03:45:21 -0600 Received: from deskari.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w1C9j0N7003439; Mon, 12 Feb 2018 03:45:19 -0600 From: Tomi Valkeinen To: , Laurent Pinchart , Peter Ujfalusi , Jyri Sarha , Benoit Parrot Subject: [PATCH 10/24] drm/omap: dss: Remove display ordering from dss/display.c Date: Mon, 12 Feb 2018 11:44:40 +0200 Message-ID: <1518428694-18018-11-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518428694-18018-1-git-send-email-tomi.valkeinen@ti.com> References: <1518428694-18018-1-git-send-email-tomi.valkeinen@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 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: Tomi Valkeinen Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Peter Ujfalusi The previous patch implements the ordering of the dss_devices based on DT aliases in omap_drm.c, so there is no need to do the ordering in dss/display.c anymore. At the same time remove the alias member of the omap_dss_device struct since it is no longer needed. The only place it was used is in the omapdss_register_display() function. Signed-off-by: Peter Ujfalusi Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/dss/display.c | 15 +++------------ drivers/gpu/drm/omapdrm/dss/omapdss.h | 2 -- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/display.c b/drivers/gpu/drm/omapdrm/dss/display.c index 3ef99f344bd3..7840837f4325 100644 --- a/drivers/gpu/drm/omapdrm/dss/display.c +++ b/drivers/gpu/drm/omapdrm/dss/display.c @@ -41,7 +41,6 @@ static int disp_num_counter; int omapdss_register_display(struct omap_dss_device *dssdev) { struct omap_dss_driver *drv = dssdev->driver; - struct list_head *cur; int id; /* @@ -54,26 +53,18 @@ int omapdss_register_display(struct omap_dss_device *dssdev) dssdev->alias_id = id; - snprintf(dssdev->alias, sizeof(dssdev->alias), "display%d", id); - /* Use 'label' property for name, if it exists */ of_property_read_string(dssdev->dev->of_node, "label", &dssdev->name); if (dssdev->name == NULL) - dssdev->name = dssdev->alias; + dssdev->name = devm_kasprintf(dssdev->dev, GFP_KERNEL, + "display%d", id); if (drv && drv->get_timings == NULL) drv->get_timings = omapdss_default_get_timings; mutex_lock(&panel_list_mutex); - list_for_each(cur, &panel_list) { - struct omap_dss_device *ldev = list_entry(cur, - struct omap_dss_device, - panel_list); - if (strcmp(ldev->alias, dssdev->alias) > 0) - break; - } - list_add_tail(&dssdev->panel_list, cur); + list_add_tail(&dssdev->panel_list, &panel_list); mutex_unlock(&panel_list_mutex); return 0; } diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h index bd5f174a3c56..ac8ca37ff889 100644 --- a/drivers/gpu/drm/omapdrm/dss/omapdss.h +++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h @@ -476,8 +476,6 @@ struct omap_dss_device { struct list_head panel_list; - /* alias in the form of "display%d" */ - char alias[16]; int alias_id; enum omap_display_type type;