Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp4715974rwd; Tue, 23 May 2023 11:21:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ60Y/ABt3+nQyOHW66iFH5EuFOEnySOwUUBZjgvTVvi6xkby0r+M7joOko+Imu5Ka2NgZ65 X-Received: by 2002:a17:902:e54d:b0:1af:d66a:413f with SMTP id n13-20020a170902e54d00b001afd66a413fmr1580784plf.44.1684866098705; Tue, 23 May 2023 11:21:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684866098; cv=none; d=google.com; s=arc-20160816; b=WAF8F2/VoxA9pWEBwF2+WzUibGh7eyLK6eogkX+cgIZLk0dXyoEZjJzrW8K6UVB1aQ l720wptDweaLeXiJBzKwf54wIQBldcgjhPg3QOKxwSQSFNtFOrm/W/OO/4RwJHe6WPxS kjoOyP9mei7aHOTypSmcCPjbG09NehtD/Cqqfhft7FZB3u6GCZ7cK8sv10WJ2lurKsGC +W4wibUEbjhMdriH7GWVF/nPpoorq5j0ah+45Gfw8Gj1ljE9ZJMqy/3PSuWMHcVJtQSU zsUS0L4B0XPUSyPRmDRYS4wcX/1TA5Ydv/kVpgSBX6XtJ+WTzRfu5A6e0EmyzbDNJ91S hywg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=nYC9W7L3ygXuyLgT/yCrYFFvBjqvx1vUDiINxRxzUCE=; b=x0sKdC86peJgopvOA/lNXFykV2O0qTlFr44IuIbFcwiGWwF+dTlPav/tFeSeBhcXNz nL7Op7JF7SwwsM5RYfJ8Ki1Ap19L2+keAORTXP0M3HsU08/ouKSjClUCun6GSd/1kKJ5 /sC4U2oon8runnzI4+mOrMfULq5JXTeuTnQhLcn7YUQjwT0oYcnOmaJOKp0eSkWHDjMF uUWX9aAULinBrGpC+4kW0XjCXtP6Yjq4wmgUivfiNBDzCcwo7cltGL1x7zThmErwn1dC ZnnGx//iANQoyqG7YNRH7/I9tpUeSCsFI3EQtkHLl9jF6+2xMhiVfPNB/ofhgojd6Rmg j7mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=r8Qxvmva; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 6-20020a170902c14600b001afc602cd55si1999708plj.21.2023.05.23.11.21.26; Tue, 23 May 2023 11:21:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=r8Qxvmva; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237890AbjEWSCS (ORCPT + 99 others); Tue, 23 May 2023 14:02:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237368AbjEWSCQ (ORCPT ); Tue, 23 May 2023 14:02:16 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C659B97; Tue, 23 May 2023 11:02:15 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5BF9061AB0; Tue, 23 May 2023 18:02:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03F8DC433EF; Tue, 23 May 2023 18:02:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684864934; bh=qhsH/fvB8p49rkMVi7cfrbf3uTOQ6EWGZa9IXoxfqqY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=r8QxvmvasWRHb1+/aud0hTWkuqqlSv58IqB9166sUDBf8xPG11Q9UUWFv+oxL3wRg IITuZ2Rx+2sfHiekfq56Ic0x5dM+CNY8zVoXeigVGNHSqx7PhHhqyyh7DxYmYGXdBt O7siB6Z2yLPcdEfpFkh+WoQ/4Uff2QZi0MFUyVy11M6IKQlIBR3Z91kD599ehovYuf NTZj4shIGit3sAovWETCbwmiYmJcL592FZD0AuaL6Fed3t433zvF9jQHu2fdNhTiYu elC0pOxCb5Oean+VvGtFGjMns5fpmyug9ohght1n9rbfwp4rP8indYxmAVBE/nBDFW xCIA3QdHRZBRQ== Date: Tue, 23 May 2023 11:02:12 -0700 From: Nathan Chancellor To: Artur Weber Cc: thierry.reding@gmail.com, Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Nikita Travkin , Neil Armstrong Subject: Re: [PATCH v5 2/3] drm/panel: Add Samsung S6D7AA0 panel controller driver Message-ID: <20230523180212.GA1401867@dev-arch.thelio-3990X> References: <20230519170354.29610-1-aweber.kernel@gmail.com> <20230519170354.29610-3-aweber.kernel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230519170354.29610-3-aweber.kernel@gmail.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Artur, On Fri, May 19, 2023 at 07:03:53PM +0200, Artur Weber wrote: > Initial driver for S6D7AA0-controlled panels. Currently, the following > panels are supported: > > - S6D7AA0-LSL080AL02 (Samsung Galaxy Tab 3 8.0) > - S6D7AA0-LSL080AL03 (Samsung Galaxy Tab A 8.0 2015) > - S6D7AA0-LTL101AT01 (Samsung Galaxy Tab A 9.7 2015) > > It should be possible to extend this driver to work with other panels > using this IC. > > Tested-by: Nikita Travkin #ltl101at01 > Signed-off-by: Artur Weber This change as commit 6810bb390282 ("drm/panel: Add Samsung S6D7AA0 panel controller driver") in -next causes the following build errors with clang and GCC older than 8.x (the kernel supports back to GCC 5.1). With clang: drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:312:14: error: initializer element is not a compile-time constant .drm_mode = s6d7aa0_lsl080al02_mode, ^~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:415:14: error: initializer element is not a compile-time constant .drm_mode = s6d7aa0_lsl080al03_mode, ^~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:443:14: error: initializer element is not a compile-time constant .drm_mode = s6d7aa0_ltl101at01_mode, ^~~~~~~~~~~~~~~~~~~~~~~ 3 errors generated. With GCC: drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:312:14: error: initializer element is not constant .drm_mode = s6d7aa0_lsl080al02_mode, ^~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:312:14: note: (near initialization for 's6d7aa0_lsl080al02_desc.drm_mode') drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:415:14: error: initializer element is not constant .drm_mode = s6d7aa0_lsl080al03_mode, ^~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:415:14: note: (near initialization for 's6d7aa0_lsl080al03_desc.drm_mode') drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:443:14: error: initializer element is not constant .drm_mode = s6d7aa0_ltl101at01_mode, ^~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm/panel/panel-samsung-s6d7aa0.c:443:14: note: (near initialization for 's6d7aa0_ltl101at01_desc.drm_mode') You can find these toolchains at https://mirrors.edge.kernel.org/pub/tools/crosstool/ and https://mirrors.edge.kernel.org/pub/tools/llvm/ if you need help testing. clang may eventually match GCC's newer behavior but there appears to be some unresolved concerns around the proposed implementation and we have not been able to double back to it: https://reviews.llvm.org/D76096 > +static const struct drm_display_mode s6d7aa0_lsl080al03_mode = { > + .clock = (768 + 18 + 16 + 126) * (1024 + 8 + 2 + 6) * 60 / 1000, > + .hdisplay = 768, > + .hsync_start = 768 + 18, > + .hsync_end = 768 + 18 + 16, > + .htotal = 768 + 18 + 16 + 126, > + .vdisplay = 1024, > + .vsync_start = 1024 + 8, > + .vsync_end = 1024 + 8 + 2, > + .vtotal = 1024 + 8 + 2 + 6, > + .width_mm = 122, > + .height_mm = 163, > +}; > + > +static const struct s6d7aa0_panel_desc s6d7aa0_lsl080al03_desc = { > + .panel_type = S6D7AA0_PANEL_LSL080AL03, > + .init_func = s6d7aa0_lsl080al03_init, > + .off_func = s6d7aa0_lsl080al03_off, > + .drm_mode = s6d7aa0_lsl080al03_mode, > + .mode_flags = MIPI_DSI_MODE_NO_EOT_PACKET, > + .bus_flags = 0, > + > + .has_backlight = true, > + .use_passwd3 = true, > +}; > + > +/* Initialization structures for LTL101AT01 panel */ > + > +static const struct drm_display_mode s6d7aa0_ltl101at01_mode = { > + .clock = (768 + 96 + 16 + 184) * (1024 + 8 + 2 + 6) * 60 / 1000, > + .hdisplay = 768, > + .hsync_start = 768 + 96, > + .hsync_end = 768 + 96 + 16, > + .htotal = 768 + 96 + 16 + 184, > + .vdisplay = 1024, > + .vsync_start = 1024 + 8, > + .vsync_end = 1024 + 8 + 2, > + .vtotal = 1024 + 8 + 2 + 6, > + .width_mm = 148, > + .height_mm = 197, > +}; > + > +static const struct s6d7aa0_panel_desc s6d7aa0_ltl101at01_desc = { > + .panel_type = S6D7AA0_PANEL_LTL101AT01, > + .init_func = s6d7aa0_lsl080al03_init, /* Similar init to LSL080AL03 */ > + .off_func = s6d7aa0_lsl080al03_off, > + .drm_mode = s6d7aa0_ltl101at01_mode, > + .mode_flags = MIPI_DSI_MODE_NO_EOT_PACKET, > + .bus_flags = 0, > + > + .has_backlight = true, > + .use_passwd3 = true, > +}; Cheers, Nathan