Hi,
I've been working on a tinydrm-based driver for black/white/red, b/w/yellow and b/w epaper displays made by good display[sic!][0]. These panels are fairly popular since waveshare[1] sells raspberry pi and arduino-compatible breakout boards with them.
The current state of the art in open source software as well as the vendors examples on how to drive these seems to be "pour some fairy dust into /dev/mem". This cannot stand, so here is a (tested, working) tinydrm driver. I've got working …
[View More]color output on two black/white/red panels (2.7" and 4.2") from python[2], and I have a kernel console showing up[3,4] and I can print colorful cows using cowsay and some ANSI escape sequences[5].
In this rfc patch I've added a couple ioctls to allow userspace to control refresh behavior. IMO this is necessary for a fully working driver: These displays support partial refresh, and you can use that to do proper animations[6]. But for this to work, you need to fine-tune the display's driving waveforms depending on the content displayed.
I have a couple of questions regarding this driver, thus the RFC:
(1) By default, when loading the module a vt console binds to the fb. I think this is useful, but the cursor blink of the vt leads to an eternal refresh loop. Refresh on these displays is *extremely* slow (1 frame per 15s), so ideally I'd want the cursor to not blink. Is there some nice way to tell the vt/console driver to do this by default?
(2) Is ioctl the correct interface for the driving waveform/refresh stuff?
(3) I read that any drm driver has to be committed along with a libdrm implementation. I think the most likely interface for anyone to interact with this driver would be the fb dev. Do I have to make some userspace implementation as well anyway? If so, where would that go: libdrm or some sort of new libepaper?
(4) The driver accepts both XRGB8888 and RGB565 (for compatibility with small LCDs). The driver's current approach to calculate a b/w/r "ternary" image from this data is to just take the MSBs of each color component, then make anything red (R>127, G,B<=127) red, anything black (R,G,B each <=127) black and anything else white. This is since the display's default state is white, and a pixel can turn either red or black from that. Note that it's the actual pixel changing color, i.e. there is no black and red sub-pixels. If you try to drive black and red at the same time, the chip just selects red for that pixel. What are your thoughts on this interface? I was thinking about using some indexed color mode, but that would limit possible future grayscale support[7].
The following patches all apply on v5.2. This is my first linux driver, so please be gentle but please do point out all my mistakes :) I'm aware the dt binding doc is still lacking.
Best regards,
Jan Sebastian Götte
[0] https://www.good-display.com/
[1] https://www.waveshare.com/product/modules/oleds-lcds/e-paper.htm
[2] https://blog.jaseg.net/images/epaper3.jpg
[3] https://blog.jaseg.net/images/epaper1.jpg
[4] https://blog.jaseg.net/images/epaper2.jpg
[5] https://blog.jaseg.net/images/epaper4.jpg
[6] https://www.youtube.com/watch?v=MsbiO8EAsGw
[7] https://github.com/zkarcher/FancyEPD
[View Less]
This series adds new BO allocation flags PANFROST_BO_HEAP and
PANFROST_BO_NOEXEC. The heap allocations are paged in on GPU page faults.
Hopefully, this is the last version, but I made a few changes after
implementing per FD address spaces on top of this. Primarily, I moved the
GPU VA mapping into GEM open/close functions. This is a bit cleaner and
will work when we need access to per FD objects.
I also found a problem with how the GPU reset is handled with the MMU.
With the move to a threaded …
[View More]irq handler, it's not okay to unmask the MMU
at any time as was possible with panfrost_mmu_enable() calls. The result
was some consolidation of the reset calls.
Tomeu, I don't think there should be any changes in test results, but I
didn't add your tested-by as there are a few too many changes that I felt
comfortable with. I did test this with your series.
This is based on drm-misc-next. An updated branch is here[1].
v4:
- Move GPU VA mapping/unmapping to GEM open/close
- Add rework of reset handling.
- Rebased on top of madvise support
v3:
- Retain shared irq support, splitting IRQ changes to separate patch (6/8)
- Stop leaking SG tables
- Prevent mmap and pinning pages for heap BOs
Rob
[1] git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git panfrost/heap-noexec
Rob Herring (9):
drm/gem: Allow sparsely populated page arrays in drm_gem_put_pages
drm/shmem: Put pages independent of a SG table being set
drm/panfrost: Restructure the GEM object creation
drm/panfrost: Split panfrost_mmu_map SG list mapping to its own
function
drm/panfrost: Add a no execute flag for BO allocations
drm/panfrost: Consolidate reset handling
drm/panfrost: Convert MMU IRQ handler to threaded handler
drm/panfrost: Add support for GPU heap allocations
drm/panfrost: Bump driver version to 1.1
drivers/gpu/drm/drm_gem.c | 3 +
drivers/gpu/drm/drm_gem_shmem_helper.c | 4 +-
drivers/gpu/drm/panfrost/TODO | 2 -
drivers/gpu/drm/panfrost/panfrost_device.c | 16 +-
drivers/gpu/drm/panfrost/panfrost_device.h | 1 +
drivers/gpu/drm/panfrost/panfrost_drv.c | 65 +++++--
drivers/gpu/drm/panfrost/panfrost_gem.c | 138 ++++++++++---
drivers/gpu/drm/panfrost/panfrost_gem.h | 17 +-
drivers/gpu/drm/panfrost/panfrost_job.c | 7 +-
drivers/gpu/drm/panfrost/panfrost_mmu.c | 216 +++++++++++++++++----
drivers/gpu/drm/panfrost/panfrost_mmu.h | 3 +-
include/uapi/drm/panfrost_drm.h | 3 +
12 files changed, 374 insertions(+), 101 deletions(-)
--
2.20.1
[View Less]
Hi Dave, Daniel,
Same request as earlier, but with the readq/writeq stuff resolved and 5.3-rc3
backmerged. diffstat trimmed for size.
The following changes since commit 41a5a2a8531f95d18bb4efddea581ccb469e8ee5:
drm/amd/display: init res_pool dccg_ref, dchub_ref with xtalin_freq (2019-07-18 14:12:08 -0500)
are available in the Git repository at:
git://people.freedesktop.org/~agd5f/linux tags/drm-next-5.4-2019-08-09
for you to fetch changes up to …
[View More]3f61fd41f38328f0a585eaba2d72d339fe9aecda:
Merge tag 'v5.3-rc3' into drm-next-5.4 (2019-08-09 13:07:28 -0500)
----------------------------------------------------------------
drm-next-5.4-2019-08-09:
Same as drm-next-5.4-2019-08-06, but with the
readq/writeq stuff fixed and 5.3-rc3 backmerged.
amdgpu:
- Add navi14 support
- Add navi12 support
- Add Arcturus support
- Enable mclk DPM for Navi
- Misc DC display fixes
- Add perfmon support for DF
- Add scatter/gather display support for Raven
- Improve SMU handling for GPU reset
- RAS support for GFX
- Drop last of drmP.h
- Add support for wiping memory on buffer release
- Allow cursor async updates for fb swaps
- Misc fixes and cleanups
amdkfd:
- Add navi14 support
- Add navi12 support
- Add Arcturus support
- CWSR trap handlers updates for gfx9, 10
- Drop last of drmP.h
- Update MAINTAINERS
radeon:
- Misc fixes and cleanups
- Make kexec more reliable by tearing down the GPU
ttm:
- Add release_notify callback
uapi:
- Add wipe memory on release flag for buffer creation
----------------------------------------------------------------
[View Less]
From: John Hubbard <jhubbard(a)nvidia.com>
Hi,
These are best characterized as miscellaneous conversions: many (not all)
call sites that don't involve biovec or iov_iter, nor mm/. It also leaves
out a few call sites that require some more work. These are mostly pretty
simple ones.
It's probably best to send all of these via Andrew's -mm tree, assuming
that there are no significant merge conflicts with ongoing work in other
trees (which I doubt, given that these are small changes).
…
[View More]These patches apply to the latest linux.git. Patch #1 is also already in
Andrew's tree, but given the broad non-linux-mm Cc list, I thought it
would be more convenient to just include that patch here, so that people
can use linux.git as the base--even though these are probably destined
for linux-mm.
This is part a tree-wide conversion, as described in commit fc1d8e7cca2d
("mm: introduce put_user_page*(), placeholder versions"). That commit
has an extensive description of the problem and the planned steps to
solve it, but the highlites are:
1) Provide put_user_page*() routines, intended to be used
for releasing pages that were pinned via get_user_pages*().
2) Convert all of the call sites for get_user_pages*(), to
invoke put_user_page*(), instead of put_page(). This involves dozens of
call sites, and will take some time.
3) After (2) is complete, use get_user_pages*() and put_user_page*() to
implement tracking of these pages. This tracking will be separate from
the existing struct page refcounting.
4) Use the tracking and identification of these pages, to implement
special handling (especially in writeback paths) when the pages are
backed by a filesystem.
And a few references, also from that commit:
[1] https://lwn.net/Articles/774411/ : "DMA and get_user_pages()"
[2] https://lwn.net/Articles/753027/ : "The Trouble with get_user_pages()"
Ira Weiny (1):
fs/binfmt_elf: convert put_page() to put_user_page*()
John Hubbard (33):
mm/gup: add make_dirty arg to put_user_pages_dirty_lock()
net/rds: convert put_page() to put_user_page*()
net/ceph: convert put_page() to put_user_page*()
x86/kvm: convert put_page() to put_user_page*()
drm/etnaviv: convert release_pages() to put_user_pages()
drm/i915: convert put_page() to put_user_page*()
drm/radeon: convert put_page() to put_user_page*()
media/ivtv: convert put_page() to put_user_page*()
media/v4l2-core/mm: convert put_page() to put_user_page*()
genwqe: convert put_page() to put_user_page*()
scif: convert put_page() to put_user_page*()
vmci: convert put_page() to put_user_page*()
rapidio: convert put_page() to put_user_page*()
oradax: convert put_page() to put_user_page*()
staging/vc04_services: convert put_page() to put_user_page*()
drivers/tee: convert put_page() to put_user_page*()
vfio: convert put_page() to put_user_page*()
fbdev/pvr2fb: convert put_page() to put_user_page*()
fsl_hypervisor: convert put_page() to put_user_page*()
xen: convert put_page() to put_user_page*()
fs/exec.c: convert put_page() to put_user_page*()
orangefs: convert put_page() to put_user_page*()
uprobes: convert put_page() to put_user_page*()
futex: convert put_page() to put_user_page*()
mm/frame_vector.c: convert put_page() to put_user_page*()
mm/gup_benchmark.c: convert put_page() to put_user_page*()
mm/memory.c: convert put_page() to put_user_page*()
mm/madvise.c: convert put_page() to put_user_page*()
mm/process_vm_access.c: convert put_page() to put_user_page*()
crypt: convert put_page() to put_user_page*()
nfs: convert put_page() to put_user_page*()
goldfish_pipe: convert put_page() to put_user_page*()
kernel/events/core.c: convert put_page() to put_user_page*()
arch/x86/kvm/svm.c | 4 +-
crypto/af_alg.c | 7 +-
drivers/gpu/drm/etnaviv/etnaviv_gem.c | 4 +-
drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 9 +-
drivers/gpu/drm/radeon/radeon_ttm.c | 2 +-
drivers/infiniband/core/umem.c | 5 +-
drivers/infiniband/hw/hfi1/user_pages.c | 5 +-
drivers/infiniband/hw/qib/qib_user_pages.c | 5 +-
drivers/infiniband/hw/usnic/usnic_uiom.c | 5 +-
drivers/infiniband/sw/siw/siw_mem.c | 10 +-
drivers/media/pci/ivtv/ivtv-udma.c | 14 +--
drivers/media/pci/ivtv/ivtv-yuv.c | 10 +-
drivers/media/v4l2-core/videobuf-dma-sg.c | 3 +-
drivers/misc/genwqe/card_utils.c | 17 +--
drivers/misc/mic/scif/scif_rma.c | 17 ++-
drivers/misc/vmw_vmci/vmci_context.c | 2 +-
drivers/misc/vmw_vmci/vmci_queue_pair.c | 11 +-
drivers/platform/goldfish/goldfish_pipe.c | 9 +-
drivers/rapidio/devices/rio_mport_cdev.c | 9 +-
drivers/sbus/char/oradax.c | 2 +-
.../interface/vchiq_arm/vchiq_2835_arm.c | 10 +-
drivers/tee/tee_shm.c | 10 +-
drivers/vfio/vfio_iommu_type1.c | 8 +-
drivers/video/fbdev/pvr2fb.c | 3 +-
drivers/virt/fsl_hypervisor.c | 7 +-
drivers/xen/gntdev.c | 5 +-
drivers/xen/privcmd.c | 7 +-
fs/binfmt_elf.c | 2 +-
fs/binfmt_elf_fdpic.c | 2 +-
fs/exec.c | 2 +-
fs/nfs/direct.c | 4 +-
fs/orangefs/orangefs-bufmap.c | 7 +-
include/linux/mm.h | 5 +-
kernel/events/core.c | 2 +-
kernel/events/uprobes.c | 6 +-
kernel/futex.c | 10 +-
mm/frame_vector.c | 4 +-
mm/gup.c | 115 ++++++++----------
mm/gup_benchmark.c | 2 +-
mm/madvise.c | 2 +-
mm/memory.c | 2 +-
mm/process_vm_access.c | 18 +--
net/ceph/pagevec.c | 8 +-
net/rds/info.c | 5 +-
net/rds/message.c | 2 +-
net/rds/rdma.c | 15 ++-
virt/kvm/kvm_main.c | 4 +-
47 files changed, 151 insertions(+), 266 deletions(-)
--
2.22.0
[View Less]
Hi Linus,
Please pull fbdev fix for v5.3-rc4 (fbdev patches will now go to
upstream through drm-misc tree for improved maintainership and
better integration testing so update MAINTAINERS file accordingly).
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
The following changes since commit e21a712a9685488f5ce80495b37b9fdbe96c230d:
Linux 5.3-rc3 (2019-08-04 18:40:12 -0700)
are available in the git repository at:
https://github.com/bzolnier/…
[View More]linux.git tags/fbdev-v5.3-rc4
for you to fetch changes up to 6a7553e8d84d5322d883cb83bb9888c49a0f04e0:
MAINTAINERS: handle fbdev changes through drm-misc tree (2019-08-09 15:46:40 +0200)
----------------------------------------------------------------
fbdev fix for v5.3-rc4:
- update fbdev git tree in MAINTAINERS file
----------------------------------------------------------------
Bartlomiej Zolnierkiewicz (1):
MAINTAINERS: handle fbdev changes through drm-misc tree
MAINTAINERS | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[View Less]
This adds initial support for the NWL MIPI DSI Host controller found on i.MX8
SoCs.
It adds support for the i.MX8MQ but the same IP core can also be found on e.g.
i.MX8QXP. I added the necessary hooks to support other imx8 variants but since
I only have imx8mq boards to test I omitted the platform data for other SoCs.
The code is based on NXPs BSP so I added Robert Chiras as
Co-authored-by. Robert, if this looks sane could you add your
Signed-off-by:?
The most notable changes over the BSP …
[View More]driver are
- Calculate HS mode timing from phy_configure_opts_mipi_dphy
- Perform all clock setup via DT
- Merge nwl-imx and nwl drivers
- Add B0 silion revision quirk
- become a bridge driver to hook into mxsfb (from what I read[0] DCSS, which
also can drive the nwl on the imx8mq will likely not become part of
imx-display-subsystem so it makes sense to make it drive a bridge for dsi as
well).
- Use panel_bridge to attach the panel
This has been tested on a Librem 5 devkit using mxsfb with Robert's patches[1]
and the rocktech-jh057n00900 panel driver. The DCSS can later on also act as
input source too.
Changes from v0:
- Add quirk for IMQ8MQ silicon B0 revision to not mess with the
system reset controller on power down since enable() won't work
otherwise.
- Drop devm_free_irq() handled by the device driver core
- Disable tx esc clock after the phy power down to unbreak
disable/enable (unblank/blank)
- Add ports to dt binding docs
- Select GENERIC_PHY_MIPI_DPHY instead of GENERIC_PHY for
phy_mipi_dphy_get_default_config
- Select DRM_MIPI_DSI
- Include drm_print.h to fix build on next-20190408
- Drop some debugging messages
- Newline terminate all DRM_ printouts
- Turn component driver into a drm bridge
[0]: https://lists.freedesktop.org/archives/dri-devel/2019-May/219484.html
[1]: https://patchwork.freedesktop.org/series/62822/
Guido Günther (3):
arm64: imx8mq: add imx8mq iomux-gpr field defines
dt-bindings: display/bridge: Add binding for IMX NWL mipi dsi host
controller
drm/bridge: Add NWL MIPI DSI host controller support
.../bindings/display/bridge/imx-nwl-dsi.txt | 89 +++
drivers/gpu/drm/bridge/Kconfig | 2 +
drivers/gpu/drm/bridge/Makefile | 1 +
drivers/gpu/drm/bridge/imx-nwl/Kconfig | 15 +
drivers/gpu/drm/bridge/imx-nwl/Makefile | 2 +
drivers/gpu/drm/bridge/imx-nwl/nwl-drv.c | 529 +++++++++++++
drivers/gpu/drm/bridge/imx-nwl/nwl-drv.h | 72 ++
drivers/gpu/drm/bridge/imx-nwl/nwl-dsi.c | 745 ++++++++++++++++++
drivers/gpu/drm/bridge/imx-nwl/nwl-dsi.h | 111 +++
include/linux/mfd/syscon/imx8mq-iomuxc-gpr.h | 62 ++
10 files changed, 1628 insertions(+)
create mode 100644 Documentation/devicetree/bindings/display/bridge/imx-nwl-dsi.txt
create mode 100644 drivers/gpu/drm/bridge/imx-nwl/Kconfig
create mode 100644 drivers/gpu/drm/bridge/imx-nwl/Makefile
create mode 100644 drivers/gpu/drm/bridge/imx-nwl/nwl-drv.c
create mode 100644 drivers/gpu/drm/bridge/imx-nwl/nwl-drv.h
create mode 100644 drivers/gpu/drm/bridge/imx-nwl/nwl-dsi.c
create mode 100644 drivers/gpu/drm/bridge/imx-nwl/nwl-dsi.h
create mode 100644 include/linux/mfd/syscon/imx8mq-iomuxc-gpr.h
--
2.20.1
[View Less]