mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Rosin <peda@axentia.se>
To: linux-kernel@vger.kernel.org
Cc: Peter Rosin <peda@axentia.se>,
	Boris Brezillon <boris.brezillon@free-electrons.com>,
	David Airlie <airlied@linux.ie>,
	Daniel Vetter <daniel.vetter@intel.com>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	Sean Paul <seanpaul@chromium.org>,
	dri-devel@lists.freedesktop.org
Subject: [RFC PATCH v2 0/3] drm: atmel-hlcdc: clut support
Date: Sat, 17 Jun 2017 19:48:01 +0200	[thread overview]
Message-ID: <1497721684-3002-1-git-send-email-peda@axentia.se> (raw)

Hi!

This series adds support for an 8-bit clut mode in the atmel-hlcdc
driver.

I have only tested it with the fbdev interface, and am therefore not
really sure if it works w/o patch 2 and 3. One significant reason for
that is that the modetest test program in libdrm does not support clut
modes like C8.

Also, when using it with the fbdev emulation layer, something seems
to allocate the first 16 clut entries, which throws my users of
ioctl(fb, FBIOPUTCMAP, ...) when index 0 in the given clut is
really pixel value 16. If anyone can shed some light on that, I'd
be most greatful!

Changes since v1:

- Move the clut update from atmel_hlcdc_crtc_mode_valid to
  atmel_hlcdc_plane_atomic_update.
- Add default .gamma_set helper (drm_atomic_helper_legacy_gamma_set).
- Don't keep a spare copy of the clut, reuse gamma_store instead.
- Don't try to synchronize the legacy fb clut with the drm clut.

I'm obvously new to this part of the kernel, but I'm beginning to
think that perhaps the .gamma_set and .gamma_get implementations
that I add in patch 3/3 are generic enough to just be default
helper implementations? Then, all the spilt guts in patch 2/3
could be kept internal. But, I don't know if those are generic
enough implementations to be suitable as defaults...

Oh right, I forgot to mention this in v1, but I have not added any
.clut_offset to the overlay2 layer of sama5d4, since the chip does
not appear to have that layer. I didn't do that to make it easier
to work with the two patches, but I suspect bad things may happen
to sama5d4 users if they do not have that layer removed.

Cheers,
peda

Peter Rosin (3):
  drm: atmel-hlcdc: add support for 8-bit color lookup table mode
  drm/fb-cma-helper: expose more of fb cma guts
  drm: atmel-hlcdc: add clut support for legacy fbdev

 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c  | 58 +++++++++++++++++++++++++
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c    | 25 ++++++++++-
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h    | 20 +++++++++
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 29 +++++++++++++
 drivers/gpu/drm/drm_fb_cma_helper.c             | 55 ++++++++++++++++++-----
 include/drm/drm_fb_cma_helper.h                 |  8 +++-
 6 files changed, 182 insertions(+), 13 deletions(-)

-- 
2.1.4

             reply	other threads:[~2017-06-17 17:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-17 17:48 Peter Rosin [this message]
2017-06-17 17:48 ` [RFC PATCH v2 1/3] drm: atmel-hlcdc: add support for 8-bit color lookup table mode Peter Rosin
2017-06-20  9:40   ` Daniel Vetter
2017-06-20  9:55     ` Peter Rosin
2017-06-21  7:04       ` Daniel Vetter
2017-06-17 17:48 ` [RFC PATCH v2 2/3] drm/fb-cma-helper: expose more of fb cma guts Peter Rosin
2017-06-17 17:48 ` [RFC PATCH v2 3/3] drm: atmel-hlcdc: add clut support for legacy fbdev Peter Rosin
2017-06-20  9:38   ` Daniel Vetter

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=1497721684-3002-1-git-send-email-peda@axentia.se \
    --to=peda@axentia.se \
    --cc=airlied@linux.ie \
    --cc=boris.brezillon@free-electrons.com \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=seanpaul@chromium.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

all inboxes | Powered by JetHome®