From patchwork Tue Mar 26 13:19:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 10871045 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 75F28186E for ; Tue, 26 Mar 2019 13:20:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 580EE28FBE for ; Tue, 26 Mar 2019 13:20:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4C73728F89; Tue, 26 Mar 2019 13:20:36 +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,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=unavailable 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 EE9B12901F for ; Tue, 26 Mar 2019 13:20:32 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 220D06E055; Tue, 26 Mar 2019 13:20:24 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) by gabe.freedesktop.org (Postfix) with ESMTPS id 44EBA6E048 for ; Tue, 26 Mar 2019 13:20:19 +0000 (UTC) Received: by mail-ed1-x543.google.com with SMTP id q14so10720983edr.5 for ; Tue, 26 Mar 2019 06:20:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=81wpVqWucfpK7AWAt6oV4PRNPx7nXh4v+PeCVgIINMA=; b=B54VboHHuR3abZW2fh5jx3ZsWxqgDwTxChnL0LGnXKDL74CD3MjVcjMHobaxYQ8JBt P5+/TeXsK7Ct8FI3eTBWxzSso8+NDCPg8ymCw37MkBnM1x9cVySvFu8VfGp+3Riccok0 psK8f25V1NMw2lOZ4CjwVWSFCsic4AsjPEqJVbBPGQSd/kVgv1h/16Vpnl6t8gFCEMmf HXEsPiVWMySiPWj9GvGt1yJdLWvHJ6+yq+xCqz3zz07VLe1odDsct+PaXTkRR6yM3ijP YcPM6nCzwg3QdITU/keauhGdMKrVzd0Qb4vadjcoqzEjXycVJUhQmkcuzruI33GBMEnH H3IA== X-Gm-Message-State: APjAAAUtzMHDMj086+mpHWvv8Z+chTgw09ufA4tye1OTvWrigLFkanTS mnjehjQELtz6xxurAnBJzV0xfgF7sSI= X-Google-Smtp-Source: APXvYqzVhapsVUUZEQOIeMKg770qrkWrR6fWOOc2P8lEav/B48GsdXLP/T3/XZ/oMYS+9Ir/f6yq8w== X-Received: by 2002:a17:906:f0f:: with SMTP id z15mr17825526eji.125.1553606415740; Tue, 26 Mar 2019 06:20:15 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:569e:0:3106:d637:d723:e855]) by smtp.gmail.com with ESMTPSA id d10sm3668547ejh.66.2019.03.26.06.20.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Mar 2019 06:20:14 -0700 (PDT) From: Daniel Vetter To: DRI Development Subject: [PATCH 02/21] drm/fb-helper: set fbi->fix.id in fill_info() Date: Tue, 26 Mar 2019 14:19:49 +0100 Message-Id: <20190326132008.11781-2-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190326132008.11781-1-daniel.vetter@ffwll.ch> References: <20190326132008.11781-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=81wpVqWucfpK7AWAt6oV4PRNPx7nXh4v+PeCVgIINMA=; b=RRHF8+htafrQmyKi68NbpZ4ZY9ganGpqQoICVKXnqP3JHCYsNwXTFRIigDhWp0boER WbpQ5QFZgIjOoMKDkvEOn5WKVWa1BOvwYAhvDU+Z1AysCt6R3cYm112fsdVu5k6l55ZX fmgeWzE4BevbIm9mzJ+w4CgRzCYdZQK2sxiR8= 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: Daniel Vetter , Intel Graphics Development , Daniel Vetter Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Looking at the oldest/most popular drivers ${driver}drmfb seems to be the standard, except i915.ko went with "inteldrmfb". I guess renaming that for consistency won't hurt, it definitely confused me when I started with kms 10 years ago. I hope this never became uapi ... worst case drivers can overwrite it after having called fill_info(). Since subsequent patches change this for some drivers later on in the series, here's the exhaustive list of where all fix.id is used: - /proc/fb which prints the minor number and fix.id name. - per-fb sysfs name file - getfix ioctl, which is used by fbset only to print out the name when dumping information - lots and lots of places in dmesg, anytime anything happens with an fbdev really I think minimal to 0 chances that changing this will screw up a config script or something, since outside of informational message it's not used by anything to identify which fbdev maps to which minor. After all the last fbset release is from 1999, and that predates even devfs I think. v2: Rebase and amend commit message, thanks to Ilia for pointing out that this needs to be spelled out. Cc: Ilia Mirkin igned-off-by: Daniel Vetter Reviewed-by: Noralf Trønnes --- drivers/gpu/drm/drm_fb_helper.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index b89d177228e2..e3538c851c58 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -2129,6 +2129,9 @@ void drm_fb_helper_fill_info(struct fb_info *info, drm_fb_helper_fill_var(info, fb_helper, sizes->fb_width, sizes->fb_height); + snprintf(info->fix.id, sizeof(info->fix.id), "%sdrmfb", + fb_helper->dev->driver->name); + } EXPORT_SYMBOL(drm_fb_helper_fill_info); @@ -3190,8 +3193,6 @@ int drm_fb_helper_generic_probe(struct drm_fb_helper *fb_helper, fbi->fix.smem_start = page_to_phys(virt_to_page(fbi->screen_buffer)); #endif - strcpy(fbi->fix.id, "DRM emulated"); - drm_fb_helper_fill_info(fbi, fb_helper, sizes); if (fb->funcs->dirty) {