Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp18923702rwd; Wed, 28 Jun 2023 02:33:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5NCXVubRwnJtwDf1AWRrHbMrcOfCQ38dl7o147yTt4KKjg3Xs/ykrvABfk+XRJH5GO6bVF X-Received: by 2002:a17:907:8a0b:b0:991:e24f:b290 with SMTP id sc11-20020a1709078a0b00b00991e24fb290mr6624055ejc.26.1687944806974; Wed, 28 Jun 2023 02:33:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687944806; cv=none; d=google.com; s=arc-20160816; b=nyTVamvhAgS2GDIf+PAll2LH06RWhxVMTgMjZJUAajWbo6QzquabT5Tp+YGWtY5AYQ OlcE2pztNrx3keEdwUCEoTby6WWOY0dYYBpXusYf3y0IfZedzQFuTlRJBbGXYO64tNcS m5fQkZfAxIzyS4pbayXTsBGFZehUnHG9jO4yarNqq8Ka6aoJfPbNaOuLVa40h+ML6YWe EejlbEFFVP9NxYPvNCh6DEReWkEshPPPBot5unorU2YoZk25O0BAvHr5PwcPrasFMwJo unb6Ns+IZTXcxsbOFauFOsXghImcXhObcY/A0tGP72mw7CkgJm+2F4G+CearCPHmQRAJ zzMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=7/BYorY/q5cLcDCJ090Ghd9w+MLE7Dxtd/FOA8XGDK0=; fh=VzEEJb5JQ413zgd7rIBqTVfFHwB3RkXk78jRGEqFXP8=; b=NkUZF6Zif7MXVxwK6GFsabfn5aHjqHDafsSsXI+lXfWOt3eYBBP4+rpF5WDBTmeYq8 o7JhgGC1XD9RhJJ4AO4CymAbS2Dm8KykYambdt+tszWyouYzdfgeGEcGAsmXp+XXiwSL QvSze//yATFjHnv1qVeWF1zqTtro78LH6NSarV8Id7ODCfbsZHpJSRZ9a8C3lpGGqz2k yDupMFnN+9CWjLmzeu5aOL/krzEtvhZC1RrS74qziTWZzyzK3JFTR9m82/VfwqW+DVRK gT8cWkN7NwgDKwy+hNvAJVg5hW8GiYEQORc9frq2t4RHxxFHu+LETWTEeNpWLteQGXqV XBdA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yGjc51d+; 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 cw11-20020a170906c78b00b0098779e34f8bsi5047286ejb.787.2023.06.28.02.32.55; Wed, 28 Jun 2023 02:33: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=@linaro.org header.s=google header.b=yGjc51d+; 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 S231305AbjF1J2D (ORCPT + 99 others); Wed, 28 Jun 2023 05:28:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232739AbjF1JWv (ORCPT ); Wed, 28 Jun 2023 05:22:51 -0400 Received: from mail-yb1-xb2c.google.com (mail-yb1-xb2c.google.com [IPv6:2607:f8b0:4864:20::b2c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00C5E213D for ; Wed, 28 Jun 2023 02:22:49 -0700 (PDT) Received: by mail-yb1-xb2c.google.com with SMTP id 3f1490d57ef6-bd77424c886so5736131276.0 for ; Wed, 28 Jun 2023 02:22:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687944169; x=1690536169; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=7/BYorY/q5cLcDCJ090Ghd9w+MLE7Dxtd/FOA8XGDK0=; b=yGjc51d+pnM9hgZXegh8DLv4eBfWeNuQiQAqZqW/yiUB1oZacLRVjQkPKxQ1SD3+cr OB9/i0YTbxwHomeiZ+R6g4e8ZlP9pHZrNtvk4dODAOPVPjg62kWiAbzqUknUJlbv2w8w 80uXgaDuIp90IZ8SgDVZ/RMIX03ZD3Jgq5ih+FL9wx6yYgNE/zB/3VhKzl+nyVnXExaC ZQToOuiiFgx5ELsVyQhptW9UqaLW7uN0QNjQ0qavMfUQHvMtu1Oa9hBD1Dz4qd2PQrUy 4Xhys1MVsogiRyPPJtcTynNPChMfuNIlaSus7JRWHT4Kpac2UG9+lVMsrpqHfGfBuCGM hw2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687944169; x=1690536169; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7/BYorY/q5cLcDCJ090Ghd9w+MLE7Dxtd/FOA8XGDK0=; b=hHh6QSrOFtyjERiFpuOFJstdLJ0JPtTmY2O9i4jB7ixPhmg9bSu8V7hE6N0WKBRB4H NpihZJ6157/OfUH2LGFG1UfpHjdF2LhoyjjyaDkBsPoJl0gmMA8NtKBDD1M0BVg4g3A3 HBvP4rg7v8G+xm2gsNZjqaodOYLaX0D7vaVQ8N5u0gMxgB4i0BjwcOi/8vkbG4LyQh1D +JzkEWgPy1LkI7VjKy6s+3GgVlX3CGV++erjmZsQ2t+kB57NdDWXWm1+CNal0mcyjmGU vWj771lscC8J8a/x/YG9Sqe0KwrT84mGotZaB1qjNPYm/eMhuuhBkmGd4JH/AkL6F2Dm UNeQ== X-Gm-Message-State: AC+VfDy3wV/Dm4ckUhpfA1oW7WlItXHGXU9zU5cxiW3T+Z85F4WmySYY wme41WxN9zIFIY7kkW4p/oIyI7lHmGpJpRwzX9hyrg== X-Received: by 2002:a25:838e:0:b0:c12:abdb:c22d with SMTP id t14-20020a25838e000000b00c12abdbc22dmr12289571ybk.61.1687944169188; Wed, 28 Jun 2023 02:22:49 -0700 (PDT) MIME-Version: 1.0 References: <20230521-drm-panels-sony-v1-0-541c341d6bee@somainline.org> <20230521-drm-panels-sony-v1-10-541c341d6bee@somainline.org> In-Reply-To: <20230521-drm-panels-sony-v1-10-541c341d6bee@somainline.org> From: Linus Walleij Date: Wed, 28 Jun 2023 11:22:37 +0200 Message-ID: Subject: Re: [PATCH RFC 10/10] drm/panel/sony-griffin-samsung: Add panel driver for Sony Xperia 1 To: Marijn Suijten Cc: Neil Armstrong , Sam Ravnborg , David Airlie , Daniel Vetter , Caleb Connolly , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Andy Gross , Bjorn Andersson , devicetree@vger.kernel.org, Jami Kettunen , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Abhinav Kumar , Konrad Dybcio , Martin Botka , ~postmarketos/upstreaming@lists.sr.ht, AngeloGioacchino Del Regno , Dmitry Baryshkov , Jessica Zhang , Kuogee Hsieh Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=unavailable 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 Sun, May 21, 2023 at 11:23=E2=80=AFPM Marijn Suijten wrote: > The Sony Xperia 1 (codename kumano griffin) features an unnamed 4k OLED > DSI cmd mode panel produced by Samsung. It can be driven in a > 1644x3840@60 or 1096x2560@60 mode, and always has Display Stream > Compression 1.1 enabled. > > Signed-off-by: Marijn Suijten (...) > +static int sony_griffin_samsung_on(struct sony_griffin_samsung *ctx) > +{ > + ret =3D mipi_dsi_dcs_exit_sleep_mode(dsi); > + if (ret < 0) { > + dev_err(dev, "Failed to exit sleep mode: %d\n", ret); > + return ret; > + } > + usleep_range(10000, 11000); > + > + ret =3D mipi_dsi_dcs_set_tear_on(dsi, MIPI_DSI_DCS_TEAR_MODE_VBLA= NK); > + if (ret < 0) { > + dev_err(dev, "Failed to set tear on: %d\n", ret); > + return ret; > + } > + > + mipi_dsi_dcs_write_seq(dsi, 0xf0, 0x5a, 0x5a); > + mipi_dsi_dcs_write_seq(dsi, 0xb0, 0x05); > + mipi_dsi_dcs_write_seq(dsi, 0xd7, 0x07); > + mipi_dsi_dcs_write_seq(dsi, 0xf0, 0xa5, 0xa5); > + /* Enable backlight control */ > + mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_WRITE_CONTROL_DISPLAY, BIT(5= )); > + msleep(110); > + mipi_dsi_dcs_write_seq(dsi, 0xf0, 0x5a, 0x5a); > + mipi_dsi_dcs_write_seq(dsi, 0xe2, enable_4k ? 0 : 1); > + mipi_dsi_dcs_write_seq(dsi, 0xf0, 0xa5, 0xa5); > + > + ret =3D mipi_dsi_dcs_set_column_address(dsi, 0, hdisplay - 1); > + if (ret < 0) { > + dev_err(dev, "Failed to set column address: %d\n", ret); > + return ret; > + } > + > + ret =3D mipi_dsi_dcs_set_page_address(dsi, 0, vdisplay - 1); > + if (ret < 0) { > + dev_err(dev, "Failed to set page address: %d\n", ret); > + return ret; > + } > + > + mipi_dsi_dcs_write_seq(dsi, 0xf0, 0x5a, 0x5a); > + mipi_dsi_dcs_write_seq(dsi, 0xb0, 0x70); > + mipi_dsi_dcs_write_seq(dsi, 0xb9, 0x00, 0x60); > + mipi_dsi_dcs_write_seq(dsi, 0xf0, 0xa5, 0xa5); > + mipi_dsi_dcs_write_seq(dsi, 0xf0, 0x5a, 0x5a); > + mipi_dsi_dcs_write_seq(dsi, 0xc5, 0x2e, 0x21); > + mipi_dsi_dcs_write_seq(dsi, 0xf0, 0xa5, 0xa5); > + > + ret =3D mipi_dsi_dcs_set_display_on(dsi); > + if (ret < 0) { > + dev_err(dev, "Failed to turn display on: %d\n", ret); > + return ret; > + } > + > + return 0; > +} This is eerily similar to the sequence in panel-samsung-sofef00.c: static int sofef00_panel_on(struct sofef00_panel *ctx) { struct mipi_dsi_device *dsi =3D ctx->dsi; struct device *dev =3D &dsi->dev; int ret; dsi->mode_flags |=3D MIPI_DSI_MODE_LPM; ret =3D mipi_dsi_dcs_exit_sleep_mode(dsi); if (ret < 0) { dev_err(dev, "Failed to exit sleep mode: %d\n", ret); return ret; } usleep_range(10000, 11000); mipi_dsi_dcs_write_seq(dsi, 0xf0, 0x5a, 0x5a); ret =3D mipi_dsi_dcs_set_tear_on(dsi, MIPI_DSI_DCS_TEAR_MODE_VBLANK= ); if (ret < 0) { dev_err(dev, "Failed to set tear on: %d\n", ret); return ret; } mipi_dsi_dcs_write_seq(dsi, 0xf0, 0xa5, 0xa5); mipi_dsi_dcs_write_seq(dsi, 0xf0, 0x5a, 0x5a); mipi_dsi_dcs_write_seq(dsi, 0xb0, 0x07); mipi_dsi_dcs_write_seq(dsi, 0xb6, 0x12); mipi_dsi_dcs_write_seq(dsi, 0xf0, 0xa5, 0xa5); mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_WRITE_CONTROL_DISPLAY, 0x20); mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_WRITE_POWER_SAVE, 0x00); ret =3D mipi_dsi_dcs_set_display_on(dsi); if (ret < 0) { dev_err(dev, "Failed to set display on: %d\n", ret); return ret; } return 0; } Isn't this just the same display controller with a different configuration? Especially the sleep ranges are even the same. I almost feel like buying these phones just to pry them apart and put under a microscope to figure out what these displays actually contain. Yours, Linus Walleij