From patchwork Wed Feb 25 08:49:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 5878771 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id F1E999F691 for ; Wed, 25 Feb 2015 08:50:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DA81420304 for ; Wed, 25 Feb 2015 08:50:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9F2BC20375 for ; Wed, 25 Feb 2015 08:50:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752755AbbBYIuK (ORCPT ); Wed, 25 Feb 2015 03:50:10 -0500 Received: from arroyo.ext.ti.com ([192.94.94.40]:58822 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751760AbbBYIuJ (ORCPT ); Wed, 25 Feb 2015 03:50:09 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id t1P8o2wo017073; Wed, 25 Feb 2015 02:50:02 -0600 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id t1P8o0Ko028992; Wed, 25 Feb 2015 02:50:00 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.224.2; Wed, 25 Feb 2015 02:50:00 -0600 Received: from [192.168.2.6] (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id t1P8nwoF028013; Wed, 25 Feb 2015 02:49:59 -0600 Message-ID: <54ED8CB6.4010308@ti.com> Date: Wed, 25 Feb 2015 10:49:58 +0200 From: Tomi Valkeinen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: NeilBrown , "Dr. H. Nikolaus Schaller" CC: , , , GTA04 owners Subject: Re: [PATCH] OMAPDSS: restore "name" sysfs entry. References: <20150224203706.1eafa129@notabene.brown> <54EC5520.1020105@ti.com> <20150225073131.7fbff605@notabene.brown> In-Reply-To: <20150225073131.7fbff605@notabene.brown> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, On 24/02/15 22:31, NeilBrown wrote: > On Tue, 24 Feb 2015 12:40:32 +0200 Tomi Valkeinen > wrote: > >> Hi, >> >> On 24/02/15 11:37, NeilBrown wrote: >>> >>> >>> commit 303e4697e762dc92a40405f4e4b8aac02cd0d70b >>> OMAPDSS: rename display-sysfs 'name' entry >>> >>> broke the xorg X server on my device as it couldn't find the display >>> any more. It needs the 'name' file and now there isn't one. >>> >>> That commit claims that 'name' is not compatible with i2c or spi. >>> i2c does register it own 'name' file, but spi does not, hence my >>> problem - I have an spi display. >>> >>> So create a special case for i2c: add the name attribute for non-i2c >>> devices. How about this patch instead. It separates the underlying device's sysfs directory from the "displayX" directory, and allows us to have name & display_name. So it should work for any device type. From 8e411fa684d42fca35628b41837c6d72e87aaff0 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Wed, 25 Feb 2015 10:23:58 +0200 Subject: [PATCH] OMAPDSS: fix regression with display sysfs files omapdss's sysfs directories for displays used to have 'name' file, giving the name for the display. This file was later renamed to 'display_name' to avoid conflicts with i2c sysfs 'name' file. Looks like at least xserver-xorg-video-omap3 requires the 'name' file to be present. To fix the regression, this patch creates new kobjects for each display, allowing us to create sysfs directories for the displays. This way we have the whole directory for omapdss, and there will be no sysfs file clashes with the underlying display device's sysfs files. We can thus add the 'name' sysfs file back. Signed-off-by: Tomi Valkeinen Tested-by: NeilBrown --- drivers/video/fbdev/omap2/dss/display-sysfs.c | 179 ++++++++++++++------------ include/video/omapdss.h | 1 + 2 files changed, 96 insertions(+), 84 deletions(-) diff --git a/drivers/video/fbdev/omap2/dss/display-sysfs.c b/drivers/video/fbdev/omap2/dss/display-sysfs.c index 5a2095a98ed8..12186557a9d4 100644 --- a/drivers/video/fbdev/omap2/dss/display-sysfs.c +++ b/drivers/video/fbdev/omap2/dss/display-sysfs.c @@ -28,44 +28,22 @@ #include