Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp6259767rwb; Wed, 18 Jan 2023 03:13:19 -0800 (PST) X-Google-Smtp-Source: AMrXdXsf2b78a/Uv+ZoIvsBouPjlusLg6dGGYlFYrrekbNVTAV7Xm2iOnhIGHTn5w/1BMYFn5fIn X-Received: by 2002:a17:90a:c58b:b0:229:4614:9cca with SMTP id l11-20020a17090ac58b00b0022946149ccamr6780769pjt.38.1674040398765; Wed, 18 Jan 2023 03:13:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674040398; cv=none; d=google.com; s=arc-20160816; b=J/kPMhODo4RyA42mAZSEqCcpAXliUQ7ll+46n6Gt4Son20QAKvqNuC+064MFjtn73e AdLwIUqG7nErTxmnjMfV/CGlq7U69u7G7jcIloyJffM/6TpFAGR5Qv5Mucgo0k0qi8c4 H89w/RVGVQFpz4uH+plJN5+VvjdUmJG1v2OGXn8cRF+bHhbzH6E3S6hNPl7vlCZdvvqR iYm00BmCpLBbPdZLHoOvRDmlz8Df7+D89u3rTMZsbjX5X+Ssw59c4HgNMtM9Gdgjn7bX qIW1SrclrFS7jg76UptWJBYuYubAvZLendooWzWIZXk6WsVqUUEo8CvVmhCArMq7oDxH MLbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:references:cc:to:content-language:subject:reply-to :from:user-agent:mime-version:date:message-id:dkim-signature; bh=bxTEriY1MvSGeJlo84GqMLFfzsCCLCqbUF/mz0HRuGk=; b=aLMBqxrIXT3GRoJ2fZBq3XYjXaxDQiSzz1mjJO8IVUDbuoN6AlsiNIOKZIVXAlbwkn Sm6koz2nhK6SwieqWhMNmhtk8UsYKx6lXu2tmeVDm7NHuascJfEG2EH6ciJo1HTAssTg c8XJ+4pvNFuSjhbmf3Pj0gP9XQM7bFUcEOeh33u3RUWg2DqYHQL52VAC4tauLIMRVk6o z/JQJwRasB9l5ek5uaOnNL/E5SUoKRV+BkBrLgQNUr3SRpnNbMrK2VLQ4zAXp5BiF7Yj wJGSGOUbwnk8M8HSBWld+ZKSKY9oe9F2jzaY4/RpY84iGUPzr/dX7K9/MrVwlqBv576x yV0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=U0+jiQ8Y; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e2-20020a636902000000b004d122bf069fsi267448pgc.267.2023.01.18.03.13.13; Wed, 18 Jan 2023 03:13:18 -0800 (PST) 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=@linaro.org header.s=google header.b=U0+jiQ8Y; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229637AbjARKnW (ORCPT + 45 others); Wed, 18 Jan 2023 05:43:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229718AbjARKlK (ORCPT ); Wed, 18 Jan 2023 05:41:10 -0500 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA2C3C9253 for ; Wed, 18 Jan 2023 01:45:41 -0800 (PST) Received: by mail-wr1-x430.google.com with SMTP id e3so24082045wru.13 for ; Wed, 18 Jan 2023 01:45:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:organization:references:cc:to :content-language:subject:reply-to:from:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=bxTEriY1MvSGeJlo84GqMLFfzsCCLCqbUF/mz0HRuGk=; b=U0+jiQ8YZms1L9R000j+kcQGuYANmrpPeAz3lPkkDReAp1VJSpkw9WHC28jnRnKNfb 8VkT9GftcWVhL/zjhpnm+mD/UMtaS+xOCNfriKRE4u2V4zNDUBAUab618FlYViuDlbeM ddzPzmSXN4M/5kwRERUEiPeTIGRdllkk6IObfw7vyzdg+Ejx6+NakqWwI+/MsFOrkSuk DedVYbdWBbwdtZfWG5bqzN2BBG58HtK4tFdTUqbSUzwG4BgtNwlSdtWzlrkbb/ii1JoS KIDt5bA2Jd7Jx5YfTTSzBOfqOgYmikhTJNxgAdP2u7/3H/K9XvlCoovACTY3Vl5Z+Ur2 TUJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:references:cc:to :content-language:subject:reply-to:from:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bxTEriY1MvSGeJlo84GqMLFfzsCCLCqbUF/mz0HRuGk=; b=ZKq+Jou2pF3ufHu9lJujq2wD2IT88byAXUNGTjo32xuygYelgDuGWFgGwL2WSioq+c iHBIEUqv+SP9Mt6EONtb1kdKMrzEAI48hjGAyj/xglXZq+xI+YNOzPlMFblffkMtnGzs hx4GSmEBXm6SVz4xV4JQdfFY4VNpiDo4iOBU5X8eZiYWVb2bLH5cYwpWKRFh0f/aJbkj S+sGjSEIwNW95rqbmt3tF2UAWREUAAgKKfPnyJWDwd04vIQO0PvSWQwUjWPNmLtGYbAt dWmo58H6l5MjVoTW7k63LD++zWX9dN0+MajcKaPU62c9eWdLwx6s0X7xcET/FW3Lkn6s TMTA== X-Gm-Message-State: AFqh2kq4b+lihGueoQ0AjLMIWSfQSw0BjnV583n6+ikBOp9yvdLsIBar oPlrYU3w0WvQrrVI5uW9BW92Lw== X-Received: by 2002:a5d:4446:0:b0:2ba:c946:868b with SMTP id x6-20020a5d4446000000b002bac946868bmr5416810wrr.23.1674035133127; Wed, 18 Jan 2023 01:45:33 -0800 (PST) Received: from ?IPV6:2a01:e0a:982:cbb0:37dc:5071:959c:93e4? ([2a01:e0a:982:cbb0:37dc:5071:959c:93e4]) by smtp.gmail.com with ESMTPSA id e10-20020adfe38a000000b002bc7fcf08ddsm23460721wrm.103.2023.01.18.01.45.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 18 Jan 2023 01:45:32 -0800 (PST) Message-ID: <47b70ca1-2601-0e71-80bd-6d3f3f845601@linaro.org> Date: Wed, 18 Jan 2023 10:45:30 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 From: Neil Armstrong Reply-To: neil.armstrong@linaro.org Subject: Re: [RFC PATCH v3 3/3] drm/panel: vtdr6130: Use 16-bit brightness function Content-Language: en-US To: Richard Acayan , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Thierry Reding , Sam Ravnborg , Emil Velikov , Vinay Simha BN , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: Daniel Mentz , Caleb Connolly References: <20230116224909.23884-1-mailingradian@gmail.com> <20230116224909.23884-4-mailingradian@gmail.com> Organization: Linaro Developer Services In-Reply-To: <20230116224909.23884-4-mailingradian@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, 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 16/01/2023 23:49, Richard Acayan wrote: > This panel communicates brightness in big endian. This is not a quirk of > the panels themselves, but rather, a part of the MIPI standard. Use the > new mipi_dsi_dcs_set_display_brightness_large() function that properly > handles 16-bit brightness instead of bypassing the brightness functions > entirely. > > Signed-off-by: Richard Acayan > --- > drivers/gpu/drm/panel/panel-visionox-vtdr6130.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c b/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c > index f9a6abc1e121..1092075b31a5 100644 > --- a/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c > +++ b/drivers/gpu/drm/panel/panel-visionox-vtdr6130.c > @@ -243,12 +243,9 @@ static int visionox_vtdr6130_bl_update_status(struct backlight_device *bl) > { > struct mipi_dsi_device *dsi = bl_get_data(bl); > u16 brightness = backlight_get_brightness(bl); > - /* Panel needs big-endian order of brightness value */ > - u8 payload[2] = { brightness >> 8, brightness & 0xff }; > int ret; > > - ret = mipi_dsi_dcs_write(dsi, MIPI_DCS_SET_DISPLAY_BRIGHTNESS, > - payload, sizeof(payload)); > + mipi_dsi_dcs_set_display_brightness_large(dsi, brightness); > if (ret < 0) > return ret; > Reviewed-by: Neil Armstrong Tested-by: Neil Armstrong # on SM8550-MTP Thanks !