Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3639610ybc; Thu, 21 Nov 2019 11:19:08 -0800 (PST) X-Google-Smtp-Source: APXvYqyq0pQBwC9ck7hRoy6GYY9CLbNPM0hcPfhMcFFFZ//AjXRh6BVAFD4jiPMHch1pxpEtoVeV X-Received: by 2002:a17:906:a38d:: with SMTP id k13mr15646531ejz.213.1574363948173; Thu, 21 Nov 2019 11:19:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574363948; cv=none; d=google.com; s=arc-20160816; b=N9kFb0fdB1QSY8gST6hL0NObidQywM/ckgVDjhxY+toLQeDpb809bX852woIlKJVs+ Beh1Q05PsvQfY5Ihcf/AujS1AspjI8Ilow2fv2aJun01zPqEplgeW8hvge4NNREtPqvA j66Q/9f1KayAKwXViYpNl8ngBFHiw3RCLJ9sJofsFnigIma33buj3GyXzhBda5L7GzNQ LJ5MKCT4IKEDj2Ex+z8hJ/YHDCqHkNgY6LWhSRVU6k3ekUfcOdF4jg86nxW6IZsyFRPP 9N4d+0/17tC55axQ/qxaZ8ZxdBBFIGsXwwrqg8zMoizU4SUr9tQMtUiibFSp4gWu+ZWI 51mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ziahN+ttEd97d/5G5z+3cx0j+N8D4TfwxF73+tgCoU0=; b=G1djVB3bML9EH8dQnWtPhTkA2Fv3EClcl3mgzrRWDiTETNB4iWdD8pbC74hFuObkJ2 atCDDl0daLThaCtxrJSrTA2R6kq86Qx6oMb4DAAc8cfjkaDXMcDWtHFClBh3g5ZyPkhR XelV2oRO2MNrFpUykLz0E7oaTRXXnKWLZMerZDcTGERo+F7GKSfwNTkU1P0mGfZJfIoG x9SwRaDDfMgrrn7Zktsc9mBr7ykUkqoDKCPC8NJyBhOs2I1+CYE54K/1/G3UHYFTM2og Oc+DaIuPXF/8SXerS5LDg+o9fF4dY6Yw3mEv7RFUbfzHVgW7uA+EK8uGS7+ykDA39CG2 QQKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="uLLUc/Sv"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gr10si2460104ejb.414.2019.11.21.11.18.36; Thu, 21 Nov 2019 11:19:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="uLLUc/Sv"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726967AbfKUTQn (ORCPT + 99 others); Thu, 21 Nov 2019 14:16:43 -0500 Received: from mail-lj1-f196.google.com ([209.85.208.196]:33015 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726333AbfKUTQn (ORCPT ); Thu, 21 Nov 2019 14:16:43 -0500 Received: by mail-lj1-f196.google.com with SMTP id t5so4550167ljk.0 for ; Thu, 21 Nov 2019 11:16:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ziahN+ttEd97d/5G5z+3cx0j+N8D4TfwxF73+tgCoU0=; b=uLLUc/SvsjhbA0LZqgK5b/dX/fOzl5h51BgJE1HTB/13AunSW9a5zLHQ/cNfyDZg56 Vy6dFsZCpM1+HZQd3aPHTfbIr0chJ1LCkFG6kUKta8v3pAwCLGQZ3jrMD1kCIrAT9yVB 3yyZ2qX3hT2g7ECsWZJFGv9YGZi9Dn9ljrCS30bSJkalHUAzFy3G8jxFfM3zELT2Fwuc MNeJ4NBFMN3RkVGRqUHUpuYD9C+fiS5948R9TgHB62mJ80oDjuQK5c0fDJoCUhXEA73j 1liNW4YTFW64VGm/iRRpn5TdmpEm7G1IedCMkceBsIyDlDGsG5vyEC4IzwOBce9YCoID KJfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ziahN+ttEd97d/5G5z+3cx0j+N8D4TfwxF73+tgCoU0=; b=OCZ6HGFNU1hAlT4D9xnxg9++t7AtkQHt+lBX8IGzX3aOGDJijBJZQe/PYl9ow0b6CV V52f9VzR4mjCwIdRIyfeIDBqXqqZCZPfNSXlq1/OndVdEVBaXlBCxgmy1TGks5jYy3Ab dNKBMJP+TcO68H8+T0uBT3jAvWvPtDTS84wv+VLZSb6KgRFUNPcGTByuWdRXKDbSjyFo ZUoz+8tMEt2GBn50ksqfgphFShfYGb7PVTm0n7I9eQqdtnGkoKX6K6IRmcLAqdGKRH5x b6H5pgPXZPgDIbDvX2JANunqibsB/kusTW5gYm5Y7BiFY+uPGhPflky91kRaAYlJem9L cswQ== X-Gm-Message-State: APjAAAXKA2IE84ot0qbjqwOR8vcDNIGvaZFJZQ4pQt7FeNhSsvgqkdoF ZP9NoqQnK3pfNkX/vK0V3qD0SjmL9l5Zh6EQB6cqFw== X-Received: by 2002:a2e:8e28:: with SMTP id r8mr8884490ljk.21.1574363801085; Thu, 21 Nov 2019 11:16:41 -0800 (PST) MIME-Version: 1.0 References: <20191121071205.27511-1-james.qian.wang@arm.com> <20191121071205.27511-7-james.qian.wang@arm.com> <20191121094926.GC6236@phenom.ffwll.local> <20191121102101.GA32514@jamwan02-TSP300> In-Reply-To: <20191121102101.GA32514@jamwan02-TSP300> From: Dave Airlie Date: Fri, 22 Nov 2019 05:16:29 +1000 Message-ID: Subject: Re: [PATCH v4 6/6] drm/komeda: Expose side_by_side by sysfs/config_id To: "james qian wang (Arm Technology China)" Cc: Liviu Dudau , "airlied@linux.ie" , Brian Starkey , "maarten.lankhorst@linux.intel.com" , Mihail Atanassov , nd , "Oscar Zhang (Arm Technology China)" , "Tiannan Zhu (Arm Technology China)" , "Jonathan Chai (Arm Technology China)" , "linux-kernel@vger.kernel.org" , "dri-devel@lists.freedesktop.org" , "Julien Yin (Arm Technology China)" , "Channing Chen (Arm Technology China)" , "Thomas Sun (Arm Technology China)" , "Lowry Li (Arm Technology China)" , Ben Davis Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 21 Nov 2019 at 20:21, james qian wang (Arm Technology China) wrote: > > On Thu, Nov 21, 2019 at 10:49:26AM +0100, Daniel Vetter wrote: > > On Thu, Nov 21, 2019 at 07:12:55AM +0000, james qian wang (Arm Technology China) wrote: > > > There are some restrictions if HW works on side_by_side, expose it via > > > config_id to user. > > > > > > Signed-off-by: James Qian Wang (Arm Technology China) > > > --- > > > drivers/gpu/drm/arm/display/include/malidp_product.h | 3 ++- > > > drivers/gpu/drm/arm/display/komeda/komeda_dev.c | 1 + > > > 2 files changed, 3 insertions(+), 1 deletion(-) > > > > > > diff --git a/drivers/gpu/drm/arm/display/include/malidp_product.h b/drivers/gpu/drm/arm/display/include/malidp_product.h > > > index 1053b11352eb..96e2e4016250 100644 > > > --- a/drivers/gpu/drm/arm/display/include/malidp_product.h > > > +++ b/drivers/gpu/drm/arm/display/include/malidp_product.h > > > @@ -27,7 +27,8 @@ union komeda_config_id { > > > n_scalers:2, /* number of scalers per pipeline */ > > > n_layers:3, /* number of layers per pipeline */ > > > n_richs:3, /* number of rich layers per pipeline */ > > > - reserved_bits:6; > > > + side_by_side:1, /* if HW works on side_by_side mode */ > > > + reserved_bits:5; > > > }; > > > __u32 value; > > > }; > > > diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c b/drivers/gpu/drm/arm/display/komeda/komeda_dev.c > > > index c3fa4835cb8d..4dd4699d4e3d 100644 > > > --- a/drivers/gpu/drm/arm/display/komeda/komeda_dev.c > > > +++ b/drivers/gpu/drm/arm/display/komeda/komeda_dev.c > > > @@ -83,6 +83,7 @@ config_id_show(struct device *dev, struct device_attribute *attr, char *buf) > > > > Uh, this sysfs file here looks a lot like uapi for some compositor to > > decide what to do. Do you have the userspace for this? > > Yes, our HWC driver uses this config_id and product_id for identifying the > HW caps. > This seems like it should be done more in the kernel, why does userspace needs all that info, to make more informed decisions? How would drm_hwcomposer get the same result? I'd prefer we just remove the sysfs nodes from upstream unless we have an upstream user for them. Dave.