Re: [PATCH v2 13/33] drm/client: Add some tests for drm_connector_pick_cmdline_mode()

2022-09-23 Thread Javier Martinez Canillas
files. also includes quite a few of Linux > header files. > > IMHO the current convention (if any) is far from optimal and we should > consider breaking it. > Yes, I agree with that. But probably we should be explicit about the wrapper export symbols to access static functions pattern in the KUnit docs so other subsystems could do the same and it becomes a convention ? > Best regards > Thomas > -- Best regards, Javier Martinez Canillas Core Platforms Red Hat

Re: [v2] drm/msm: add null checks for drm device to avoid crash during probe defer

2022-09-27 Thread Javier Martinez Canillas
("drm/msm: Make .remove and .shutdown HW shutdown consistent") which is already in the drm/drm-next branch. -- Best regards, Javier Martinez Canillas Core Platforms Red Hat

[PATCH] drm/ssd130x: Synchronize access to dma-buf imported GEM BOs

2022-09-27 Thread Javier Martinez Canillas
Synchronize CPU access to GEM BOs with other drivers when updating the screen buffer. Imported DMA buffers might otherwise contain stale data. Suggested-by: Thomas Zimmermann Signed-off-by: Javier Martinez Canillas --- drivers/gpu/drm/solomon/ssd130x.c | 7 +++ 1 file changed, 7

Re: [PATCH] drm/ssd130x: Use drm_atomic_get_new_plane_state()

2022-09-27 Thread Javier Martinez Canillas
On 9/26/22 09:24, Thomas Zimmermann wrote: > > > Am 23.09.22 um 10:34 schrieb Javier Martinez Canillas: >> The struct drm_plane .state shouldn't be accessed directly but instead the >> drm_atomic_get_new_plane_state() helper function should be used. >> >>

Re: [PATCH] drm/ssd130x: Synchronize access to dma-buf imported GEM BOs

2022-09-27 Thread Javier Martinez Canillas
On 9/27/22 13:18, Thomas Zimmermann wrote: > Hi > > Am 27.09.22 um 11:52 schrieb Javier Martinez Canillas: >> Synchronize CPU access to GEM BOs with other drivers when updating the >> screen buffer. Imported DMA buffers might otherwise contain stale data. >> >>

Re: [PATCH 01/16] drm/udl: Rename struct udl_drm_connector to struct udl_connector

2022-09-29 Thread Javier Martinez Canillas
Hello Thomas, On 9/19/22 15:03, Thomas Zimmermann wrote: > Remove the _drm_ infix from struct udl_drm_connector and introduce a > macro for upcasting from struct drm_connector. No functional changes. > > Signed-off-by: Thomas Zimmermann > --- Reviewed-by: Javier Martinez Cani

Re: [PATCH 02/16] drm/udl: Test pixel limit in mode-config's mode-valid function

2022-09-29 Thread Javier Martinez Canillas
nfig. But since it depends on the {h,v}display, I thought that needed to ask if instead should be for the CRTC. Any in case, Reviewed-by: Javier Martinez Canillas -- Best regards, Javier Martinez Canillas Core Platforms Red Hat

Re: [PATCH 03/16] drm/udl: Use USB timeout constant when reading EDID

2022-09-29 Thread Javier Martinez Canillas
0x02, (0x80 | (0x02 << 5)), bval, > - 0xA1, read_buff, 2, 1000); > + 0xA1, read_buff, 2, USB_CTRL_GET_TIMEOUT); Agreed, much better than an arbitrary 1 sec. Reviewed-by: Javier Martinez Canillas -- Best regards, Javier Martinez Canillas Core Platforms Red Hat

Re: [PATCH 04/16] drm/udl: Various improvements to the connector

2022-09-29 Thread Javier Martinez Canillas
y: Javier Martinez Canillas -- Best regards, Javier Martinez Canillas Core Platforms Red Hat

Re: [PATCH 05/16] drm/udl: Move connector to modesetting code

2022-09-29 Thread Javier Martinez Canillas
ewed-by: Javier Martinez Canillas -- Best regards, Javier Martinez Canillas Core Platforms Red Hat

Re: [PATCH 06/16] drm/udl: Remove udl_simple_display_pipe_mode_valid()

2022-09-29 Thread Javier Martinez Canillas
On 9/19/22 15:03, Thomas Zimmermann wrote: > Remove the empty function udl_simple_display_pipe_mode_valid() and > let simple-KMS helpers accept the modes. No functional changes. > > Signed-off-by: Thomas Zimmermann > --- Reviewed-by: Javier Martinez Canillas -- Best regards,

Re: [PATCH 07/16] drm/udl: Convert to atomic-modesetting helpers

2022-09-29 Thread Javier Martinez Canillas
discoverable and simplifies code sharing. > > The conversion effectively open-codes the simple-KMS functions and > data structure within udl. No functional changes. > > Signed-off-by: Thomas Zimmermann > --- Looks good to me. Reviewed-by: Javier Martinez Canillas -- Best rega

Re: [PATCH 08/16] drm/udl: Simplify modesetting in CRTC's enable function

2022-09-29 Thread Javier Martinez Canillas
Reviewed-by: Javier Martinez Canillas -- Best regards, Javier Martinez Canillas Core Platforms Red Hat

[PATCH] drm/ssd130x: Iterate over damage clips instead of using a merged rect

2022-09-30 Thread Javier Martinez Canillas
m one by one. Suggested-by: Jocelyn Falempe Signed-off-by: Javier Martinez Canillas --- drivers/gpu/drm/solomon/ssd130x.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/solomon/ssd130x.c b/drivers/gpu/drm/solomon/ssd130x.c index bc41a5a

Re: [PATCH] drm/ssd130x: Iterate over damage clips instead of using a merged rect

2022-09-30 Thread Javier Martinez Canillas
Hello Thomas, Thanks a lot for your feedback. On 9/30/22 10:26, Thomas Zimmermann wrote: > Hi > > Am 30.09.22 um 10:01 schrieb Javier Martinez Canillas: >> The drm_atomic_helper_damage_merged() helper merges all the damage clips >> into one rectangle. If there are multi

Re: [PATCH] drm/ssd130x: Iterate over damage clips instead of using a merged rect

2022-09-30 Thread Javier Martinez Canillas
mage area to ssd130x_fb_blit_rect() as the struct drm_rect argument but instead the dst_clip as filled by drm_rect_intersect(). Does that sound correct ? In other words, the following: drm_atomic_helper_damage_iter_init(&iter, old_plane_state, plane_state); drm_atomic_for_each_plane

[PATCH v2] drm/ssd130x: Iterate over damage clips instead of using a merged rect

2022-09-30 Thread Javier Martinez Canillas
m one by one. Suggested-by: Jocelyn Falempe Signed-off-by: Javier Martinez Canillas --- Changes in v2: - Move the dst_clip assignment inside the drm_atomic_for_each_plane_damage() loop (Thomas Zimmermann). - Pass dst_clip instead of damage area as argument to ssd130x_fb_blit_rect() fun

Re: [PATCH v5 0/9] drm: selftest: Convert to KUnit

2022-07-11 Thread Javier Martinez Canillas
elcomed! > > Best Regards, > - Maíra Canal > Thanks for the quick respin. I've pushed this to drm-misc (drm-misc-next). -- Best regards, Javier Martinez Canillas Linux Engineering Red Hat

Re: [PATCH v5 4/9] drm: selftest: convert drm_format selftest to KUnit

2022-07-15 Thread Javier Martinez Canillas
the KUnit API. >>> >>> Tested-by: David Gow >>> Acked-by: Daniel Latypov >>> Reviewed-by: Javier Martinez Canillas >>> Signed-off-by: Maíra Canal >> >> This patch results in: >> >> Building powerpc:allmodcon

Re: [PATCH v2 0/2] drm: A couple of fixes for drm_copy_field() helper function

2022-07-15 Thread Javier Martinez Canillas
On 7/5/22 12:02, Javier Martinez Canillas wrote: > Hello, > > Peter Robinson reported me a kernel bug in one of his aarch64 test boards > and even though I was not able to reproduce it, I think that figured out > what the problem was. It seems the cause is that a DRM driver doesn&

Re: [PATCH 05/11] fbdev: Convert drivers to aperture helpers

2022-07-15 Thread Javier Martinez Canillas
_pci_devices() ? > > I simply don't want change too much at once, because there was this > problem with the PCI helper on ast. > Makes sense. Feel free to add: Reviewed-by: Javier Martinez Canillas > At some point we can make a push to really fix this throughout the code

Re: [PATCH v1 01/11] drm: rename DRIVER_LEGACY to DRIVER_DRI1

2022-07-17 Thread Javier Martinez Canillas
Hello Sam, Thanks a lot for working on this patch-set. On 7/16/22 20:17, Sam Ravnborg wrote: > "legacy" is a general term - be specific and use the term dri1. > The first step is to rename DRIVER_LEGACY to DRIVER_DRI1. > > Suggested-by: Javier Martinez Canillas

Re: [PATCH v1 02/11] drm: Rename CONFIG_DRM_LEGACY to CONFIG_DRM_DRI1

2022-07-17 Thread Javier Martinez Canillas
On 7/16/22 20:17, Sam Ravnborg wrote: > The rename is done to make it more obvious what is DRI1 drivers > and what is other type of legacy. > > Signed-off-by: Sam Ravnborg > --- Reviewed-by: Javier Martinez Canillas -- Best regards, Javier Martinez Canillas Linux Engineering Red Hat

Re: [PATCH v1 03/11] drm/tdfx: Move the tdfx driver to drm/dri1/

2022-07-17 Thread Javier Martinez Canillas
On 7/16/22 20:17, Sam Ravnborg wrote: > drm/dri1 is the new home for all the legacy DRI1 drivers. > > Signed-off-by: Sam Ravnborg > Suggested-by: Javier Martinez Canillas I believe these should be chronological and so the order inverted. Reviewed-by: Javier Martinez Canilla

Re: [PATCH v1 04/11] drm/r128: Move the r128 driver to drm/dri1/

2022-07-17 Thread Javier Martinez Canillas
On 7/16/22 20:17, Sam Ravnborg wrote: > drm/dri1 is the new home for all the legacy DRI1 drivers. > > Signed-off-by: Sam Ravnborg > Suggested-by: Javier Martinez Canillas Ditto here and other patches. Reviewed-by: Javier Martinez Canillas -- Best regards, Javier Martinez Ca

Re: [PATCH v1 05/11] drm/i810: Move the i810 driver to drm/dri1/

2022-07-17 Thread Javier Martinez Canillas
On 7/16/22 20:17, Sam Ravnborg wrote: > drm/dri1 is the new home for all the legacy DRI1 drivers. > > Signed-off-by: Sam Ravnborg > Suggested-by: Javier Martinez Canillas > --- Reviewed-by: Javier Martinez Canillas -- Best regards, Javier Martinez Canillas Linux Engineering Red Hat

Re: [PATCH v1 06/11] drm/mga: Move the mga driver to drm/dri1/

2022-07-17 Thread Javier Martinez Canillas
On 7/16/22 20:17, Sam Ravnborg wrote: > drm/dri1 is the new home for all the legacy DRI1 drivers. > > Signed-off-by: Sam Ravnborg > Suggested-by: Javier Martinez Canillas > --- Reviewed-by: Javier Martinez Canillas -- Best regards, Javier Martinez Canillas Linux Engineering Red Hat

Re: [PATCH v1 06/11] drm/mga: Move the mga driver to drm/dri1/

2022-07-17 Thread Javier Martinez Canillas
On 7/16/22 20:17, Sam Ravnborg wrote: > drm/dri1 is the new home for all the legacy DRI1 drivers. > > Signed-off-by: Sam Ravnborg > Suggested-by: Javier Martinez Canillas > --- Reviewed-by: Javier Martinez Canillas -- Best regards, Javier Martinez Canillas Linux Engineering Red Hat

Re: [PATCH v1 07/11] drm/sis: Move the sis driver to drm/dri1/

2022-07-17 Thread Javier Martinez Canillas
On 7/16/22 20:17, Sam Ravnborg wrote: > drm/dri1 is the new home for all the legacy DRI1 drivers. > > Signed-off-by: Sam Ravnborg > Suggested-by: Javier Martinez Canillas > --- Reviewed-by: Javier Martinez Canillas -- Best regards, Javier Martinez Canillas Linux Engineering Red Hat

Re: [PATCH v1 08/11] drm/via: Move the via driver to drm/dri1/

2022-07-17 Thread Javier Martinez Canillas
On 7/16/22 20:17, Sam Ravnborg wrote: > drm/dri1 is the new home for all the legacy DRI1 drivers. > Used the opportunity to rename the file to via.c to match the > name of the driver. > > Signed-off-by: Sam Ravnborg > Suggested-by: Javier Martinez Canillas > --- Reviewe

Re: [PATCH v1 09/11] drm/savage: Move the savage driver to drm/dri1/

2022-07-17 Thread Javier Martinez Canillas
On 7/16/22 20:17, Sam Ravnborg wrote: > drm/dri1 is the new home for all the legacy DRI1 drivers. > > Signed-off-by: Sam Ravnborg > Suggested-by: Javier Martinez Canillas > --- Reviewed-by: Javier Martinez Canillas I wonder if we should just squash patches 03/11 to 09/11 into

Re: [PATCH v1 10/11] drm/dri1: Move Kconfig logic to drm/dri1

2022-07-17 Thread Javier Martinez Canillas
On 7/16/22 20:17, Sam Ravnborg wrote: > Move the DRI1 section from drm/Kconfig to a new Kconfig > file that lives in the dri1/ directory. > This isolates more of the DRI1 functionality. > > Signed-off-by: Sam Ravnborg > --- Reviewed-by: Javier Martinez Canillas -- Bes

Re: [PATCH v1 11/11] drm: Move dri1 core files to drm/dri1

2022-07-17 Thread Javier Martinez Canillas
> --- This patch shows how having them into a separate sub-directory pays it forward since you won't even see any of these drm_ core files if not interested about DRI1 drivers. Reviewed-by: Javier Martinez Canillas -- Best regards, Javier Martinez Canillas Linux Engineering Red Hat

Re: [PATCH] drm/ssd130x: Use new regmap bulk write support to drop custom bus

2022-07-18 Thread Javier Martinez Canillas
Hello Sam, On 6/24/22 21:37, Sam Ravnborg wrote: > Hi Javier, > > On Sat, Jun 18, 2022 at 07:43:38PM +0200, Javier Martinez Canillas wrote: >> Data writes for the ssd130x 4-wire SPI protocol need special handling, due >> the Data/Command control (D/C) pin having to be toggl

Re: [PATCH v1 0/11] drm: move dri1 drivers to drm/dri1/

2022-07-18 Thread Javier Martinez Canillas
nto a different dir as Sam did would be preferable. What would be the upside of having it in drivers/gpu/drm instead? Just to avoid the Makefile rule to have a dri1/ prefix in the included object files ? Regardless of this discussion, I think that at the very least we should rename the Kconfig symbols to CONFIG_DRM_DRI1_* even if DRI1 drivers are kept in drivers/gpu/drm/ instead of moved to a drivers/gpu/drm/dri1/ dir. -- Best regards, Javier Martinez Canillas Linux Engineering Red Hat

Re: [PATCH v1 0/11] drm: move dri1 drivers to drm/dri1/

2022-07-18 Thread Javier Martinez Canillas
of moving the core files into dri1/, the resulting Makefile >>> rule looks really ugly. I'd suggest to move all code into a separate >> >> Maybe this could be sorted by splitting the DRI1 core bits in a separate >> drm_dri1.ko module? > > The dri1 core files cannot be in a separate module as they are linked > with other core stuff. It would result in dependency cycles IIRC. > Got it. -- Best regards, Javier Martinez Canillas Linux Engineering Red Hat

Re: [PATCH v1 0/11] drm: move dri1 drivers to drm/dri1/

2022-07-19 Thread Javier Martinez Canillas
sy to do but I will take a look at the result before posting >>anything. >> >> When I have posted the above let's see what we all agree on. >> May take a couple of days before I get back to it. > > Sounds like a plan to me. > Sounds good to me as well. -- Best regards, Javier Martinez Canillas Linux Engineering Red Hat

Re: [PATCH] fbdev: Fix order of arguments to aperture_remove_conflicting_devices()

2022-07-21 Thread Javier Martinez Canillas
; Fixes: 8d69d008f44c ("fbdev: Convert drivers to aperture helpers") > Cc: Thomas Zimmermann > Cc: Javier Martinez Canillas > Cc: Sudip Mukherjee > Cc: Teddy Wang > Cc: Benjamin Herrenschmidt > Cc: "K. Y. Srinivasan" > Cc: Haiyang Zhang > Cc: S

[PATCH] drm/bridge: ti-sn65dsi86: Use dev_err_probe() to avoid polluting the log

2022-07-22 Thread Javier Martinez Canillas
;failed to create panel bridge" | wc -l 38 Signed-off-by: Javier Martinez Canillas --- drivers/gpu/drm/bridge/ti-sn65dsi86.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c ind

Re: [PATCH] drm/bridge: ti-sn65dsi86: Use dev_err_probe() to avoid polluting the log

2022-07-22 Thread Javier Martinez Canillas
On 7/22/22 15:35, Doug Anderson wrote: > Hi, > > On Fri, Jul 22, 2022 at 12:48 AM Javier Martinez Canillas > wrote: >> >> If devm_drm_of_get_bridge() can't find the connected bridge, it returns an >> ERR_PTR(-EPROBE_DEFER) to indicate that the probe should be

[PATCH] drm/msm: Make .remove and .shutdown HW shutdown consistent

2022-07-23 Thread Javier Martinez Canillas
laces, let's unify in a single helper function that could be used for the two callbacks. Signed-off-by: Javier Martinez Canillas --- drivers/gpu/drm/msm/msm_drv.c | 31 +-- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_drv.c b/

Re: [PATCH] drm/msm: Make .remove and .shutdown HW shutdown consistent

2022-07-24 Thread Javier Martinez Canillas
On 7/24/22 10:53, Dmitry Baryshkov wrote: > On Sun, 24 Jul 2022 at 00:09, Javier Martinez Canillas [...] >> - >> /* >> * Shutdown the hw if we're far enough along where things might be >> on. >> * If we run this too early, we

Re: [PATCH] drm/msm: Make .remove and .shutdown HW shutdown consistent

2022-07-24 Thread Javier Martinez Canillas
On 7/24/22 11:06, Javier Martinez Canillas wrote: [...] > > I guess one option is to do the if (dev->registered) check in the callers but > then it won't really be worth it to have a helper and we could just add that > check in msm_drv_shutdown() t

[PATCH v2] drm/msm: Make .remove and .shutdown HW shutdown consistent

2022-07-24 Thread Javier Martinez Canillas
case GPU components failed to bind") Signed-off-by: Javier Martinez Canillas --- Changes in v2: - Take the registered check out of the msm_shutdown_hw() and make callers to check instead. - Make msm_shutdown_hw() an inline function. - Add a Fixes: tag. drivers/gpu/drm/msm/msm_drv.c | 29 +

[PATCH] drm: Prevent modeset helpers to access an uninitialized drm_mode_config

2022-07-24 Thread Javier Martinez Canillas
n, by marking a struct drm_mode_config as initialized during drmm_mode_config_init(). that way helpers can check for it and not attempt to grab uninitialized mutexes. Signed-off-by: Javier Martinez Canillas --- drivers/gpu/drm/drm_mode_config.c | 4 drivers/gpu/drm/drm_modeset_lock.

Re: [PATCH] drm: Prevent modeset helpers to access an uninitialized drm_mode_config

2022-07-24 Thread Javier Martinez Canillas
Hello Thomas, Thanks for your feedback. On 7/24/22 20:24, Thomas Zimmermann wrote: > Hi Javier > > Am 24.07.22 um 14:37 schrieb Javier Martinez Canillas: >> DRM drivers initialize the mode configuration with drmm_mode_config_init() >> and that function (among other things

Re: [PATCH v2] drm/msm: Make .remove and .shutdown HW shutdown consistent

2022-07-24 Thread Javier Martinez Canillas
Hello Dmitry, Thanks for your feedback. On 7/24/22 20:36, Dmitry Baryshkov wrote: > On Sun, 24 Jul 2022 at 14:13, Javier Martinez Canillas > wrote: [...] >> >> +/* >> + * Shutdown the hw if we're far enough along where things might be on. >> + * If

Re: [PATCH v2] drm/msm: Make .remove and .shutdown HW shutdown consistent

2022-07-24 Thread Javier Martinez Canillas
On 7/24/22 20:47, Javier Martinez Canillas wrote: > Hello Dmitry, [...] >> Now there is no point in having this as a separate function. Could you > > The only reason why I kept this was to avoid duplicating the same comment > in two places. I thought that an inline function wo

Re: [PATCH v2] drm/msm: Make .remove and .shutdown HW shutdown consistent

2022-07-24 Thread Javier Martinez Canillas
On 7/24/22 22:10, Dmitry Baryshkov wrote: > On Sun, 24 Jul 2022 at 22:51, Javier Martinez Canillas > wrote: >> >> On 7/24/22 20:47, Javier Martinez Canillas wrote: >>> Hello Dmitry, >> >> [...] >> >>>> Now there is no point in having this

[PATCH v3] drm/msm: Make .remove and .shutdown HW shutdown consistent

2022-07-25 Thread Javier Martinez Canillas
splay platform_driver") Signed-off-by: Javier Martinez Canillas --- Changes in v3: - Drop the msm_shutdown_hw() wrapper and just call drm_atomic_helper_shutdown() in both callbacks (Dmitry Baryshkov). - Copy the comment in msm_drm_uninit() to msm_drv_shutdown() (Dmitry Baryshkov). Change

[PATCH] fbdev: Make registered_fb[] private to fbmem.c

2022-07-25 Thread Javier Martinez Canillas
r Martinez Canillas Signed-off-by: Javier Martinez Canillas --- drivers/video/fbdev/core/fbmem.c | 6 +++--- include/linux/fb.h | 6 -- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c index 6a

Re: [PATCH] drm: Prevent modeset helpers to access an uninitialized drm_mode_config

2022-07-25 Thread Javier Martinez Canillas
all to the drm_atomic_helper_shutdown() which will try to grab uninitialized mutexes and crash the kernel. Yes, I already posted a patch for msm/drm to prevent this but as mentioned a lot of drivers still have that issue. We could audit all drivers and fix them but I think we need to make

Re: [PATCH v2 01/10] drm/simpledrm: Remove mem field from device structure

2022-07-25 Thread Javier Martinez Canillas
On 7/20/22 16:27, Thomas Zimmermann wrote: > Remove the unused mem field from struct simpledrm_device. > > Signed-off-by: Thomas Zimmermann > --- Acked-by: Javier Martinez Canillas -- Best regards, Javier Martinez Canillas Linux Engineering Red Hat

Re: [PATCH v2 02/10] drm/simpledrm: Inline device-init helpers

2022-07-25 Thread Javier Martinez Canillas
is desirable? Without this additional context, this feels like going backwards, since you are dropping few helpers that have quite self contained code and making simpledrm_device_create() much larger. -- Best regards, Javier Martinez Canillas Linux Engineering Red Hat

Re: [PATCH v2 03/10] drm/simpledrm: Remove pdev field from device structure

2022-07-25 Thread Javier Martinez Canillas
On 7/20/22 16:27, Thomas Zimmermann wrote: > Replace the remaining uses of the field pdev by upcasts from the Linux > device and remove the field. > > Signed-off-by: Thomas Zimmermann Much better indeed. Acked-by: Javier Martinez Canillas -- Best regards, Javier Martinez Ca

Re: [PATCH v2 04/10] drm/simpledrm: Compute framebuffer stride if not set

2022-07-25 Thread Javier Martinez Canillas
uot;no simplefb configuration found\n"); >> return ERR_PTR(-ENODEV); >> } >> + if (!stride) >> + stride = format->cpp[0] * width; > > DIV_ROUND_UP(drm_format_info_bpp(format) * width, 8) > I think you mea

Re: [PATCH v2 05/10] drm/simpledrm: Convert to atomic helpers

2022-07-25 Thread Javier Martinez Canillas
On 7/20/22 16:27, Thomas Zimmermann wrote: > Replace the simple-KMS helpers with the regular atomic helpers. The > regular helpers are better architectured and therefore allow for easier > code sharing among drivers. No functional changes. > Acked-by: Javier Martinez Canillas

Re: [PATCH v2 06/10] drm/simpledrm: Move some functionality into fwfb helper library

2022-07-25 Thread Javier Martinez Canillas
_t *fourccs_end = fourccs + nfourccs; > + > + while (fourccs < fourccs_end) { > + if (*fourccs == fourcc) > + return true; > + ++fourccs; > + } > + return false; > +} This seems a helper that could be useful besides the drm_fwfb_helper.c fi

Re: [PATCH v2 07/10] drm/ofdrm: Add ofdrm for Open Firmware framebuffers

2022-07-26 Thread Javier Martinez Canillas
nd > color format is pre-initialized by the system's firmware. Runtime > modesetting via DRM is not possible. The display is useful during > early boot stages or as error fallback. > I'm not familiar with OF display but the driver looks good to me. Reviewed-by: Javier Martine

Re: [PATCH v2 08/10] drm/ofdrm: Add CRTC state

2022-07-26 Thread Javier Martinez Canillas
On 7/20/22 16:27, Thomas Zimmermann wrote: > Add a dedicated CRTC state to ofdrm to later store information for > palette updates. > > Signed-off-by: Thomas Zimmermann > --- > drivers/gpu/drm/tiny/ofdrm.c | 62 ++-- > Reviewed-by: Jav

Re: [PATCH v2 09/10] drm/ofdrm: Add per-model device function

2022-07-26 Thread Javier Martinez Canillas
On 7/20/22 16:27, Thomas Zimmermann wrote: > Add a per-model device-function structure in preparation of adding > color-management support. Detection of the individual models has been > taken from fbdev's offb. > > Signed-off-by: Thomas Zimmermann > --- Reviewed-by: J

Re: [PATCH v2 10/10] drm/ofdrm: Support color management

2022-07-26 Thread Javier Martinez Canillas
> format field in ofdrm's custom CRTC state. The CRTC's atomic_flush > helper updates the palette for the format as needed. > > Signed-off-by: Thomas Zimmermann > --- Reviewed-by: Javier Martinez Canillas [...] > +static void __iomem *ofdrm_mach64_cmap_ioremap(struct of

Re: [PATCH v2 09/10] drm/ofdrm: Add per-model device function

2022-07-26 Thread Javier Martinez Canillas
Hello Michal, On 7/26/22 16:40, Michal Suchánek wrote: > Hello, > > On Tue, Jul 26, 2022 at 03:38:37PM +0200, Javier Martinez Canillas wrote: >> On 7/20/22 16:27, Thomas Zimmermann wrote: >>> Add a per-model device-function structure in preparation of adding >

Re: [PATCH v2 02/10] drm/simpledrm: Inline device-init helpers

2022-07-27 Thread Javier Martinez Canillas
Hello Thomas, On 7/27/22 09:50, Thomas Zimmermann wrote: > Hi > > Am 25.07.22 um 17:01 schrieb Javier Martinez Canillas: >> Hello Thomas, >> >> On 7/20/22 16:27, Thomas Zimmermann wrote: >>> Inline the helpers for initializing the hardware FB, the memory >

Re: [PATCH v2 06/10] drm/simpledrm: Move some functionality into fwfb helper library

2022-07-27 Thread Javier Martinez Canillas
On 7/27/22 10:24, Thomas Zimmermann wrote: > Hi > > Am 25.07.22 um 18:23 schrieb Javier Martinez Canillas: >> On 7/20/22 16:27, Thomas Zimmermann wrote: >>> Move some of simpledrm's functionality into a helper library. Other >>> drivers for firmware-provided

Re: [PATCH v2 10/10] drm/ofdrm: Support color management

2022-07-27 Thread Javier Martinez Canillas
so the CRTC palette can be applied in >> the .atomic_flush callback ? > > Yeah, this code is one reason for not sharing atomic_check in fwfb. The > other reason is that the fwfb code is only a wrapper around the atomic > helpers with little extra value. I did have such fwfb helpers a some > point, but removed them. > Got it. -- Best regards, Javier Martinez Canillas Linux Engineering Red Hat

[PATCH] drm/fb-helper: improve DRM fbdev emulation device names

2021-05-21 Thread Javier Martinez Canillas
et's just add a "-fb" suffix to denote that are DRM drivers FB: $ cat /proc/fb 0 rockchipdrm-fb $ cat /proc/fb 0 simpledrm-fb Suggested-by: Peter Robinson Signed-off-by: Javier Martinez Canillas --- drivers/gpu/drm/drm_fb_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deleti

Re: [PATCH] drm/fb-helper: improve DRM fbdev emulation device names

2021-05-21 Thread Javier Martinez Canillas
d a suffix anyway? > Yes, I thought the same and was torn about posting a patch to just remove the suffix. I don't think users care that much if is a fb device from a fbdev driver or a DRM driver using the fbdev emulation. >> -Daniel >> Best regards, -- Javier Martinez Can

[PATCH 1/2] drivers/firmware: move x86 Generic System Framebuffers support

2021-05-21 Thread Javier Martinez Canillas
and can be moved out of the arch/x86 directory. Signed-off-by: Javier Martinez Canillas --- arch/x86/Kconfig | 27 +--- arch/x86/kernel/Makefile | 3 -- drivers/firmware/Kconfig | 31 +++ driver

[PATCH 0/2] allow the sysfb support to be used in non-x86 arches

2021-05-21 Thread Javier Martinez Canillas
are being introduced by these changes. Since this touches both arch/{x86,arm,arm64,riscv} and drivers/firmware, I don't know how it should be merged. But I didn't find a way to split these. Best regards, Javier Javier Martinez Canillas (2): drivers/firmware: move x86 Generic System

[PATCH 2/2] drivers/firmware: consolidate EFI framebuffer setup for all arches

2021-05-21 Thread Javier Martinez Canillas
and other architectures using EFI, consolidate the two in sysfb and remove it from the EFI init logic. Signed-off-by: Javier Martinez Canillas --- arch/arm/Kconfig | 1 + arch/arm/include/asm/efi.h| 5 +- arch/arm64/Kconfig| 1 + arch/arm64/include

Re: [PATCH 0/2] allow the sysfb support to be used in non-x86 arches

2021-05-24 Thread Javier Martinez Canillas
logic in register_gop_device(), but that would require even more code duplication. Another option would be to make the simple drivers to match against "efi-framebuffer", but that would be an ugly solution. But even without taking the lack of "simple-framebuffer" into accoun

Re: [PATCH] drm/fb-helper: improve DRM fbdev emulation device names

2021-05-25 Thread Javier Martinez Canillas
then. Thanks you both for the feedback. > > Best regards > Thomas > >> -Daniel >> > Best regards, -- Javier Martinez Canillas Software Engineer New Platform Technologies Enablement team RHEL Engineering

[PATCH v2] drm/fb-helper: improve DRM fbdev emulation device names

2021-05-25 Thread Javier Martinez Canillas
vice, and there are better ways to query that info than reading this procfs entry. So let's just remove the suffix, which leads to much better device names: $ cat /proc/fb 0 rockchipdrm $ cat /proc/fb 0 simpledrm Suggested-by: Thomas Zimmermann Signed-off-by: Javier Martinez Canillas --

Re: [PATCH v2] drm/rockchip: remove existing generic drivers to take over the device

2021-05-27 Thread Javier Martinez Canillas
Hello Thomas, On 5/16/21 12:30 PM, Thomas Zimmermann wrote: > > > Am 16.05.21 um 09:48 schrieb Javier Martinez Canillas: >> There are drivers that register framebuffer devices very early in the boot >> process and make use of the existing framebuffer as setup by the firm

Re: [PATCH 2/2] drivers/firmware: consolidate EFI framebuffer setup for all arches

2021-05-28 Thread Javier Martinez Canillas
as you mentioned. This not only is a cleaner approach but also will allow to not touch all the architectures platform code. I'll wait for a few more days in case someone else has feedback and post a v2. > Best regards > Thomas > > Best regards, -- Javier Martinez Canillas Software Engineer New Platform Technologies Enablement team RHEL Engineering

[PATCH v2 0/2] allow simple{fb, drm} drivers to be used on non-x86 EFI platforms

2021-06-01 Thread Javier Martinez Canillas
tures instead of selecting it. - Improve commit message to explain the benefits of reusing sysfb for !X86. Javier Martinez Canillas (2): drivers/firmware: move x86 Generic System Framebuffers support drivers/firmware: consolidate EFI framebuffer setup for all arches arch/arm/incl

[PATCH v2 1/2] drivers/firmware: move x86 Generic System Framebuffers support

2021-06-01 Thread Javier Martinez Canillas
and can be moved out of the arch/x86 directory. This will allow to also support the simple{fb,drm} drivers on non-x86 EFI platforms, such as aarch64 where these drivers are only supported with DT. Signed-off-by: Javier Martinez Canillas --- Changes in v2: - Use default y and depends on X86 inste

[PATCH v2 2/2] drivers/firmware: consolidate EFI framebuffer setup for all arches

2021-06-01 Thread Javier Martinez Canillas
at's there to sysfb driver. Signed-off-by: Javier Martinez Canillas --- Changes in v2: - Use "depends on" for the supported architectures instead of selecting it. - Improve commit message to explain the benefits of reusing sysfb for !X86. arch/arm/include/asm/efi.h| 5 +- arch/a

Re: [PATCH v2 0/2] allow simple{fb, drm} drivers to be used on non-x86 EFI platforms

2021-06-04 Thread Javier Martinez Canillas
Hello Borislav, On 6/3/21 10:27 PM, Borislav Petkov wrote: > On Tue, Jun 01, 2021 at 04:59:10PM +0200, Javier Martinez Canillas wrote: >> The series touches different subystems and will need coordination between >> maintainers. Ard Biesheuvel said that can be merged through the EFI

Re: [PATCH v2 0/2] allow simple{fb, drm} drivers to be used on non-x86 EFI platforms

2021-06-04 Thread Javier Martinez Canillas
On 6/4/21 2:20 PM, Andy Shevchenko wrote: > On Fri, Jun 04, 2021 at 11:41:29AM +0200, Javier Martinez Canillas wrote: >> On 6/3/21 10:27 PM, Borislav Petkov wrote: >>> On Tue, Jun 01, 2021 at 04:59:10PM +0200, Javier Martinez Canillas wrote: [snip] > > For myself I wro

Re: [PATCH v2 2/2] drivers/firmware: consolidate EFI framebuffer setup for all arches

2021-06-23 Thread Javier Martinez Canillas
uot;; >> else >> -name = "platform-framebuffer"; >> +pd->name = "platform-framebuffer"; > > You're allocating the platform device with an empty name string. And > here you're overwriting the pointer. Can you rearran

[PATCH v3 0/2] allow simple{fb, drm} drivers to be used on non-x86 EFI platforms

2021-06-25 Thread Javier Martinez Canillas
Use "depends on" for the supported architectures instead of selecting it. - Improve commit message to explain the benefits of reusing sysfb for !X86. Javier Martinez Canillas (2): drivers/firmware: move x86 Generic System Framebuffers support drivers/firmware: consoli

[PATCH v3 1/2] drivers/firmware: move x86 Generic System Framebuffers support

2021-06-25 Thread Javier Martinez Canillas
and can be moved out of the arch/x86 directory. This will allow to also support the simple{fb,drm} drivers on non-x86 EFI platforms, such as aarch64 where these drivers are only supported with DT. Signed-off-by: Javier Martinez Canillas Acked-by: Borislav Petkov Acked-by: Greg Kroah-Hartman --

[PATCH v3 2/2] drivers/firmware: consolidate EFI framebuffer setup for all arches

2021-06-25 Thread Javier Martinez Canillas
at's there to sysfb driver. Signed-off-by: Javier Martinez Canillas Acked-by: Borislav Petkov --- Changes in v3: - Also update the SYSFB_SIMPLEFB symbol name in drivers/gpu/drm/tiny/Kconfig. - We have a a max 100 char limit now, use it to avoid multi-line statements. - Figure out the platform devi

[PATCH] drm/ssd130x: Init display before the SSD130X_DISPLAY_ON command

2023-01-25 Thread Javier Martinez Canillas
l. Besides fixing the panel not being turned on when using SPI, it also gets rid of the custom CRTC .reset callback. Fixes: 622113b9f11f ("drm/ssd130x: Replace simple display helpers with the atomic helpers") Signed-off-by: Javier Martinez Canillas --- drivers/gpu/drm/so

Re: [PATCH] drm/ssd130x: Init display before the SSD130X_DISPLAY_ON command

2023-01-26 Thread Javier Martinez Canillas
On 1/25/23 20:56, Thomas Zimmermann wrote: > > > Am 25.01.23 um 19:42 schrieb Javier Martinez Canillas: >> Commit 622113b9f11f ("drm/ssd130x: Replace simple display helpers with the >> atomic helpers") changed the driver to just use the atomic helpers instead &

Re: [PATCH] drm/shmem-helper: Fix locking for drm_gem_shmem_get_pages_sgt()

2023-02-06 Thread Javier Martinez Canillas
g locking to write the Rust abstractions. > > Fixes: 2194a63a818d ("drm: Add library for shmem backed GEM objects") > Fixes: 4fa3d66f132b ("drm/shmem: Do dma_unmap_sg before purging pages") > Signed-off-by: Asahi Lina > --- Good catch. The patch looks good t

Re: [PATCH] drm/shmem-helper: Fix locking for drm_gem_shmem_get_pages_sgt()

2023-02-07 Thread Javier Martinez Canillas
On 2/7/23 11:33, Asahi Lina wrote: > On 07/02/2023 03.47, Javier Martinez Canillas wrote: >> Hello Lina, >> >> On 2/5/23 13:51, Asahi Lina wrote: >>> Other functions touching shmem->sgt take the pages lock, so do that here >>> too. drm_gem_shmem_get_pages

Re: [PATCH] drm/shmem-helper: Fix locking for drm_gem_shmem_get_pages_sgt()

2023-02-10 Thread Javier Martinez Canillas
On 2/6/23 19:47, Javier Martinez Canillas wrote: > Hello Lina, > > On 2/5/23 13:51, Asahi Lina wrote: >> Other functions touching shmem->sgt take the pages lock, so do that here >> too. drm_gem_shmem_get_pages() & co take the same lock, so move to the >> _lo

Re: [PATCH 1/4] drm/vc4: hdmi: Replace hardcoded value by define

2023-02-13 Thread Javier Martinez Canillas
On 1/26/23 18:05, Maxime Ripard wrote: > The 120MHz value hardcoded in the call to max_t to compute the HSM rate > is defined in the driver as HSM_MIN_CLOCK_FREQ, let's switch to it so > that it's more readable. > > Signed-off-by: Maxime Ripard > --- Reviewed-

Re: [PATCH 2/4] drm/vc4: hdmi: Enable power domain before setting minimum

2023-02-13 Thread Javier Martinez Canillas
do is to enable the power domain that a controller is part of, before attempting to change the rate for one of its clocks. So the patch looks good to me. Reviewed-by: Javier Martinez Canillas -- Best regards, Javier Martinez Canillas Core Platforms Red Hat

Re: [PATCH 3/4] Revert "drm/vc4: hdmi: Fix HSM clock too low on Pi4"

2023-02-13 Thread Javier Martinez Canillas
ryPi0-3. > > Since we're not using that driver for our HDMI clocks, we can now revert > that inelegant solution. > > Signed-off-by: Maxime Ripard > --- Reviewed-by: Javier Martinez Canillas -- Best regards, Javier Martinez Canillas Core Platforms Red Hat

Re: [PATCH 4/4] Revert "drm/vc4: hdmi: Enforce the minimum rate at runtime_resume"

2023-02-13 Thread Javier Martinez Canillas
ver on the RaspberryPi0-3. > > Since we're not using that driver for our HDMI clocks, we can now revert > it. > > Signed-off-by: Maxime Ripard > --- Reviewed-by: Javier Martinez Canillas -- Best regards, Javier Martinez Canillas Core Platforms Red Hat

Re: [PATCH 01/11] fbdev: Fix contact info in fb_cmdline.c

2023-02-17 Thread Javier Martinez Canillas
Thomas Zimmermann writes: > Fix Daniel's email address. No functional changes. > > Signed-off-by: Thomas Zimmermann > Cc: Daniel Vetter > --- Reviewed-by: Javier Martinez Canillas Best regards, Javier

Re: [PATCH 02/11] fbdev: Transfer video= option strings to caller; clarify ownership

2023-02-17 Thread Javier Martinez Canillas
Thomas Zimmermann writes: > In fb_get_options(), always duplicate the returned option string and > transfer ownership of the memory to the function's caller. > > Until now, only the global option string got duplicated and transferred > to the caller; the per-driver options were owned by fb_get_op

Re: [PATCH 03/11] fbdev: Support NULL for name in option-string lookup

2023-02-17 Thread Javier Martinez Canillas
name could be NULL ? Reviewed-by: Javier Martinez Canillas Best regards, Javier

Re: [PATCH 04/11] drivers/ps3: Read video= option with fb_get_option()

2023-02-17 Thread Javier Martinez Canillas
Thomas Zimmermann writes: > Get the kernel's global video= parameter with fb_get_option(). Done > to unexport the internal fbdev state fb_mode_config. No functional > changes. > > Signed-off-by: Thomas Zimmermann > --- Reviewed-by: Javier Martinez Canillas Best regards, Javier

Re: [PATCH 05/11] fbdev: Read video= option with fb_get_option() in modedb

2023-02-17 Thread Javier Martinez Canillas
Thomas Zimmermann writes: > Get the kernel's global video= parameter with fb_get_option(). Done > to unexport the internal fbdev state fb_mode_config. No functional > changes. > > Signed-off-by: Thomas Zimmermann > --- Reviewed-by: Javier Martinez Canillas Best regards, Javier

Re: [PATCH 06/11] fbdev: Unexport fb_mode_option

2023-02-17 Thread Javier Martinez Canillas
Thomas Zimmermann writes: > There are no external users of fb_mode_option. Unexport the variable > and declare it static. > > Signed-off-by: Thomas Zimmermann > --- Reviewed-by: Javier Martinez Canillas Best regards, Javier

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