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: 10871033 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 E46FA18A6 for ; Tue, 26 Mar 2019 13:20:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF4C828FC5 for ; Tue, 26 Mar 2019 13:20:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B224C28FB5; Tue, 26 Mar 2019 13:20:34 +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=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 9667C28FB6 for ; Tue, 26 Mar 2019 13:20:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6C6EF6E04D; Tue, 26 Mar 2019 13:20:21 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-ed1-x544.google.com (mail-ed1-x544.google.com [IPv6:2a00:1450:4864:20::544]) by gabe.freedesktop.org (Postfix) with ESMTPS id 758E76E046 for ; Tue, 26 Mar 2019 13:20:19 +0000 (UTC) Received: by mail-ed1-x544.google.com with SMTP id d1so10702930edd.13 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=ZSaCWsge7per800aysF0cjO4nhNOYlbfaups1HpQ2Yw/CymQPFgIlWqp7VlIlGTbW2 1IGDJY3TOGW/W3MNmB+ADmpNMc/9idSrJJqpOT0koyHBRxmmkLK38yx5FHz1g3a915qq yd32DZLkEjbTxI+Z1JsN5AX5i/z+DsbLXx0LXSfnEg7RnhzyZEvoptnjfkH74HqcupxD Hd4C+hEc6GLTWmbCV85QQlqR8O/4d9mF6AtZY6WZ61aCEJV0+Ohr8mygZ+KK53w8PPPv L1EkAPCSgD0RPev0FF+xwBz7U9XU938cc3ZyNmJd62graKoNsi1tM3Q5m6YnHy3JFMQ8 ZMaw== X-Gm-Message-State: APjAAAXpSNhlr5wbNkBF0cOCLyuCrFfFxl0qGwmDLvs/sbknKsz77DCp 4A5OPDjfaB7upseY4AOOSWgdvA== 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 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= Subject: [Intel-gfx] [PATCH 02/21] drm/fb-helper: set fbi->fix.id in fill_info() X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Vetter , Intel Graphics Development , Ilia Mirkin , Daniel Vetter Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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) {