Received: by 2002:a05:6358:16cd:b0:dc:6189:e246 with SMTP id r13csp3325046rwl; Sat, 5 Nov 2022 21:25:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM46IJ5l6yaYwQxeQYzZ62e/LQxjicMRnlgUbM4D3j2EgatfNgv0aQnDYc3euYFAaoT/mtdB X-Received: by 2002:a17:90b:1b4b:b0:213:4d2f:9832 with SMTP id nv11-20020a17090b1b4b00b002134d2f9832mr44340117pjb.233.1667708726899; Sat, 05 Nov 2022 21:25:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667708726; cv=none; d=google.com; s=arc-20160816; b=bkZW4DWsf0xAPxZF5rJv98ehGC1uMAqUFxatkMVc+KvqTKZGK1U2dlIw2SOsxxlmTT wetTTYAUpxgjqbTZcY3aDxKzQvEgv6985YaTjRh5A6kj969Ijeub//fpAZGIIZPlHUaF kZ92oBLCuR3OyAAVTyU90gv7gZKtM42osdQB/Z13hp5MydnoQ5jD6x4OiVPdr5mCeO// qd0pgcpbG47om+osjrMFgl/0tZfiqTPe2L5jwLJxmvaczOTzR0i7/SVEnHOKxlr+svGh KZ57Fb1V+WqcXZDQBfNZS3oouDlhbeMT4NjfJK7768beYGs8pSUklDId48Cg3xujBJeH /RSw== 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=KM47AylQC11G9tSR4Tllfdw7LUwlvZrODuutOXBUw0M=; b=BzzVw2fm8JZLOF15kYW999OJjP8utvBAwHZzYXYxF/YCeTR6g4nIdGzGONAOO7bSme Bzm8+ZXSEOeMm/kC0IgaXpqaMxZ9pQHCRsMZQGX5UnGZJjs8kXsKDH6orjbD+UELKVP+ 4/34wcs7lFZthdzy3ccM7NuaBYweu0Fp7fT8F0iDYAto8+o3agi/Amid8t8ovkyP5v+v JgDCzR1DeCeLPq+nyT2wC2B151mAKPwMMAt6fsHt9aL1Fd0MIZFCIfbRvtMXOJDuwPnG PJFUw1rWyDJE9fuaeOrFkd2P00TsKszHB3nldY66OBBB/6AvUUTruE/m4mTjJtWuV0rK bwNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HtMWU6CX; 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 u27-20020a056a00099b00b00543bc7e5bc9si5359630pfg.361.2022.11.05.21.25.15; Sat, 05 Nov 2022 21:25:26 -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=HtMWU6CX; 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 S229649AbiKFDR7 (ORCPT + 96 others); Sat, 5 Nov 2022 23:17:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229548AbiKFDR4 (ORCPT ); Sat, 5 Nov 2022 23:17:56 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5BF05FB9; Sat, 5 Nov 2022 20:17:55 -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 ams.source.kernel.org (Postfix) with ESMTPS id 408F3B80683; Sun, 6 Nov 2022 03:17:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D965C433D6; Sun, 6 Nov 2022 03:17:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667704672; bh=iXN6QTp9N3xZfo64V68cgv+Kq1hePQWIpnKArPOxGcE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=HtMWU6CXuHFVtmmuBuLxQc47wWBR+J8RMjieWFPlDveugMk2zCiN9HjMZgxBLuZPp a+JoBlXf/36BGSbhfezWqtJS+eXHJL5HNN/pQCXIdL9WSLzDFdd/RDeKKpYIawsbuL rBwe2zF9X0f+DrU6tNMWZbLkxqoxjN969qfPypBxIjJ1Y2VIMSOxrJbyEz+oDMet3L cNZC1kDpGebXhBflMVGxhyWwiztRsPBOSVufiT43kWRd/85ox6hqpDyHK2kGC1oWE5 VjvwMsY4Amhm/VB5MkAeAo2QChGeyNC5BvIjgUjuckn8YtBRzxcXZzEahwlJJxwgYL UATBe6OQrrofQ== Date: Sat, 5 Nov 2022 22:17:50 -0500 From: Bjorn Andersson To: Nia Espera Cc: Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, ~postmarketos/upstreaming@lists.sr.ht, linux-arm-msm@vger.kernel.org, phone-devel@vger.kernel.org, Caleb Connolly Subject: Re: [PATCH v3 1/2] drivers: gpu: drm: add driver for samsung s6e3fc2x01 cmd mode panel Message-ID: <20221106031750.juw3fsy27wchqdqp@builder.lan> References: <20221008131201.540185-1-a5b6@riseup.net> <20221008131201.540185-2-a5b6@riseup.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221008131201.540185-2-a5b6@riseup.net> X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS 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 On Sat, Oct 08, 2022 at 03:12:01PM +0200, Nia Espera wrote: > Adds a dedicated driver for the Samsung s6e3fc2x01 panel used in OnePlus > 6T smartphones which was previously driven by the sofef00 panel driver > > Signed-off-by: Nia Espera > Reviewed-by: Caleb Connolly > --- > MAINTAINERS | 5 + > drivers/gpu/drm/panel/Kconfig | 12 + > drivers/gpu/drm/panel/Makefile | 1 + > .../gpu/drm/panel/panel-samsung-s6e3fc2x01.c | 388 ++++++++++++++++++ git log --oneline drivers/gpu/drm/panel indicates that the $subject prefix should be "drm/panel:" [..] > diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile > index 6d493b9d64fe..b54de8812e91 100644 > --- a/drivers/gpu/drm/panel/Makefile > +++ b/drivers/gpu/drm/panel/Makefile > @@ -56,6 +56,7 @@ obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63M0_DSI) += panel-samsung-s6e63m0-dsi.o > obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E88A0_AMS452EF01) += panel-samsung-s6e88a0-ams452ef01.o > obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E8AA0) += panel-samsung-s6e8aa0.o > obj-$(CONFIG_DRM_PANEL_SAMSUNG_SOFEF00) += panel-samsung-sofef00.o > +obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E3FC2X01) += panel-samsung-s6e3fc2x01.o > obj-$(CONFIG_DRM_PANEL_SEIKO_43WVF1G) += panel-seiko-43wvf1g.o > obj-$(CONFIG_DRM_PANEL_SHARP_LQ101R1SX01) += panel-sharp-lq101r1sx01.o > obj-$(CONFIG_DRM_PANEL_SHARP_LS037V7DW01) += panel-sharp-ls037v7dw01.o > diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e3fc2x01.c b/drivers/gpu/drm/panel/panel-samsung-s6e3fc2x01.c [..] > +static int s6e3fc2x01_panel_bl_update_status(struct backlight_device *bl) > +{ > + struct mipi_dsi_device *dsi = bl_get_data(bl); > + int err; > + u16 brightness; > + > + brightness = (u16)backlight_get_brightness(bl); > + // This panel needs the high and low bytes swapped for the brightness value /* */ please > + brightness = __swab16(brightness); > + > + err = mipi_dsi_dcs_set_display_brightness(dsi, brightness); This returns a valid <= 0, so it would be nicer with just return mipi_dsi_dsc_set_display_brightness(...); > + if (err < 0) > + return err; > + > + return 0; > +} > + > +static const struct backlight_ops s6e3fc2x01_panel_bl_ops = { > + .update_status = s6e3fc2x01_panel_bl_update_status, > +}; > + Regards, Bjorn