devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Noralf Trønnes" <noralf@tronnes.org>
To: David Lechner <david@lechnology.com>,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	limor@ladyada.net
Cc: Mark Rutland <mark.rutland@arm.com>,
	Rob Herring <robh+dt@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/3] drm/tinydrm: add driver for ST7735R panels
Date: Sun, 31 Dec 2017 17:19:04 +0100	[thread overview]
Message-ID: <2f28d0d7-2074-2e5c-4026-56143ec6ccd6@tronnes.org> (raw)
In-Reply-To: <2f63be06-f9b2-2103-888c-e3f49c40fe82@lechnology.com>


Den 21.12.2017 20.35, skrev David Lechner:
> On 12/21/2017 01:23 PM, David Lechner wrote:
>> This adds a new driver for Sitronix ST7735R display panels.
>>
>> This has been tested using an Adafruit 1.8" TFT.
>>
>> Signed-off-by: David Lechner <david@lechnology.com>
>> ---
>
> <snip>
>
>> +    mipi_dbi_command(mipi, ST7735R_GAMCTRP1, 0x0f, 0x1a, 0x0f, 0x18, 
>> 0x2f,
>> +             0x28, 0x20, 0x22, 0x1f, 0x1b, 0x23, 0x37, 0x00, 0x07,
>> +             0x02, 0x10);
>> +    mipi_dbi_command(mipi, ST7735R_GAMCTRN1, 0x0f, 0x1b, 0x0f, 0x17, 
>> 0x33,
>> +             0x2c, 0x29, 0x2e, 0x30, 0x30, 0x39, 0x3f, 0x00, 0x07,
>> +             0x03, 0x10);
> By the way, how do you know what is the "right" gamma curve? I think I 
> copied this from the generic st7735r driver in fbtft, but I noticed 
> that there is also a different curve for the Adafruit 1.8" display in 
> fbtft. I'm wondering if I should have used that one instead. I can't 
> really tell a difference looking at the display.

 From what I can tell this is the curve used by the Arduino library:

https://github.com/adafruit/Adafruit-ST7735-Library/blob/master/Adafruit_ST7735.cpp

static const uint8_t PROGMEM
   Rcmd3[] = {                 // Init for 7735R, part 3 (red or green tab)
     4,                        //  4 commands in list:
     ST7735_GMCTRP1, 16      , //  1: Magical unicorn dust, 16 args, no 
delay:
       0x02, 0x1c, 0x07, 0x12,
       0x37, 0x32, 0x29, 0x2d,
       0x29, 0x25, 0x2B, 0x39,
       0x00, 0x01, 0x03, 0x10,
     ST7735_GMCTRN1, 16      , //  2: Sparkles and rainbows, 16 args, no 
delay:
       0x03, 0x1d, 0x07, 0x06,
       0x2E, 0x2C, 0x29, 0x2D,
       0x2E, 0x2E, 0x37, 0x3F,
       0x00, 0x00, 0x02, 0x10,

void Adafruit_ST7735::initR(uint8_t options) {
   commonInit(Rcmd1);
...
   commandList(Rcmd3);


Noralf.

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-12-31 16:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-21 19:23 [PATCH v3 0/3] DRM driver for Sitronix ST7735R display panels David Lechner
2017-12-21 19:23 ` [PATCH v3 1/3] dt-bindings: add jianda vendor prefix David Lechner
     [not found]   ` <1513884233-31540-2-git-send-email-david-nq/r/kbU++upp/zk7JDF2g@public.gmane.org>
2017-12-26 21:52     ` Rob Herring
2017-12-21 19:23 ` [PATCH v3 2/3] dt-bindings: Add binding for Sitronix ST7735R display panels David Lechner
2017-12-26 18:39   ` Rob Herring
2017-12-21 19:23 ` [PATCH v3 3/3] drm/tinydrm: add driver for ST7735R panels David Lechner
     [not found]   ` <1513884233-31540-4-git-send-email-david-nq/r/kbU++upp/zk7JDF2g@public.gmane.org>
2017-12-21 19:35     ` David Lechner
2017-12-31 16:19       ` Noralf Trønnes [this message]
2017-12-31 16:17   ` Noralf Trønnes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2f28d0d7-2074-2e5c-4026-56143ec6ccd6@tronnes.org \
    --to=noralf@tronnes.org \
    --cc=david@lechnology.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=limor@ladyada.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).