From patchwork Tue Nov 10 23:46:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 322904 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp657470ils; Tue, 10 Nov 2020 15:47:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJzOan+U55jMwc4jkWoANnBs1G/2NSblvgx9I2EAywK4i0YrYa68VpRRc21qsnl0FlRDXv2O X-Received: by 2002:a63:65c7:: with SMTP id z190mr19000801pgb.444.1605052024174; Tue, 10 Nov 2020 15:47:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605052024; cv=none; d=google.com; s=arc-20160816; b=tuB3jQMEghNci+7MhKOZRs+5ZnuJ4CTSNJ7M9UXnqCeHejhibMAapb0BFq8uBSSXAK OxZGTtwwH9+9EprBGtBrPkkBvXbGD1JWXEQLpyBZaOzdr8RVtv8J3fYHocAdvXBU7pni 3woog+O52H+l6KBQ00rh5ym+Ep5niaJsLAws0kT1743woe7Ycu54EjV4ozpJhu4F7wAy oB6yM+ToTgQzJpPRwo+o28pAUX+CTj/Ux89AnmWPlhTAMpP9XzV47sj4GnQycVtol1mA 0Q0I3ZR/APkUB5K1Vffz9oM/DrftnJ+FfHvx5ShjeR5bH0JrO8w42/puZWfCCVWPpARj qVXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:delivered-to; bh=vN8HI5GtF2TcJOoy7+6/gdUCefZb8+elbHVMVTAScts=; b=a7Pp+eZ6BENWGGNUmKudGPIss1WdttMTPQRiaIhi7O2aqZTWhZUtBjxEytBFd1stQl WQsPz/zVeiegvqSrHO84gn55HoXKyXEHXVX+AuZBV2SMxUUMhsoEZwtSVqi2v3mlHq7w erNA7pG2h5UA58S1J/G8zxO0PysFzkJhdO2BqUF0vX+BzMefwgQPghpm8vcwhXqt8SM8 MJI6MxKUvpv7ShGWODZimP70XFecXgo+NtqHF6wzdhOCkV6DJ57Pmu9lzXLW9u1pZM8s tXAjmvOV4Sr+xq80bG1v45e74Fo5FIL7FIaw4iGwBWZWGjRRFudOPpPLdYJlsDQziTh1 PR1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="u/ORs0QN"; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id l194si62088pga.358.2020.11.10.15.47.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 15:47:04 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="u/ORs0QN"; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1F08D89D58; Tue, 10 Nov 2020 23:47:01 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 217F589D58 for ; Tue, 10 Nov 2020 23:47:00 +0000 (UTC) Received: by mail-lj1-x244.google.com with SMTP id h23so12355185ljg.13 for ; Tue, 10 Nov 2020 15:47:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=khCnrGcki9o8mKzcd5bCbIg16yUPV4xc/WhNkEV8Tok=; b=u/ORs0QN5/8GNcc5WPRtlACFGXVsKVFbYuGsrzCv1yjHxcPy/iM5a/i+6vMUP6AKjN zSHk/ZYl8qUWVCssuNs9diEHlqZ4Py5b5EqAo7jLgpwAddN/m2FV9P7oyjsd2QxhzXRz l+6ua64z7QgON4W1QW+UOSGw3txS1ESYHK9IfLUs6k8RLIImNiWIUt/sSPfpSP55FQi0 cyqgQId3rGQ1p8BbtMwSDfUHV57QQE5+iSRp7zPcMOKdx6Q1Is+CQYGV3VtbmHWgrsMQ 5QFsV8pJxfrZi04clbXYEzKmGfR1dY/++THEnKwL/mwp785/k2SEfBwdo7Y4SelB+pF5 7HSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=khCnrGcki9o8mKzcd5bCbIg16yUPV4xc/WhNkEV8Tok=; b=JVfUwI4F9sLuEq1fpHXBnhxiMXRvQQBJWfJK22BiKnxZm69B4tbUDS1Suz/Zz8kI8q 0ns+miPGG9k1KAICC9+oZlZ7yYKZGa5ec00kOPxoXTsHIF7MnXANdiM8pKnWxDsvsWUe sL8OKtZfbE34Y9Oi4GZLB5BwRz4BTMdid75ja/+/QAm446s17qwAEs7e6yhtOsKWu8Yu VgPftK3rm1w2ZItN38EsmL7xgUrde5zKgcx0frqjbfD7mBYiFzraSBhIknFWBXcp97c+ 1EGbQZNjFILJW3HbHoR9oUJkffRgL+clhD3RYgblPuIFbZz3Eo/RBPDoHnO8WwVwk1NU RVbw== X-Gm-Message-State: AOAM533WbC5QfwazGPnwuv6HN/4M9+ULs59CYAxmw/7kSfAki75fi3Qz 4ZANJ8yLcoq5LUBdt/KhRBhNwQ== X-Received: by 2002:a2e:9083:: with SMTP id l3mr3274847ljg.118.1605052018573; Tue, 10 Nov 2020 15:46:58 -0800 (PST) Received: from localhost.bredbandsbolaget (c-92d7225c.014-348-6c756e10.bbcust.telenor.se. [92.34.215.146]) by smtp.gmail.com with ESMTPSA id y65sm39883lff.73.2020.11.10.15.46.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 15:46:57 -0800 (PST) From: Linus Walleij To: Thierry Reding , Sam Ravnborg , Stephan Gerhold , =?utf-8?q?Pawe=C5=82_Chmiel?= Subject: [PATCH 1/5] drm/panel: s6e63m0: Simplify SPI writing Date: Wed, 11 Nov 2020 00:46:49 +0100 Message-Id: <20201110234653.2248594-2-linus.walleij@linaro.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201110234653.2248594-1-linus.walleij@linaro.org> References: <20201110234653.2248594-1-linus.walleij@linaro.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This writing code is equivalent to the spi_write() helper in the SPI framework. Insert a comment that this will always work fine since SPI buffers are in native endianness. Cc: Stephan Gerhold Cc: Paweł Chmiel Signed-off-by: Linus Walleij --- drivers/gpu/drm/panel/panel-samsung-s6e63m0-spi.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e63m0-spi.c b/drivers/gpu/drm/panel/panel-samsung-s6e63m0-spi.c index d298d780220d..75f00ed4810b 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e63m0-spi.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e63m0-spi.c @@ -25,16 +25,9 @@ static int s6e63m0_spi_dcs_read(struct device *dev, const u8 cmd, u8 *data) static int s6e63m0_spi_write_word(struct device *dev, u16 data) { struct spi_device *spi = to_spi_device(dev); - struct spi_transfer xfer = { - .len = 2, - .tx_buf = &data, - }; - struct spi_message msg; - spi_message_init(&msg); - spi_message_add_tail(&xfer, &msg); - - return spi_sync(spi, &msg); + /* SPI buffers are always in CPU order */ + return spi_write(spi, &data, 2); } static int s6e63m0_spi_dcs_write(struct device *dev, const u8 *data, size_t len) From patchwork Tue Nov 10 23:46:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 322905 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp657499ils; Tue, 10 Nov 2020 15:47:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJxQLycVbH3nWOXOMfRxY8iRhoR09WuOiWdjbVwakXKwA5E0grT4fo85yLz8PtfzKZiTm3yK X-Received: by 2002:aa7:95a6:0:b029:155:336c:3494 with SMTP id a6-20020aa795a60000b0290155336c3494mr19667882pfk.17.1605052026776; Tue, 10 Nov 2020 15:47:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605052026; cv=none; d=google.com; s=arc-20160816; b=YjODleFsaW0Mg6roRRZbLc4XTomqtJaXuK7HfmhAzuv4NEA+ciMmB1Z5MZQdaE5LHp 03CVTXpZyUVOqO4GvVWDBNcwk/1DWUj/gY/zksWsn5TeCHirhFQ3QM/YTJdAk6P+TcwR TC5g1CR5sjDGKxXhIyDAwcqvAWcA3uzdwiZiTctEbKSEZagvd6xJDidv0j/x2gnHoMSD WT64GaDCMoeHLutawBog6VkhCk/xdhelHVsEEih71VpmasIp5fIKuCRrR9VmSE0Wtpw+ 0QZEhjeZDIvb2NcJGxiqq0ZxS9LoH1eC0k477yidg4IWiGl8EsrT+8nnPybC0O62z3Em MUxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:delivered-to; bh=TdUxTWeZtMjkoLJhHgUUln1V6tGXQUy0SbJddC7MikQ=; b=alQgm3IHwKjnYCPE0bRpT3X16ruOCqVpqa3IRdleJF1t0NhEG4cnuKLPULH7ik5uRd Pm9K8VmEFe7FvQWq5sflGyaFDyX0gEZIbO0HpeEJZVI249LAZPszpdw9wtNYdlm8o4dd gM9cp83FYIsmLKeHooYIdE8Yy6qmElmfntYCYv8DzyYbHFqZCVawq3GpWWomldJOumEI sx0buPkhOfwcNGWW+010oJEsq5LE7Dfk5WrJGKGONCPb15ogUJwyjxpC0AMKdRQcx4Th 7uxNaaz5aNsdzYWdcIoGRYwCCpKWb3sEwo3PQQhDzGkS1IIlsw4Tg9dJcCJ/hE91q5VI hP5Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Ois9Ru3J; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id k6si71797pgq.205.2020.11.10.15.47.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 15:47:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Ois9Ru3J; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 02C6089D5C; Tue, 10 Nov 2020 23:47:04 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x142.google.com (mail-lf1-x142.google.com [IPv6:2a00:1450:4864:20::142]) by gabe.freedesktop.org (Postfix) with ESMTPS id 34CC189D5C for ; Tue, 10 Nov 2020 23:47:03 +0000 (UTC) Received: by mail-lf1-x142.google.com with SMTP id l2so689308lfk.0 for ; Tue, 10 Nov 2020 15:47:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BZwpBjCKFkPFg4D+5kgmDyInAjRNL4hw/D5g9alUegs=; b=Ois9Ru3JLPsyJ899x+z10htmSkwf6Ku6x2+jtneNn/D8cLDHx5Uz2jl1BNQ/M/HKXU T3fAd+t0cE8Ao1I73wOHHT/x/mpk0A93IPjf7mCcsyGHdKZRpBWFUf2GMLvA+RYJMBx0 IKXzMXbrzOpC8GSyLxccCbgjeAnTmWGED935igkBFuP2wYNadB2/rHpc/2yAN1mLIH2Q hjnB3khYHaEXeayRKJWwtaaY4fmsHU2Ae4lDGm5+OnxYii7AEsCcRO5JW+/L3+ZH1UQF w9BaWuhLYMrsQ4h2VnQddNVs130Nbpd/ywjqEJOxH5p8dMoJQMTO2IHXUYxFaTrXYNBe Z32g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BZwpBjCKFkPFg4D+5kgmDyInAjRNL4hw/D5g9alUegs=; b=AB4WV+oDDhzgH4h8BCrNWvAfVpWbhO5eDYW0O+j4Z2gIG/GCQePlmf8Ovm9otwMEkb nanilejOUrJHoVS2u/C8yex1D2ohs7L6HTwTIcppjkZP44sZQUL0oJqfUHXik6EVHxfH f4+Gjjmht4c+7QuFl3fgVFaHLEusdvRz9Pqf/vnP/nQvetdlc0I6eT0/DbSVRH+4iw2B b7jjy8oxsnX1zld61iK03K702zl5vE1aQ5OD+ymDi6nyDjAS+wjALprxFMc3lroJH8+O /PcERLBJGxGHdpiYp2mXWqKSmfABKJCyZ24JnITBVbW5NMXqYAO32Q2PFXTNG6E+3Yu+ wvig== X-Gm-Message-State: AOAM532z/XlRi2WD8EVED++xQHnI1ibYey2eFPVz75pypw5L0uB+RK8O QusJXChFO19RU3xuolqxSUf0mA== X-Received: by 2002:a19:5052:: with SMTP id z18mr8104346lfj.574.1605052021569; Tue, 10 Nov 2020 15:47:01 -0800 (PST) Received: from localhost.bredbandsbolaget (c-92d7225c.014-348-6c756e10.bbcust.telenor.se. [92.34.215.146]) by smtp.gmail.com with ESMTPSA id y65sm39883lff.73.2020.11.10.15.47.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 15:47:00 -0800 (PST) From: Linus Walleij To: Thierry Reding , Sam Ravnborg , Stephan Gerhold , =?utf-8?q?Pawe=C5=82_Chmiel?= Subject: [PATCH 2/5] drm/panel: s6e63m0: Implement reading from panel Date: Wed, 11 Nov 2020 00:46:50 +0100 Message-Id: <20201110234653.2248594-3-linus.walleij@linaro.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201110234653.2248594-1-linus.walleij@linaro.org> References: <20201110234653.2248594-1-linus.walleij@linaro.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This code was found in the Samsung vendor tree for the Samsung GT-I9070 mobile phone. Let's support reading before we implement the 3WIRE protocol for both reading and writing. Cc: Stephan Gerhold Cc: Paweł Chmiel Signed-off-by: Linus Walleij --- .../gpu/drm/panel/panel-samsung-s6e63m0-spi.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e63m0-spi.c b/drivers/gpu/drm/panel/panel-samsung-s6e63m0-spi.c index 75f00ed4810b..9e1552a7ccc7 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e63m0-spi.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e63m0-spi.c @@ -13,13 +13,20 @@ static int s6e63m0_spi_dcs_read(struct device *dev, const u8 cmd, u8 *data) { - /* - * FIXME: implement reading DCS commands over SPI so we can - * properly identify which physical panel is connected. - */ - *data = 0; + struct spi_device *spi = to_spi_device(dev); + u16 buf[1]; + u16 rbuf[1]; + int ret; - return 0; + /* SPI buffers are always in CPU order */ + buf[0] = (u16) cmd; + ret = spi_write_then_read(spi, buf, 2, rbuf, 2); + dev_dbg(dev, "READ CMD: %04x RET: %04x\n", buf[0], rbuf[0]); + if (!ret) + /* These high 8 bits of the 9 contains the readout */ + *data = (rbuf[0] & 0x1ff) >> 1; + + return ret; } static int s6e63m0_spi_write_word(struct device *dev, u16 data) From patchwork Tue Nov 10 23:46:51 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 322906 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp657520ils; Tue, 10 Nov 2020 15:47:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJwpsJewkTW+G9XU5imAh3TZJ8IWNyTOQI26f976nQBTrPr1sfVgkgwcNWkfy8L/QMy5etIP X-Received: by 2002:a17:90a:eb02:: with SMTP id j2mr688289pjz.136.1605052028876; Tue, 10 Nov 2020 15:47:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605052028; cv=none; d=google.com; s=arc-20160816; b=bqYk0e50p1LPAriWf9btOJ+SQY0vk07h4DPYtLfizkR7n0Y+8edRgiwYicizGwpH+O vnY0wfAOjVTrqcdVBxO2mN5L2Lgnuh460s7sPOlcMloKQyqzXYAk5DAYGJ4F7SxfsDCf v2G1nVgCbOLa87kFgjQO+FV2OSX9uAS/iSoYxSJxzB1djDATK7srEnnyac2E14hi/iwn 1CK+hGcq4c0awulMO1l1g1BJMXy/ncJacNhWsRFG+2OT2StwDt6m5UeXpqbPByqKF9X2 y67DpNOgaod5k9UHod4L18VIHnyCTn3PHeAsWznPkjippiQCwbjE3Oy6kJHwbKXXusoF HIQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:delivered-to; bh=ZfDWM7PBd6BpAhFupG2ozO9SSfqepOyghdAriVUjG2M=; b=h8Mb3HxMZhbv5pUfyiTFxPK6ZEiasZsuJ+XbC45wIhxpnvDjhiK7AwVD92CX5KRIfw i2k5cNSMmWhq6K0eQIM+a98Rppni4ny+Bt1pt+PYn6SA8itrvz8gIi4zWlasB0uIj4/j CiezMSUI0n1BxaP2kHB55A4X3c6nCjJ0mRgZ43MizAx+vKrY8Pcf/CSQiF7XuXRJWFcA HHAPbqTUi/dCuKy7O9jqksb/ZEHsXeZvWhq6eJ3vBPPfa82TVLg64K0Ep9KpcuASzb+W Ca+YW12GZv28kzFsVrxd1BTfCtR8fc2HwPYvzryloLJf2+lrHwUaJLbyXvPvvFG1btqA Cj9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=U9ihdXyD; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id x11si139323plb.439.2020.11.10.15.47.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 15:47:08 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=U9ihdXyD; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BBD5689D61; Tue, 10 Nov 2020 23:47:06 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id EFB3D89D60 for ; Tue, 10 Nov 2020 23:47:04 +0000 (UTC) Received: by mail-lj1-x244.google.com with SMTP id o24so10135782ljj.6 for ; Tue, 10 Nov 2020 15:47:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=E1gRUn+R+klQwSA/hEFGmAtJ4OnicYEWs/eLK/JMuQY=; b=U9ihdXyD1urh+RHMp9iS7+yRg5oU1dA1y2MstjcSTXJ/aqTwr7ziS1Bfr9pmwaGQ4r 88uJuihEMFiDn0RNYkbZp585ls0glQXr3FPPC4Cqo4uKvehn4d4/kxIX4+goPiPV860a SLu7/fEeVaJ7q1Gp/wzZhzjoesA7nKt0QYPBPV9Yz6bzQ7kk/xit3DFfDz0/nN4aNAxR 8mXYseGVARTmwrSkzZgmu/7iqcN7jodaH3bVR8/Y01uL1EbpwNJBnHRp5clYuBkHaxf5 9qSeHCPvYCFpIBmh3EZD0rrZuEpCVQcPqTo2bxRjV4M1o+JUK3XZ43dmA43n5WlUd8Q+ bNIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=E1gRUn+R+klQwSA/hEFGmAtJ4OnicYEWs/eLK/JMuQY=; b=im9CRrSeABrtW+rTTEM5vnjF+HlsflvWWzG7h+akNjp2I4R8eYtpcaBsNVeXFXt0IX K47EQ5CqsyXTcPruNCZfc6ZxEAt/W8hKyVVue11UC0qLfJ1mHmjQ6jYsvIGZo0dPwpfc DePahqS7k8/EvslJkVuyEn5DS/4kbf+mQ688EhcVVPpjzRrhOTjnFlKjGSqmztI6FOYW W/zd3eNC/m9QCGV9+QehZnxpVscj8fxQTv9y7dLQNdwG8xVTE8xP7ICn+tM5n+todKOP SPFi5v8y7HthWOCu04g5iff4jvwd6MiacY6w766t8JiRa8uwcRBGw/cuwwt3gxyAKcXE HKxw== X-Gm-Message-State: AOAM530OYxy5NkRYBWSoXmkovcOJv0auv7g1BtEcOhgAUrnXCQcDEY/i uAK4LG9bWz8N0S1escyNBQ1l2w== X-Received: by 2002:a2e:b536:: with SMTP id z22mr9602614ljm.177.1605052023412; Tue, 10 Nov 2020 15:47:03 -0800 (PST) Received: from localhost.bredbandsbolaget (c-92d7225c.014-348-6c756e10.bbcust.telenor.se. [92.34.215.146]) by smtp.gmail.com with ESMTPSA id y65sm39883lff.73.2020.11.10.15.47.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 15:47:02 -0800 (PST) From: Linus Walleij To: Thierry Reding , Sam Ravnborg , Stephan Gerhold , =?utf-8?q?Pawe=C5=82_Chmiel?= Subject: [PATCH 3/5] drm/panel: s6e63m0: Add some explanations Date: Wed, 11 Nov 2020 00:46:51 +0100 Message-Id: <20201110234653.2248594-4-linus.walleij@linaro.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201110234653.2248594-1-linus.walleij@linaro.org> References: <20201110234653.2248594-1-linus.walleij@linaro.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The SPI DCS code was a bit hard to understand as the device accepts 9-bit transfers packed into 16-bit words with the most significant bit in bit 9 of the 16-bit word. Add some clarifying comments. Cc: Stephan Gerhold Cc: Paweł Chmiel Signed-off-by: Linus Walleij --- drivers/gpu/drm/panel/panel-samsung-s6e63m0-spi.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e63m0-spi.c b/drivers/gpu/drm/panel/panel-samsung-s6e63m0-spi.c index 9e1552a7ccc7..e47647f418ff 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e63m0-spi.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e63m0-spi.c @@ -42,10 +42,17 @@ static int s6e63m0_spi_dcs_write(struct device *dev, const u8 *data, size_t len) int ret = 0; dev_dbg(dev, "SPI writing dcs seq: %*ph\n", (int)len, data); + + /* + * This sends 9 bits with the first bit (bit 8) set to 0 + * This indicates that this is a command. Anything after the + * command is data. + */ ret = s6e63m0_spi_write_word(dev, *data); while (!ret && --len) { ++data; + /* This sends 9 bits with the first bit (bit 8) set to 1 */ ret = s6e63m0_spi_write_word(dev, *data | DATA_MASK); } From patchwork Tue Nov 10 23:46:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 322907 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp657545ils; Tue, 10 Nov 2020 15:47:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJwyfkfjnRTX072ktyL4N0gfSFTaoe/PZP72gVmpUdTU6C9goxvg9HxWdLRz8O1owSj1nfiB X-Received: by 2002:a62:52d7:0:b029:18b:7093:fb88 with SMTP id g206-20020a6252d70000b029018b7093fb88mr20586425pfb.76.1605052030989; Tue, 10 Nov 2020 15:47:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605052030; cv=none; d=google.com; s=arc-20160816; b=XnFtHESbXoKh2ByfhqXp4gwFQaAWdM65dUc+aiz5uNWzPjUtf+nJv+/0nTUCgYpZX7 PVoHAe52mZv/e+w7ffJaCy2vb+/i52b4NfpSFcIQcCTlXS4mhn8dv7T6dwJNOdqRi3sD X50vtNzJ3gymXAxeArFl+W2c2YlGghf6Ru+++aHjGy5PogWpDAYnH8OkOxn62HmLa3mq d82RwRWOdo/7XCAOKndzBrr4R4LJ2r9FqzqlUj4sRFIMS5KbDFTmc7K8W6jo6BVMAiD9 OokYj+HTdv/yUfJ07CDlbzBwwMCkxgGYQ1E4ov/n67BLeTC9zUZNKJxxPXnc4hWksI8W N0Gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:delivered-to; bh=9zR0pqte6dso9wzfM4Yc8pYAVYktZ7kesOY5zDWcccA=; b=Ru+UDv/3YWGqZUgPoRR4w0kfyhZq9d79vqS7iLdCwT+dI0f6IfVDkiTXUEfWaBxFqk UVSyU0NiXU9dARPl77WVJSenqOafDY2shZELTDf2wW/vNhAyo0cjBp6ZGZBN1DYmwCAf m1uKq3DhXiT0v9223xdMm57fyYaIYY6FOki65Ql7tvQz7yylEJvYh7ArNrzQwcnDFO5d kmERAYeo2etg57V5YDRAtWqJG54Rpn4BAhvttgviHRRbT5cfBTRstKbztMUKXadf6mZD nUj6MST6kkwW+iR4DgniVCqSe/pzxPC6TVDwc30DggN2GTq2Z62bygU4F0fgKuBR1qtF YnXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=YC3lkdEJ; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id ay1si181922plb.21.2020.11.10.15.47.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 15:47:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=YC3lkdEJ; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 30F1089D64; Tue, 10 Nov 2020 23:47:09 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id C626389D63 for ; Tue, 10 Nov 2020 23:47:06 +0000 (UTC) Received: by mail-lj1-x242.google.com with SMTP id b17so4197283ljf.12 for ; Tue, 10 Nov 2020 15:47:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GSgt/pPBiOJZ6llJdG2JMoW9+H1DFAY+cbBM7SnOX6s=; b=YC3lkdEJ3jzc+Wi6dNJdRwwt0CgK2Ay+vzqMAyNvVymYQu5s5jL/Xf2/5+16rxfAF8 7OHX3EAwWqMgrU6MGDtPx/z3icV8zckmYbUivHsWGu4LsOKHnR5dCqJYAiVVpX5lpa4j pY9tjHJoTs2KtmeGJzhpuMG3BdREhQ0nnMUct7GT+Mx0TQEF69OHpD++QQePuXgrxGsM edb6Ng8x/WK13sgBapkwT4uElVBJ+D1ci1nZwVSTfZ10tMiu+VjGgMbvdngYqKVWeVZp TYmIofOZI6LndFHOkGBgo2hl+TanJnDtchqILKrWYq3s8Fox/8cxc1Av3jUxjzOQyEvu 55IA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GSgt/pPBiOJZ6llJdG2JMoW9+H1DFAY+cbBM7SnOX6s=; b=jFsixtZmLg58XP+rrHexf2FANAtAuGCGHbv49eYYVG7ZwY6upGJAMoi57tJYcd062t /pKf7wPyFNDpgApcyKegu3rIk4B8nFgJt/sJS8jVew0DWQdrdb3fIwRSG9PgdtwtYIJ3 UusDuAZ8HK89IO1ZN10C1lAzCI9a1q6riFa8+ULCrQ8XZV1S9PM2hwq9QUrkjmwY+efR ApnNHmV3XrTTgyN2Ent0YoVmWqkRawqzDxeP/T5/+tpJ5MV9+007ovnHg47Yqo7jPX7M 6XWeA1WIm1F4OHsqUygDLePrfR0oBNGUAA0+NqX6YQIm00EGj45P7uRouGM4dssKnFw+ ussQ== X-Gm-Message-State: AOAM531QlyEHAvEbXmQUfNHiMb8BuuTP2Ms9+CGeJ2mzsS29jvCaS9Nt 0LRGLy6tl4YCS+PRVfUpfEI9G6Se+qPGtpKX X-Received: by 2002:a2e:9798:: with SMTP id y24mr8619126lji.341.1605052025204; Tue, 10 Nov 2020 15:47:05 -0800 (PST) Received: from localhost.bredbandsbolaget (c-92d7225c.014-348-6c756e10.bbcust.telenor.se. [92.34.215.146]) by smtp.gmail.com with ESMTPSA id y65sm39883lff.73.2020.11.10.15.47.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 15:47:04 -0800 (PST) From: Linus Walleij To: Thierry Reding , Sam Ravnborg , Stephan Gerhold , =?utf-8?q?Pawe=C5=82_Chmiel?= Subject: [PATCH 4/5] drm/panel: s6e63m0: Support 3WIRE protocol Date: Wed, 11 Nov 2020 00:46:52 +0100 Message-Id: <20201110234653.2248594-5-linus.walleij@linaro.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201110234653.2248594-1-linus.walleij@linaro.org> References: <20201110234653.2248594-1-linus.walleij@linaro.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The panel can be connected using 3WIRE, then it is however necessary that the flag SPI_3WIRE is preserved on the device, as we set this from generic device tree parsing code (or similar). Just |= the SPI mode. Cc: Stephan Gerhold Cc: Paweł Chmiel Signed-off-by: Linus Walleij --- drivers/gpu/drm/panel/panel-samsung-s6e63m0-spi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e63m0-spi.c b/drivers/gpu/drm/panel/panel-samsung-s6e63m0-spi.c index e47647f418ff..b1adf8f89c62 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e63m0-spi.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e63m0-spi.c @@ -72,7 +72,8 @@ static int s6e63m0_spi_probe(struct spi_device *spi) int ret; spi->bits_per_word = 9; - spi->mode = SPI_MODE_3; + /* Preserve e.g. SPI_3WIRE setting */ + spi->mode |= SPI_MODE_3; ret = spi_setup(spi); if (ret < 0) { dev_err(dev, "spi setup failed.\n"); From patchwork Tue Nov 10 23:46:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 322908 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:5ce:0:0:0:0 with SMTP id l14csp657571ils; Tue, 10 Nov 2020 15:47:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJxu6JFiSrBJWYHk47n94CLbo4bV6k8ZtsbL+lSYCyfFFgOhfqPJFG26rzu3dEUPew70rPm+ X-Received: by 2002:a17:90a:f298:: with SMTP id fs24mr678488pjb.109.1605052033916; Tue, 10 Nov 2020 15:47:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605052033; cv=none; d=google.com; s=arc-20160816; b=BLUHHdufrTsJo5y9ki1NWpuiw14d1uFVBUMAH5vL8tvcUww+wnaGyzyynyHaIcT+dn V6OWBQ3a4e4oKJbKuNz+4XCBu8XvSqSPDPh1/pwAQnYPWB2XQHv7pGS/7/vCoGFYuvFJ ir/9tzI0UidSZibgIG1fG1qf2gCqZpmZ+klk1PYYzFpGlfNZDeMGkfZq9n5ZnX7h4Q62 0hp2QJV3HMcmD1NGtaGZxZA/sCkvfphU/sYvbKga8cPgPgWWapgOPNuwklatNrWai9W2 NaIyCWdvZEvfJsfxr2Aj/vM49CowkxWZ9GojSf7ufz28qM1HwBGFvu2gVfkgmZ6tq/PO dAuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:delivered-to; bh=+xreh3/KzdpT15/qpyEXrMaM8PB4ab7SGlkc9mVNM7A=; b=DEx4i0e8ERMFMbmtK0dQLbaHQmmjmHYBPhtmLYVklp0RCaN6AaZCJetr8IllqoNX/A AU5laL8Wh1MsUQqAmKsf3xBw4nWuBqs3GoUGrY5X7IAClSWGFyFtMKjeJRsAytgSKiIS DR8SrNdG/lslq0FDtH9NQvGqydlzsLoCnUh7+xVHXtF/bYKcihaNbRr+bwETdk4mAyvU 9zH07Z/J4Ltu1VxQaV9YcSAlKYvz+yby2HzCJHAhgxDyh4u5SdMmJVkNAEnya0xg9WT1 aWx9VwdiQoaLGbcXUD2wQI5j2FnSypdmSDxc9KuKSYQ/w9JB8dn8svFSRqFszEHFJxuL FcDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=SVOdJook; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id e13si79831pgl.142.2020.11.10.15.47.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 15:47:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=SVOdJook; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E377089D66; Tue, 10 Nov 2020 23:47:12 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by gabe.freedesktop.org (Postfix) with ESMTPS id 67D0A89D60 for ; Tue, 10 Nov 2020 23:47:08 +0000 (UTC) Received: by mail-lf1-x144.google.com with SMTP id s30so660446lfc.4 for ; Tue, 10 Nov 2020 15:47:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CFh/nhcwrF/c3LgZHhdLXiie2alaqfhVgce5eQpdRHk=; b=SVOdJook6lyRlymtqkNVft9OI32xfV6qDjHZroYCvEw6pjPKgNrxqKJ15DKV0Xf9Hw 223YRkoekys/xGVZEnW5jp7eNTI70Yobtnm2XbC3vbU22lCEcWhfi0WP6w/R05xjPIHe jV4Awr0fhMD2V+2ytKr8stPRzDaM5/i9hyA5+nwc5MnMa2Rv57UoHFoGbdVLDoFE6UCE IpaOCoXhTVL07fjtivvTpfojiFk9HBKI3s+VpD37/RVcDbaGQz2QgBI6gnVfxRW4Bm/5 kEYbcZtNE2UkPc8SLvvaBgl2MuAY/KoS6W9DLTn1Bd8zEu7vnReTC7O1HWQ/Qj7m66Wd sasg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CFh/nhcwrF/c3LgZHhdLXiie2alaqfhVgce5eQpdRHk=; b=uby/IIhqBcWvPRTGF6kbkmCv/LFmN5F3CZcnYcxNhwCbJ9b3D2cm7x2nYAIOIOFlnS qTvU5nWuoqINCfctQzzG/2F0QsSmzXVS4LHu3ygVOhJYgK8sjFlphGDF9Bo/HoujO/Sx sTeqcYE9Pe/usJ3DxKw/x+ICvKuuq3IbW7e/ZRJdvQK96EdTnEjfLJKL8yMgFr6D8/uy DTsgSJWGGz9/z5gj1sHlRE8VjrLniZtN4VPazoAWhKqBFQvZYiBKdp2UGZnfPexsgHrc q1osTiLwbEvLu4Hw0pTODKoAJQeWU9NnMBci/IC3mDHuYrtTIrwjkKt6764XXilco2Yl 6Mtw== X-Gm-Message-State: AOAM532/ot84SI4+IS6xrZp2JleW9a8reuhnw0TY0qp8AIS5/WfZ/hfq ceq6kzBfs7AIK3k5ydfs6YZQEQ== X-Received: by 2002:ac2:568b:: with SMTP id 11mr7560047lfr.397.1605052026854; Tue, 10 Nov 2020 15:47:06 -0800 (PST) Received: from localhost.bredbandsbolaget (c-92d7225c.014-348-6c756e10.bbcust.telenor.se. [92.34.215.146]) by smtp.gmail.com with ESMTPSA id y65sm39883lff.73.2020.11.10.15.47.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 15:47:06 -0800 (PST) From: Linus Walleij To: Thierry Reding , Sam Ravnborg , Stephan Gerhold , =?utf-8?q?Pawe=C5=82_Chmiel?= Subject: [PATCH 5/5] drm/panel: s6e63m0: Set up some display info Date: Wed, 11 Nov 2020 00:46:53 +0100 Message-Id: <20201110234653.2248594-6-linus.walleij@linaro.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20201110234653.2248594-1-linus.walleij@linaro.org> References: <20201110234653.2248594-1-linus.walleij@linaro.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Copy over the width/height in millimeters to the (somewhat redundant) display info, and set up the bus format and bus flags for the display. When used as DPI this display requires DE to be active low and pixel data to be output on the negative edge. It might be that it was previously used with a display controller that either does not support these settings or was hardcoded to use these as default. This information comes from the source code of the Samsung GT-I9070 mobile phone. Cc: Stephan Gerhold Cc: Paweł Chmiel Signed-off-by: Linus Walleij --- drivers/gpu/drm/panel/panel-samsung-s6e63m0.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e63m0.c b/drivers/gpu/drm/panel/panel-samsung-s6e63m0.c index 3eee67e2d86a..210e70da3a15 100644 --- a/drivers/gpu/drm/panel/panel-samsung-s6e63m0.c +++ b/drivers/gpu/drm/panel/panel-samsung-s6e63m0.c @@ -16,6 +16,7 @@ #include #include #include +#include #include