Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp3908699rwb; Mon, 16 Jan 2023 15:04:03 -0800 (PST) X-Google-Smtp-Source: AMrXdXs7DYFDQwl30gkS02ILc/vSJqZcf74MbTLWAdISve5ZuMOSYJRFK/NRpKv+tZwghqP0a8CI X-Received: by 2002:a17:907:d40c:b0:86b:aa56:7451 with SMTP id vi12-20020a170907d40c00b0086baa567451mr675367ejc.53.1673910242911; Mon, 16 Jan 2023 15:04:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673910242; cv=none; d=google.com; s=arc-20160816; b=Xtt6XiJFJXVCngaiMI2ZcMReSoPlXhfB7U6o2Y+HkiPHaQV2/bgIQq0rUr1wdMDmGk +S7iRAeu5zsnn3rvj8Qe7OEu7lW/KqFn1p1kWqLjNaEUXaPEaobGTB1UfIs0jFlMxtws kVYqaQDTu4kEyx86isLBAB7mkc8R4mOK1vXTMKul9ukFKBqAmz2t8cAqJl+tyT8C5CX0 fQOIr+bzuvxPevtf2ZKkDCCr2TpA8zjvCG3HKqeySmvUTHK9ESeUOV1ULMAjtqjZwiCY G/iZIhLqF5PiznQNm70XQW9a6phhGX1Vm6foBEJA9xq7gqUfj/GqsCFN6b/eS0/s9IuL MuOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/MGJUK5g8dDeQ+HJR3sGsE5BNHrCIL6SPSjE4dQtW9Y=; b=UCMvaPrHX17thknKSMHR2IN6EpTy9du2RP6Psdn2eydsJb7/kX0ddCe10PDtmodCXs szXjHGZ4GUSLS1TNGlBzpVcEOtKWaXecEn+XYu6Iufw9n8BZJlF0OWiYiw5HtOvA/+sW PLVFeKIYq4vf6GQ7lmM00V3fCOLm3FWOyYQOHzU2FdjDnVG2dmSMJW/EdRm9iR05vhuS 5v+YEYc+mfqZuIztTO9Bx0CLaGJg1aCUVwHTn3kfawGYty3UBI+pMUEMkX3II5OvRiUE q8yN21Yy4cvcRW/KLT92tXqocdIXQNIJrb+/aMv1Dlx9yprRIccpT3f59eUyujawbPUL Y0aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=gc6M8ZC6; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id go20-20020a1709070d9400b00855da26bccasi8124926ejc.974.2023.01.16.15.03.50; Mon, 16 Jan 2023 15:04:02 -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=@gmail.com header.s=20210112 header.b=gc6M8ZC6; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235125AbjAPWuR (ORCPT + 49 others); Mon, 16 Jan 2023 17:50:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34856 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232058AbjAPWtu (ORCPT ); Mon, 16 Jan 2023 17:49:50 -0500 Received: from mail-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2D27725296 for ; Mon, 16 Jan 2023 14:49:49 -0800 (PST) Received: by mail-il1-x12f.google.com with SMTP id h26so14608137ila.11 for ; Mon, 16 Jan 2023 14:49:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/MGJUK5g8dDeQ+HJR3sGsE5BNHrCIL6SPSjE4dQtW9Y=; b=gc6M8ZC6ahhun4+JlZQIhukal+fUx7cqOHh0olLM5NsLfRnjG3OEieJb9B1lyjJgWK GVq4npMAs1Q8wo0t4E5HepqEAkpUC3Oe733fdoLudI11lOmkqduiiS0yE/HQFbJVKR+x uRATcfQUHSOmRxl8xd03nTLS+R8zp94Jdm360KGjn7c6nf6AUHWk4u/hdsJrnyJv4AFz gWsnuzWbIQh6+UwZi6fYtP+QgCftmsM+vIUEUsnzXnJ6+skuPsL0FVnxteXN8xu5JXQk t6ilXM4JSOOUZXqRDrs5lzrhNkOIlEoVuOI3Oo9ZX0pId8uYYrX3xcCuVTRMk656cIXw XXpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/MGJUK5g8dDeQ+HJR3sGsE5BNHrCIL6SPSjE4dQtW9Y=; b=FGcmWq6AJbzLXQzEk56XQkTu0jLHbR+VceERmDOSiwjKitlegd2j5sGBOKF/MJeOYE J5M2bCf1jtzihZp6dpWe2GsKzBa//sOVNo2XFgiIVrsSH2YfcD8oPUCUrEM8LYKYo9Cn vuneXTjkSx3rGG3n0h3uAbUsnOWqLfWHco1541PaYzruFNrlnplMHeWUyo8eq/h7WcJz plaJuTnYBTGFDrmwlWyYEwNWeaB9QP2QoFtfIeqjLe8IvYcH2EIhf0CXhmjnRu+VVFhh F3n/rntU0n/L5GwPrOwGfUUt2bAqCdOX6CYSxE8/ztg6QcntEw8ZVdJLa1SBCvrEBPtH KzYw== X-Gm-Message-State: AFqh2kpHMvBuI1rqQbKgAihfBoyyCXjl4Lf2O37vwgMyLRAJGyGoP6gb nqQ3psct6+DHndqUhyxmm5M= X-Received: by 2002:a05:6e02:be5:b0:30f:1cc:d14b with SMTP id d5-20020a056e020be500b0030f01ccd14bmr1031528ilu.0.1673909388527; Mon, 16 Jan 2023 14:49:48 -0800 (PST) Received: from localhost ([2607:fea8:a2df:3d00::6be]) by smtp.gmail.com with ESMTPSA id r6-20020a92c506000000b00300d3c0e33dsm8860747ilg.4.2023.01.16.14.49.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 14:49:48 -0800 (PST) From: Richard Acayan To: 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 , Neil Armstrong , Richard Acayan Subject: [RFC PATCH v3 3/3] drm/panel: vtdr6130: Use 16-bit brightness function Date: Mon, 16 Jan 2023 17:49:09 -0500 Message-Id: <20230116224909.23884-4-mailingradian@gmail.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230116224909.23884-1-mailingradian@gmail.com> References: <20230116224909.23884-1-mailingradian@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, 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 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; -- 2.39.0