linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nam Cao <namcao@linutronix.de>
To: Bram Vlerick <bram.vlerick@openpixelsystems.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
	linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: fbtft: add invert display parameter
Date: Wed, 28 May 2025 22:25:18 +0200	[thread overview]
Message-ID: <20250528202518.Kq5YuwFq@linutronix.de> (raw)
In-Reply-To: <20250528-ili9341-invert-dtb-v1-1-080202809332@openpixelsystems.org>

On Wed, May 28, 2025 at 05:42:30PM +0200, Bram Vlerick wrote:
> Add devicetree parameter to enable or disable the invert feature of the
> ili9341 display

Can't/shouldn't this be done by userspace application? Why would someone
want to invert the color by default.

Also, this driver is built on top of the deprecated framebuffer, it will
never get out of staging/. For new feature, you probably want to send it to
drivers/gpu/drm/panel/panel-ilitek-ili9341.c instead.

> Signed-off-by: Bram Vlerick <bram.vlerick@openpixelsystems.org>
> ---
>  drivers/staging/fbtft/fb_ili9341.c | 3 +++
>  drivers/staging/fbtft/fbtft-core.c | 2 ++
>  drivers/staging/fbtft/fbtft.h      | 3 +++
>  3 files changed, 8 insertions(+)
> 
> diff --git a/drivers/staging/fbtft/fb_ili9341.c b/drivers/staging/fbtft/fb_ili9341.c
> index 47e72b87d76d996111aaadcf5e56dfdfc1c331ab..a184f57df12b5ad6612a2e83b664a8911c7c79be 100644
> --- a/drivers/staging/fbtft/fb_ili9341.c
> +++ b/drivers/staging/fbtft/fb_ili9341.c
> @@ -103,6 +103,9 @@ static int set_var(struct fbtft_par *par)
>  		break;
>  	}
>  
> +	if (par->invert)
> +		write_reg(par, 0x21);

Use MIPI_DCS_ENTER_INVERT_MODE instead of the magic number.

Best regards,
Nam

      parent reply	other threads:[~2025-05-28 20:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-28 15:42 [PATCH] staging: fbtft: add invert display parameter Bram Vlerick
2025-05-28 19:38 ` Dan Carpenter
2025-05-28 20:25 ` Nam Cao [this message]

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=20250528202518.Kq5YuwFq@linutronix.de \
    --to=namcao@linutronix.de \
    --cc=bram.vlerick@openpixelsystems.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /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).