Re: [PATCH v3 6/6] drm/vc4: hdmi: Set default state margin at reset

2019-04-18 Thread Noralf Trønnes
line = >cmdline_mode; > + struct drm_connector_state *state; > + > + drm_atomic_helper_connector_reset(connector); Initially I wondered why not do this in the helper, but ofc that would apply the values to all the connectors. I know too little about this subject to argue for having it in the help

Re: [PATCH v3 5/6] drm/selftests: Add command line parser selftests

2019-04-18 Thread Noralf Trønnes
Den 18.04.2019 14.41, skrev Maxime Ripard: > The command line parser is pretty tough to get right and very error prone, > so let's add a selftest to try to catch any regression. > > Signed-off-by: Maxime Ripard > --- Yay, unit tests \o/ Reviewed-by:

Re: [PATCH v3 4/6] drm/modes: Parse overscan properties

2019-04-18 Thread Noralf Trønnes
.left: left margin > + * @tv_margins.right: right margin > + * @tv_margins.top: top margin > + * @tv_margins.bottom: bottom margin > + */ I haven't seen kernel docs like this before so I assume you have tested with make htmldocs. This one also needs mention in Documentatio

Re: [PATCH v3 3/6] drm/modes: Allow to specify rotation and reflection on the commandline

2019-04-18 Thread Noralf Trønnes
Den 18.04.2019 14.41, skrev Maxime Ripard: > Rotations and reflections setup are needed in some scenarios to initialise > properly the initial framebuffer. Some drivers already had a bunch of > quirks to deal with this, such as either a private kernel command line > parameter (omapdss) or on the

Re: [PATCH v3 2/6] drm/modes: Support modes names on the command line

2019-04-18 Thread Noralf Trønnes
,7 @@ bool drm_mode_parse_command_line_for_connector(const > char *mode_option, > struct drm_cmdline_mode *mode) > { > const char *name; > - bool parse_extras = false; > + bool named_mode = false, parse_extras = false; Y

Re: [PATCH v3 1/6] drm/modes: Rewrite the command line parser

2019-04-18 Thread Noralf Trønnes
Den 18.04.2019 14.41, skrev Maxime Ripard: > From: Maxime Ripard > > Rewrite the command line parser in order to get away from the state machine > parsing the video mode lines. > > Hopefully, this will allow to extend it more easily to support named modes > and / or properties set directly on

Re: [PATCH v2 00/12] drm/fb-helper: Move modesetting code to drm_client

2019-04-17 Thread Noralf Trønnes
Den 16.04.2019 10.41, skrev Daniel Vetter: > On Sun, Apr 07, 2019 at 06:52:31PM +0200, Noralf Trønnes wrote: >> This moves the modesetting code from drm_fb_helper to drm_client so it >> can be shared by all internal clients. >> >> The main change this time is

Re: [PATCH v2 08/12] drm/fb-helper: Move out commit code

2019-04-17 Thread Noralf Trønnes
Den 16.04.2019 10.38, skrev Daniel Vetter: > On Sun, Apr 07, 2019 at 06:52:39PM +0200, Noralf Trønnes wrote: >> Move the modeset commit code to drm_client_modeset. >> No changes except exporting API. >> >> v2: Move to drm_client_modeset.c instead of drm_client.c

Re: [PATCH v2 4/5] drm/modes: Parse overscan properties

2019-04-17 Thread Noralf Trønnes
Den 17.04.2019 17.30, skrev Noralf Trønnes: > > > Den 17.04.2019 16.07, skrev Maxime Ripard: >> Hi Noralf, >> >> On Tue, Apr 16, 2019 at 04:52:20PM +0200, Noralf Trønnes wrote: >>> Den 11.04.2019 15.22, skrev Maxime Ripard: >>>> Properly con

Re: [PATCH v2 4/5] drm/modes: Parse overscan properties

2019-04-17 Thread Noralf Trønnes
Den 17.04.2019 16.07, skrev Maxime Ripard: > Hi Noralf, > > On Tue, Apr 16, 2019 at 04:52:20PM +0200, Noralf Trønnes wrote: >> Den 11.04.2019 15.22, skrev Maxime Ripard: >>> Properly configuring the overscan properties might be needed for the >>> initial set

Re: [PATCH v2 3/5] drm/modes: Allow to specify rotation and reflection on the commandline

2019-04-17 Thread Noralf Trønnes
Den 17.04.2019 16.30, skrev Maxime Ripard: > Hi Noralf, > > On Tue, Apr 16, 2019 at 04:50:00PM +0200, Noralf Trønnes wrote: >> Den 11.04.2019 15.22, skrev Maxime Ripard: >>> Rotations and reflections setup are needed in some scenarios to initialise >>> prope

Re: [PATCH v2 02/12] drm/fb-helper: Avoid race with DRM userspace

2019-04-17 Thread Noralf Trønnes
Den 17.04.2019 15.26, skrev Daniel Vetter: > On Wed, Apr 17, 2019 at 03:24:00PM +0200, Daniel Vetter wrote: >> On Tue, Apr 16, 2019 at 08:46:24PM +0200, Noralf Trønnes wrote: >>> >>> >>> Den 16.04.2019 09.59, skrev Daniel Vetter: >>>> On Sun,

Re: [PATCH v2 02/12] drm/fb-helper: Avoid race with DRM userspace

2019-04-16 Thread Noralf Trønnes
Den 16.04.2019 09.59, skrev Daniel Vetter: > On Sun, Apr 07, 2019 at 06:52:33PM +0200, Noralf Trønnes wrote: >> drm_fb_helper_is_bound() is used to check if DRM userspace is in control. >> This is done by looking at the fb on the primary plane. By the time >> fb-helper gets

Re: [PATCH v2 09/12] drm/fb-helper: Remove drm_fb_helper_connector

2019-04-16 Thread Noralf Trønnes
Den 16.04.2019 11.42, skrev Maxime Ripard: > Hi, > > On Sun, Apr 07, 2019 at 06:52:40PM +0200, Noralf Trønnes wrote: >> All drivers add all their connectors so there's no need to keep around an >> array of available connectors. >> >> Rename functions

Re: [PATCH v2 4/5] drm/modes: Parse overscan properties

2019-04-16 Thread Noralf Trønnes
Den 11.04.2019 15.22, skrev Maxime Ripard: > Properly configuring the overscan properties might be needed for the > initial setup of the framebuffer for display that still have overscan. > Let's allow for more properties on the kernel command line to setup each > margin. > > Signed-off-by:

Re: [PATCH v2 3/5] drm/modes: Allow to specify rotation and reflection on the commandline

2019-04-16 Thread Noralf Trønnes
Den 11.04.2019 15.22, skrev Maxime Ripard: > Rotations and reflections setup are needed in some scenarios to initialise > properly the initial framebuffer. Some drivers already had a bunch of > quirks to deal with this, such as either a private kernel command line > parameter (omapdss) or on the

[PATCH v5 4/4] drm/tinydrm: Remove chunk splitting in tinydrm_spi_transfer

2019-04-13 Thread Noralf Trønnes
buffer size for Type C Option 1 (9-bit) interface is somewhat arbitrary, but a bigger buffer will have a miniscule impact on transfer speed, so it's probably fine. Signed-off-by: Meghana Madhyastha Signed-off-by: Noralf Trønnes --- .../gpu/drm/tinydrm/core/tinydrm-helpers.c| 83

[PATCH v5 2/4] spi: Release spi_res after finalizing message

2019-04-13 Thread Noralf Trønnes
spi_split_transfers_maxsize() can be used to split a transfer. This function uses spi_res to lifetime manage the added transfer structures. So in order to finalize the current message while it contains the split transfers, spi_res_release() must be called after finalizing. Signed-off-by: Noralf

[PATCH v5 3/4] spi/spi-bcm2835: Split transfers that exceed DLEN

2019-04-13 Thread Noralf Trønnes
using a Lite channel we will not exceed the max length, so let's drop setting ->max_dma_len. Signed-off-by: Meghana Madhyastha Signed-off-by: Noralf Trønnes --- drivers/spi/spi-bcm2835.c | 39 +++ 1 file changed, 11 insertions(+), 28 deletions(-) diff --git

[PATCH v5 0/4] Chunk splitting of spi transfers

2019-04-13 Thread Noralf Trønnes
unk splitting in tinydrm_spi_transfer Noralf Trønnes (2): spi: Remove warning in spi_split_transfers_maxsize() spi: Release spi_res after finalizing message .../gpu/drm/tinydrm/core/tinydrm-helpers.c| 83 ++- drivers/gpu/drm/tinydrm/mipi-dbi.c| 10 +-- drivers/spi/

[PATCH v5 1/4] spi: Remove warning in spi_split_transfers_maxsize()

2019-04-13 Thread Noralf Trønnes
Don't warn about splitting transfers, the info is available in the statistics if needed. Signed-off-by: Noralf Trønnes --- drivers/spi/spi.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 9a7def7c3237..05875e63be43 100644 --- a/drivers/spi

[PATCH 1/2] spi: Add spi_is_bpw_supported()

2019-04-12 Thread Noralf Trønnes
This let SPI clients check if the controller supports a particular word width. drivers/gpu/drm/tinydrm/mipi-dbi.c will use this to determine if the controller supports 16-bit for RGB565 pixels. If it doesn't it will swap the bytes before transfer on little endian machines. Signed-off-by: Noralf

[PATCH 2/2] drm/tinydrm: Use spi_is_bpw_supported()

2019-04-12 Thread Noralf Trønnes
This means that tinydrm_spi_bpw_supported() can be removed. Signed-off-by: Noralf Trønnes --- .../gpu/drm/tinydrm/core/tinydrm-helpers.c| 32 +-- drivers/gpu/drm/tinydrm/mipi-dbi.c| 5 ++- include/drm/tinydrm/tinydrm-helpers.h | 1 - 3 files changed, 3

Re: [PATCH v4 2/4] spi: Split spi message into max_dma_len size chunks

2019-04-11 Thread Noralf Trønnes
Den 11.04.2019 20.18, skrev Lukas Wunner: > On Thu, Apr 11, 2019 at 06:42:33PM +0200, Noralf Trønnes wrote: >> @@ -1299,6 +1299,11 @@ static void __spi_pump_messages(struct spi_controller >> *ctlr, bool in_kthread) >> >> trace_spi_message_start(ctlr-

Re: [PATCH v4 2/4] spi: Split spi message into max_dma_len size chunks

2019-04-11 Thread Noralf Trønnes
Den 11.04.2019 18.42, skrev Noralf Trønnes: > From: Meghana Madhyastha > > Some drivers like spi_bcm2835 have a max size on DMA transfers. Work > around this by splitting up the transfer if necessary. > > ->max_transfer_size is MAX_INT if the driver doesn't set it, so th

[PATCH v4 4/4] drm/tinydrm: Remove chunk splitting in tinydrm_spi_transfer

2019-04-11 Thread Noralf Trønnes
argument that now has lost its cause. The 16kB buffer size for Type C Option 1 (9-bit) interface is somewhat arbitrary, but a bigger buffer will have a miniscule impact on transfer speed, so it's probably fine. Signed-off-by: Meghana Madhyastha Signed-off-by: Noralf Trønnes --- .../gpu/drm/tinydrm

[PATCH v4 3/4] spi/spi-bcm2835: Remove DMA transfer size cap

2019-04-11 Thread Noralf Trønnes
From: Meghana Madhyastha The spi core splits up transfers larger than ->max_dma_len now so we can remove the upper bound on DMA transfers. Limit max_dma_len to 65532, because the scatter gather segment is required to be a multiple of 4. Signed-off-by: Meghana Madhyastha Signed-off-by: Nor

[PATCH v4 1/4] spi: Remove warning in spi_split_transfers_maxsize()

2019-04-11 Thread Noralf Trønnes
Don't warn about splitting transfers, the info is available in the statistics if needed. Signed-off-by: Noralf Trønnes --- drivers/spi/spi.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 9a7def7c3237..05875e63be43 100644 --- a/drivers/spi

[PATCH v4 2/4] spi: Split spi message into max_dma_len size chunks

2019-04-11 Thread Noralf Trønnes
ana Madhyastha Signed-off-by: Noralf Trønnes --- drivers/spi/spi.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 05875e63be43..22bc658032b3 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -1299,6 +1299,11 @@ static v

[PATCH v4 0/4] Chunk splitting of spi transfers

2019-04-11 Thread Noralf Trønnes
size chunks spi/spi-bcm2835: Remove DMA transfer size cap drm/tinydrm: Remove chunk splitting in tinydrm_spi_transfer Noralf Trønnes (1): spi: Remove warning in spi_split_transfers_maxsize() .../gpu/drm/tinydrm/core/tinydrm-helpers.c| 83 ++- drivers/gpu/drm/tinydrm/mipi

Re: [PATCH] drm/tinydrm: Fix fbdev pixel format

2019-04-11 Thread Noralf Trønnes
Den 10.04.2019 15.03, skrev Neil Armstrong: > On 10/04/2019 14:43, Noralf Trønnes wrote: >> Due to copy/paste error, the fbdev format was changed to 32bpp = XRGB >> which is an emulated format for the RGB565 drivers. Revert to to using the >>

Re: [PATCH v2 03/12] drm/i915/fbdev: Move intel_fb_initial_config() to fbdev helper

2019-04-11 Thread Noralf Trønnes
Den 07.04.2019 18.52, skrev Noralf Trønnes: > It is generic code and having it in the helper will let other drivers > benefit from it. > > One change was necessary assuming this to be true: > INTEL_INFO(dev_priv)->num_pipes == dev->mode_config.num_crtc > > Sugges

Re: [PATCH] drm: fix drm_fb_xrgb8888_to_rgb888_dstclip()

2019-04-11 Thread Noralf Trønnes
Signed-off-by: Gerd Hoffmann > --- Reviewed-by: Noralf Trønnes ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] drm/bochs: use simple display pipe

2019-04-10 Thread Noralf Trønnes
Den 10.04.2019 09.48, skrev Gerd Hoffmann: > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH] drm/tinydrm: Fix fbdev pixel format

2019-04-10 Thread Noralf Trønnes
19f ("drm/tinydrm: Drop using tinydrm_device") Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/tinydrm/hx8357d.c | 2 +- drivers/gpu/drm/tinydrm/ili9225.c | 2 +- drivers/gpu/drm/tinydrm/ili9341.c | 2 +- drivers/gpu/drm/tinydrm/mi0283qt.c | 2 +- drivers/gpu/drm/tinydrm/r

Re: [PATCH v2 2/3] drm: switch drm_fb_xrgb8888_to_rgb565_dstclip to accept __iomem dst

2019-04-10 Thread Noralf Trønnes
unsigned int pixels, > + bool swab) Both here and further down you change the argument name: swap -> swab. If you want that, you need to fix the function declaration and the docs as well. With that sorted out: Reviewed-by: Noralf Trønnes

Re: [PATCH v2 3/3] drm: switch drm_fb_xrgb8888_to_rgb888_dstclip to accept __iomem dst

2019-04-10 Thread Noralf Trønnes
st pointer and use memcpy_toio() instead of memcpy(). The helper > function (drm_fb_xrgb_to_rgb888_line) has been changed to process a > single scanline. > > Signed-off-by: Gerd Hoffmann > --- Reviewed-by: Noralf Trønnes ___

Re: [PATCH v2 1/3] drm: switch drm_fb_memcpy_dstclip to accept __iomem dst

2019-04-10 Thread Noralf Trønnes
nd use memcpy_toio() instead of memcpy(). With that separating out the > memcpy loop into the drm_fb_memcpy_lines() helper isn't useful any more, > so move the code back into the calling functins. > > Signed-off-by: Gerd Hoffmann >

Re: [PATCH 2/4] drm: use convert_lines() in xrgb8888_to_rgb565 helpers.

2019-04-09 Thread Noralf Trønnes
Den 09.04.2019 13.59, skrev Gerd Hoffmann: > Also add two conversion functions for the swab / not swab cases. > That way we have to check the swab flag only once. > > Signed-off-by: Gerd Hoffmann > --- > drivers/gpu/drm/drm_format_helper.c | 117 +++- > 1 file changed,

[PATCH v2 12/12] drm/client: Hack: Add bootsplash example

2019-04-07 Thread Noralf Trønnes
for bootsplash to fend off fbdev. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/Kconfig | 5 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/drm_bootsplash.c | 359 +++ drivers/gpu/drm/drm_client.c | 7 + drivers/gpu/drm/drm_drv.c

[PATCH v2 11/12] drm/fb-helper: Move out modeset config code

2019-04-07 Thread Noralf Trønnes
No functional changes, just moving code as-is and fixing includes. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_client_modeset.c | 703 ++- drivers/gpu/drm/drm_fb_helper.c | 692 -- include/drm/drm_client.h | 4 +- 3

[PATCH v2 10/12] drm/fb-helper: Prepare to move out modeset config code

2019-04-07 Thread Noralf Trønnes
This prepares the modeset code so it can be moved out as-is in the next patch. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_fb_helper.c | 63 +++-- include/drm/drm_fb_helper.h | 4 --- 2 files changed, 45 insertions(+), 22 deletions(-) diff --git

[PATCH v2 08/12] drm/fb-helper: Move out commit code

2019-04-07 Thread Noralf Trønnes
Move the modeset commit code to drm_client_modeset. No changes except exporting API. v2: Move to drm_client_modeset.c instead of drm_client.c Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_client_modeset.c | 287 +++ drivers/gpu/drm/drm_fb_helper.c | 282

[PATCH v2 06/12] drm/fb-helper: Remove drm_fb_helper_crtc

2019-04-07 Thread Noralf Trønnes
array to drm_client (Daniel Vetter) - Use a new file for the modeset code (Daniel Vetter) - File has to be MIT licensed (Emmanuel Vadot) - Add copyrights from drm_fb_helper.c Signed-off-by: Noralf Trønnes --- Documentation/gpu/todo.rst | 7 + drivers/gpu/drm/Makefile

[PATCH v2 04/12] drm/fb-helper: No need to cache rotation and sw_rotations

2019-04-07 Thread Noralf Trønnes
Getting rotation info is cheap so we can do it on demand. This is done in preparation for the removal of struct drm_fb_helper_crtc. Cc: Hans de Goede Signed-off-by: Noralf Trønnes Acked-by: Daniel Vetter --- drivers/gpu/drm/drm_fb_helper.c | 131 include/drm

[PATCH v2 07/12] drm/fb-helper: Prepare to move out commit code

2019-04-07 Thread Noralf Trønnes
This makes the necessary changes so the commit code can be moved out to drm_client as-is in the next patch. It's split up to ease review. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_fb_helper.c | 122 +--- 1 file changed, 81 insertions(+), 41 deletions

[PATCH v2 09/12] drm/fb-helper: Remove drm_fb_helper_connector

2019-04-07 Thread Noralf Trønnes
All drivers add all their connectors so there's no need to keep around an array of available connectors. Rename functions which signature is changed since they will be moved to drm_client in a later patch. Signed-off-by: Noralf Trønnes --- checkpatch complains, but I'm unable to satisfy

[PATCH v2 05/12] drm/fb-helper: Remove drm_fb_helper_crtc->{x, y, desired_mode}

2019-04-07 Thread Noralf Trønnes
The values are already present in the modeset. This is done in preparation for the removal of struct drm_fb_helper_crtc. Signed-off-by: Noralf Trønnes Reviewed-by: Daniel Vetter --- drivers/gpu/drm/drm_fb_helper.c | 12 include/drm/drm_fb_helper.h | 2 -- 2 files changed, 4

[PATCH v2 00/12] drm/fb-helper: Move modesetting code to drm_client

2019-04-07 Thread Noralf Trønnes
Noralf Trønnes (12): drm/atomic: Move __drm_atomic_helper_disable_plane/set_config() drm/fb-helper: Avoid race with DRM userspace drm/i915/fbdev: Move intel_fb_initial_config() to fbdev helper drm/fb-helper: No need to cache rotation and sw_rotations drm/fb-helper: Remove drm_fb_helper_crtc

[PATCH v2 03/12] drm/i915/fbdev: Move intel_fb_initial_config() to fbdev helper

2019-04-07 Thread Noralf Trønnes
intel-...@lists.freedesktop.org Signed-off-by: Noralf Trønnes Reviewed-by: Jani Nikula --- drivers/gpu/drm/drm_fb_helper.c| 194 - drivers/gpu/drm/i915/intel_fbdev.c | 218 - include/drm/drm_fb_helper.h| 23 --- 3 files change

[PATCH v2 02/12] drm/fb-helper: Avoid race with DRM userspace

2019-04-07 Thread Noralf Trønnes
gt;master in drm_fb_helper_single_fb_probe(), restore_fbdev_mode() has the check. Suggested-by: Daniel Vetter Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_auth.c | 20 drivers/gpu/drm/drm_fb_helper.c | 90 - drivers/gpu/drm/drm_internal.h | 2 + 3 file

[PATCH v2 01/12] drm/atomic: Move __drm_atomic_helper_disable_plane/set_config()

2019-04-07 Thread Noralf Trønnes
*/ on a separate line - CHECK: Alignment should match open parenthesis Signed-off-by: Noralf Trønnes Reviewed-by: Daniel Vetter --- drivers/gpu/drm/drm_atomic.c| 168 drivers/gpu/drm/drm_atomic_helper.c | 164 --- drivers/gpu/drm

Re: [PATCH v3 5/5] drm/cirrus: rewrite and modernize driver.

2019-04-05 Thread Noralf Trønnes
d. > - The generic fbdev emulation is used. > - It's a atomic driver now. > - It runs wayland. > > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v3 4/5] drm: add drm_fb_xrgb8888_to_rgb888_dstclip()

2019-04-05 Thread Noralf Trønnes
Den 05.04.2019 11.52, skrev Gerd Hoffmann: > Simliar to drm_fb_xrgb_to_rgb565_dstclip() but converts to rgb888 Simliar -> Similar > instead of rgb565. > > Signed-off-by: Gerd Hoffmann > --- Reviewed-by: Noralf Trønnes ___

Re: [PATCH v3 3/5] drm: add drm_fb_xrgb8888_to_rgb565_dstclip()

2019-04-05 Thread Noralf Trønnes
as factored out into the > drm_fb_xrgb_to_rgb565_lines() helper function. > > Signed-off-by: Gerd Hoffmann > --- Reviewed-by: Noralf Trønnes ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v3 2/5] drm: add drm_fb_memcpy_dstclip() helper

2019-04-05 Thread Noralf Trønnes
; Signed-off-by: Gerd Hoffmann > --- Reviewed-by: Noralf Trønnes ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v3 1/5] drm: move tinydrm format conversion helpers to new drm_format_helper.c

2019-04-05 Thread Noralf Trønnes
Den 05.04.2019 11.52, skrev Gerd Hoffmann: > Also rename them from tinydrm_* to drm_fb_* > Pure code motion, no functional change. > > Signed-off-by: Gerd Hoffmann > --- Thanks for doing this! Reviewed-by: Noralf Trønnes ___ dr

Re: [PATCH] drm: aspeed: Select CMA only if available

2019-04-05 Thread Noralf Trønnes
Den 05.04.2019 07.28, skrev Joel Stanley: > When building this driver for architectures where CMA is not available. > > Fixes: 4f2a8f5898ec ("drm: Add ASPEED GFX driver") > Reported-by: Stephen Rothwell > Reported-by: kernel test robot > Signed-off-by: Joel Stanley > --- > This fixes the

Re: [PATCH v2 3/6] drm: move tinydrm_xrgb8888_to_rgb565() to drm_fb_helper.c

2019-04-04 Thread Noralf Trønnes
Den 04.04.2019 17.24, skrev Gerd Hoffmann: > Also rename to drm_fb_xrgb_to_rgb565(). > Pure code motion, no functional change. > > Signed-off-by: Gerd Hoffmann > --- > diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c > index fabeb408dce6..087e49741094 100644

Re: [PATCH v2 1/6] drm: move tinydrm_memcpy() to drm_fb_helper.c

2019-04-04 Thread Noralf Trønnes
Den 04.04.2019 17.24, skrev Gerd Hoffmann: > Also rename to drm_fb_memcpy(). > Pure code motion, no functional change. > > Signed-off-by: Gerd Hoffmann > --- > include/drm/drm_fb_helper.h | 3 +++ > include/drm/tinydrm/tinydrm-helpers.h | 2 -- >

Re: [PATCH] drm/cirrus: rewrite and modernize driver.

2019-04-04 Thread Noralf Trønnes
Den 04.04.2019 12.27, skrev Gerd Hoffmann: > Hi, > >>> tinydrm_xrgb_to_* >>> >>> imo these could be put into some drm_format_helpers.c to be shared. >> >> I agree, my long term goal is to get rid of tinydrm.ko. Just haven't got >> there yet. >> >> Gerd, if you end up using some of those

Re: [PATCH] drm/cirrus: rewrite and modernize driver.

2019-04-04 Thread Noralf Trønnes
Den 04.04.2019 10.52, skrev Daniel Vetter: > On Thu, Apr 4, 2019 at 10:30 AM Gerd Hoffmann wrote: >> >> Hi, >> Speaking of wayland: Seems at least gnome-shell insists on using XR24. >>> >>> Yeah XR24 is pretty much mandatory. Noralf added a few helpers to >>> convert XR24 to other

[PATCH] drm/client: Rename drm_client_add() to drm_client_register()

2019-04-03 Thread Noralf Trønnes
This is done to stay consistent with our naming scheme of _register() = others can start calling us from any thread. Suggested-by: Daniel Vetter Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_client.c| 11 ++- drivers/gpu/drm/drm_fb_helper.c | 2 +- include/drm/drm_client.h

Re: [PATCH] drm/cirrus: rewrite and modernize driver.

2019-04-03 Thread Noralf Trønnes
Den 03.04.2019 10.53, skrev Gerd Hoffmann: >>> +struct cirrus_device { >>> + struct drm_device *dev; >> >> Why not embed drm_device? It's the latest rage :-) > > Sure, can do that. > >>> +void cirrus_pipe_update(struct drm_simple_display_pipe *pipe, >>> +

Re: [PATCH] drm/fb-helper: generic: Call drm_client_add() after setup is done

2019-04-03 Thread Noralf Trønnes
Den 02.04.2019 09.55, skrev Daniel Vetter: > On Mon, Apr 01, 2019 at 04:13:58PM +0200, Noralf Trønnes wrote: >> Hotplug can happen while drm_fbdev_generic_setup() is running so move >> drm_client_add() call after setup is done to avoid >> drm_fbdev_client_hotplug() r

Re: [Intel-gfx] [PATCH 01/16] drm/fb-helper: Remove unused gamma_size variable

2019-04-03 Thread Noralf Trønnes
Den 26.03.2019 19.23, skrev Daniel Vetter: > On Tue, Mar 26, 2019 at 06:55:31PM +0100, Noralf Trønnes wrote: >> The gamma_size variable has not been used since >> commit 4abe35204af8 ("drm/kms/fb: use slow work mechanism for normal hotplug >> also.") >> >

Re: [PATCH 16/16] drm/vc4: Call drm_dev_register() after all setup is done

2019-04-03 Thread Noralf Trønnes
Den 27.03.2019 17.36, skrev Eric Anholt: > Noralf Trønnes writes: > >> drm_dev_register() initializes internal clients like bootsplash as the >> last thing it does, so all setup needs to be done at this point. >> >> Fix by calling vc4_kms_load() before registering

Re: [PATCH 2/2] drm: Add ASPEED GFX driver

2019-04-01 Thread Noralf Trønnes
+ .fops = , > + .name = "aspeed-gfx-drm", > + .desc = "ASPEED GFX DRM", > + .date = "20180319", > + .major = 1, > + .minor = 0, > +}; > + > +static const struct of_device_id aspeed_gfx_match

[PATCH] drm/fb-helper: generic: Call drm_client_add() after setup is done

2019-04-01 Thread Noralf Trønnes
er Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_fb_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 03749a24e4dd..601b17310411 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drive

Re: [PATCH 13/16] drm/fb-helper: Avoid race with DRM userspace

2019-04-01 Thread Noralf Trønnes
Den 01.04.2019 09.12, skrev Daniel Vetter: > On Sat, Mar 30, 2019 at 10:07:58PM +0100, Noralf Trønnes wrote: >> >> >> Den 28.03.2019 09.17, skrev Daniel Vetter: >>> On Tue, Mar 26, 2019 at 06:55:43PM +0100, Noralf Trønnes wrote: >>>> drm_fb_helper_is

Re: [Intel-gfx] [PATCH 00/16] drm/fb-helper: Move modesetting code to drm_client

2019-03-31 Thread Noralf Trønnes
Den 28.03.2019 10.31, skrev Daniel Vetter: > On Tue, Mar 26, 2019 at 06:55:30PM +0100, Noralf Trønnes wrote: >> This moves the modesetting code from drm_fb_helper to drm_client so it >> can be shared by all internal clients. >> >> I have also added a client display a

Re: [PATCH 13/16] drm/fb-helper: Avoid race with DRM userspace

2019-03-30 Thread Noralf Trønnes
Den 28.03.2019 09.17, skrev Daniel Vetter: > On Tue, Mar 26, 2019 at 06:55:43PM +0100, Noralf Trønnes wrote: >> drm_fb_helper_is_bound() is used to check if DRM userspace is in control. >> This is done by looking at the fb on the primary plane. By the time >> fb-helper gets

Re: [PATCH 06/16] drm/i915/fbdev: Move intel_fb_initial_config() to fbdev helper

2019-03-30 Thread Noralf Trønnes
Den 27.03.2019 14.33, skrev Jani Nikula: > On Tue, 26 Mar 2019, Noralf Trønnes wrote: >> It is generic code and having it in the helper will let other drivers >> benefit from it. >> >> One change was necessary assuming this to be true: >> INTEL

Re: [PATCH 09/16] drm/fb-helper: Move out commit code

2019-03-27 Thread Noralf Trønnes
Den 27.03.2019 15.13, skrev Emmanuel Vadot: > > Hi Noralf, > > On Tue, 26 Mar 2019 18:55:39 +0100 > Noralf Trønnes wrote: > >> Move the modeset commit code to drm_client. >> No changes except exporting API. >> >> Signed-off-by: Noralf Trønne

Re: [PATCH v3 5/5] drm/virtio: rework resource creation workflow.

2019-03-27 Thread Noralf Trønnes
then initialize the > ttm object, and finally attach just created object to the fence for the > command in case it didn't finish yet. > > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes ___ dri-devel mailing list dri-devel

Re: [PATCH v3 2/5] drm/virtio: use struct to pass params to virtio_gpu_object_create()

2019-03-27 Thread Noralf Trønnes
M_PL_FLAG_NO_EVICT so ttm knows. Doesn't change much for the moment > as virtio-gpu supports TTM_PL_FLAG_TT only so there is no opportunity to > move around objects. That'll probably change in the future though. > > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes

Re: [Intel-gfx] [PATCH 03/16] drm/atomic: Move __drm_atomic_helper_disable_plane/set_config()

2019-03-27 Thread Noralf Trønnes
Den 27.03.2019 14.55, skrev Daniel Vetter: > On Wed, Mar 27, 2019 at 2:42 PM Noralf Trønnes wrote: >> >> >> >> Den 26.03.2019 21.48, skrev Daniel Vetter: >>> On Tue, Mar 26, 2019 at 06:55:33PM +0100, Noralf Trønnes wrote: >>>> Prepare for mov

Re: [PATCH] drm/virtio: add virtio-gpu-features debugfs file.

2019-03-27 Thread Noralf Trønnes
Den 20.03.2019 09.36, skrev Gerd Hoffmann: > This file prints which features the virtio-gpu device has. > > Also add "virtio-gpu-" prefix to the existing fence file, > to make clear this is a driver-specific debugfs file. > > Signed-off-by: Gerd Hoffmann >

Re: [PATCH 00/16] drm/fb-helper: Move modesetting code to drm_client

2019-03-27 Thread Noralf Trønnes
Den 26.03.2019 18.55, skrev Noralf Trønnes: > This moves the modesetting code from drm_fb_helper to drm_client so it > can be shared by all internal clients. > > I have also added a client display abstraction and a bootsplash example > client to show where this might be heading

Re: [Intel-gfx] [PATCH 03/16] drm/atomic: Move __drm_atomic_helper_disable_plane/set_config()

2019-03-27 Thread Noralf Trønnes
Den 26.03.2019 21.48, skrev Daniel Vetter: > On Tue, Mar 26, 2019 at 06:55:33PM +0100, Noralf Trønnes wrote: >> Prepare for moving drm_fb_helper modesetting code to drm_client. >> drm_client will be linked to drm.ko, so move >> __drm_atomic

Re: [PATCH] drm/fb-helper: Fixup fill_info cleanup

2019-03-27 Thread Noralf Trønnes
Den 27.03.2019 13.58, skrev Daniel Vetter: > I forgot the !CONFIG_FBDEV case. Also some kerneldoc needed more > adjusting. > > Cc: Noralf Trønnes > Cc: Alex Deucher > Signed-off-by: Daniel Vetter > --- Really nice that we have all these bots helping us out. Review

[PATCH 14/16] drm/client: Add display abstraction

2019-03-26 Thread Noralf Trønnes
Add display abstraction and helpers to probe for displays and commit modesets. TODO: If the bootsplash client doesn't need to subclass drm_client_display, the callbacks can be removed. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_client.c | 415

[PATCH 15/16] drm/client: Hack: Add bootsplash example

2019-03-26 Thread Noralf Trønnes
for bootsplash to fend off fbdev. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/Kconfig | 5 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/drm_bootsplash.c | 216 +++ drivers/gpu/drm/drm_client.c | 7 + drivers/gpu/drm/drm_drv.c

[PATCH 16/16] drm/vc4: Call drm_dev_register() after all setup is done

2019-03-26 Thread Noralf Trønnes
drm_dev_register() initializes internal clients like bootsplash as the last thing it does, so all setup needs to be done at this point. Fix by calling vc4_kms_load() before registering. Also check the error code returned from that function. Cc: Eric Anholt Signed-off-by: Noralf Trønnes

[PATCH 13/16] drm/fb-helper: Avoid race with DRM userspace

2019-03-26 Thread Noralf Trønnes
ile committing. When DRM userspace does its first open, it will now wait until fb-helper is done. The helper will stay away if there's a master. Locking rule: Always take the fb-helper lock first. Suggested-by: Daniel Vetter Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_auth.c |

[PATCH 12/16] drm/fb-helper: Move out modeset config code

2019-03-26 Thread Noralf Trønnes
No functional changes, just moving code as-is and fixing includes. There is one addition and that is exporting drm_client_modesets_probe(). Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_client.c| 698 drivers/gpu/drm/drm_fb_helper.c | 697

[PATCH 11/16] drm/fb-helper: Prepare to move out modeset config code

2019-03-26 Thread Noralf Trønnes
This prepares the modeset code so it can be moved out as-is in the next patch. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_fb_helper.c | 75 + include/drm/drm_fb_helper.h | 4 -- 2 files changed, 57 insertions(+), 22 deletions(-) diff --git

[PATCH 10/16] drm/fb-helper: Remove drm_fb_helper_connector

2019-03-26 Thread Noralf Trønnes
All drivers add all their connectors so there's no need to keep around an array of available connectors. Rename functions which signature is changed since they will be moved to drm_client in a later patch. Signed-off-by: Noralf Trønnes --- checkpatch complains, but I'm unable to satisfy

[PATCH 06/16] drm/i915/fbdev: Move intel_fb_initial_config() to fbdev helper

2019-03-26 Thread Noralf Trønnes
intel-...@lists.freedesktop.org Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_fb_helper.c| 194 - drivers/gpu/drm/i915/intel_fbdev.c | 218 - include/drm/drm_fb_helper.h| 23 --- 3 files changed, 190 insertions(+), 245 del

[PATCH 09/16] drm/fb-helper: Move out commit code

2019-03-26 Thread Noralf Trønnes
Move the modeset commit code to drm_client. No changes except exporting API. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_client.c| 236 drivers/gpu/drm/drm_fb_helper.c | 232 --- include/drm/drm_client.h| 3

[PATCH 05/16] drm/fb-helper: Remove drm_fb_helper_crtc->{x, y, desired_mode}

2019-03-26 Thread Noralf Trønnes
The values are already present in the modeset. This is done in preparation for the removal of struct drm_fb_helper_crtc. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_fb_helper.c | 12 include/drm/drm_fb_helper.h | 2 -- 2 files changed, 4 insertions(+), 10 deletions

[PATCH 00/16] drm/fb-helper: Move modesetting code to drm_client

2019-03-26 Thread Noralf Trønnes
. Noralf. Noralf Trønnes (16): drm/fb-helper: Remove unused gamma_size variable drm/fb-helper: dpms_legacy(): Only set on connectors in use drm/atomic: Move __drm_atomic_helper_disable_plane/set_config() drm/fb-helper: No need to cache rotation and sw_rotations drm/fb-helper: Remove

[PATCH 08/16] drm/fb-helper: Prepare to move out commit code

2019-03-26 Thread Noralf Trønnes
This makes the necessary changes so the commit code can be moved out to drm_client as-is in the next patch. It's split up to ease review. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_fb_helper.c | 93 + 1 file changed, 59 insertions(+), 34 deletions

[PATCH 07/16] drm/fb-helper: Remove drm_fb_helper_crtc

2019-03-26 Thread Noralf Trønnes
. This means that the max connector argument for drm_fb_helper_init() and drm_fb_helper_fbdev_setup() isn't used anymore, a todo entry for this is added. Signed-off-by: Noralf Trønnes --- Documentation/gpu/todo.rst | 7 + drivers/gpu/drm/drm_client.c| 93 drivers/gpu/drm

[PATCH 03/16] drm/atomic: Move __drm_atomic_helper_disable_plane/set_config()

2019-03-26 Thread Noralf Trønnes
*/ on a separate line - CHECK: Alignment should match open parenthesis Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_atomic.c| 168 drivers/gpu/drm/drm_atomic_helper.c | 164 --- drivers/gpu/drm/drm_crtc_internal.h | 5 + include

[PATCH 01/16] drm/fb-helper: Remove unused gamma_size variable

2019-03-26 Thread Noralf Trønnes
erface using fb."). Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_fb_helper.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 04d23cb430bf..eea15465da7a 100644 --- a/drivers/gpu/drm/drm_fb_helper

[PATCH 04/16] drm/fb-helper: No need to cache rotation and sw_rotations

2019-03-26 Thread Noralf Trønnes
Getting rotation info is cheap so we can do it on demand. This is done in preparation for the removal of struct drm_fb_helper_crtc. Cc: Hans de Goede Signed-off-by: Noralf Trønnes --- Hans, You had this comment inline in restore_fbdev_mode_atomic() the last time I sent this out: We want

[PATCH 02/16] drm/fb-helper: dpms_legacy(): Only set on connectors in use

2019-03-26 Thread Noralf Trønnes
For each enabled crtc the functions sets dpms on all registered connectors. Limit this to only doing it once and on the connectors actually in use. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_fb_helper.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git

Re: [PATCH 21/21] drm/fb-helper: Unexport fill_{var,info}

2019-03-26 Thread Noralf Trønnes
Den 26.03.2019 14.20, skrev Daniel Vetter: > Not used by drivers anymore. > > v2: Rebase > > Signed-off-by: Daniel Vetter > --- Reviewed-by: Noralf Trønnes ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lis

Re: [PATCH 20/21] drm/vboxvideo: Use drm_fb_helper_fill_info

2019-03-26 Thread Noralf Trønnes
g Kroah-Hartman > Cc: Hans de Goede > Cc: Daniel Vetter > Cc: Alexander Kapshuk > Cc: Bartlomiej Zolnierkiewicz > --- Reviewed-by: Noralf Trønnes ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

<    4   5   6   7   8   9   10   11   12   13   >