Re: [PATCH 07/11] drm/gma500: Use fbdev client helpers

2024-05-08 Thread Patrik Jakobsson
On Tue, May 7, 2024 at 2:04 PM Thomas Zimmermann wrote: > > Implement struct drm_client_funcs with the respective helpers and > remove the custom code from the emulation. The generic helpers are > equivalent in functionality. > > Signed-off-by: Thomas Zimmermann Acked-by

Re: [PATCH][next] drm/gma500: Fix spelling mistake "patter" -> "pattern"

2024-05-03 Thread Patrik Jakobsson
On Thu, Mar 14, 2024 at 5:35 PM Colin Ian King wrote: > > There is a spelling mistake in a DRM_DEBUG_KMS message. Fix it. > > Signed-off-by: Colin Ian King Applied to drm-misc-next Thanks Patrik > --- > drivers/gpu/drm/gma500/cdv_intel_dp.c | 2 +- > 1 file changed, 1 insertion(+), 1

Re: [bug-report] task info hung problem in fb_deferred_io_work()

2024-04-30 Thread Patrik Jakobsson
On Fri, Apr 19, 2024 at 5:34 PM Nam Cao wrote: > > On 2024-04-19 Patrik Jakobsson wrote: > > Neither cancel_delayed_work_sync() or flush_delayed_work() prevent new > > work from being scheduled after they return. > > flush_delayed_work() is called during device closing.

Re: [bug-report] task info hung problem in fb_deferred_io_work()

2024-04-19 Thread Patrik Jakobsson
On Fri, Apr 19, 2024 at 9:45 AM Takashi Iwai wrote: > > On Fri, 19 Apr 2024 09:39:09 +0200, > Harshit Mogalapalli wrote: > > > > Hi Takashi, > > > > On 19/04/24 12:14, Takashi Iwai wrote: > > > On Thu, 18 Apr 2024 21:29:57 +0200, > > > Helge Deller wrote: > > >> > > >> On 4/18/24 16:26, Takashi

Re: [bug-report] task info hung problem in fb_deferred_io_work()

2024-04-18 Thread Patrik Jakobsson
On Thu, Apr 18, 2024 at 4:05 PM Nam Cao wrote: > > On 2024-04-18 Patrik Jakobsson wrote: > > This sounds similar to the SUSE bug [1]. We fixed it by reverting [2] > > in the SUSE kernel. The problem seems to be that flush_delayed_work() > > kills the timer and re-que

Re: [bug-report] task info hung problem in fb_deferred_io_work()

2024-04-18 Thread Patrik Jakobsson
On Thu, Apr 18, 2024 at 2:40 PM Harshit Mogalapalli wrote: > > Hi, > > While fuzzing 5.15.y kernel with Syzkaller, we noticed a INFO: task hung > bug in fb_deferred_io_work() > > > This is in 5.15.149 tag, and this is introduced by a set of commits: > > 2655757a3f10 fbdev: flush deferred IO

Re: [PATCH] drm/gma500: Remove lid code

2024-04-17 Thread Patrik Jakobsson
. 2024 um 13:57 Uhr schrieb Patrik Jakobsson > : >> >> On Mon, Apr 15, 2024 at 1:45 PM Thomas Zimmermann >> wrote: >> > >> > Hi >> > >> > Am 15.04.24 um 13:27 schrieb Patrik Jakobsson: >> > > Due to a change in the order of initial

Re: [PATCH] drm/gma500: Remove lid code

2024-04-15 Thread Patrik Jakobsson
On Mon, Apr 15, 2024 at 1:45 PM Thomas Zimmermann wrote: > > Hi > > Am 15.04.24 um 13:27 schrieb Patrik Jakobsson: > > Due to a change in the order of initialization, the lid timer got > > started before proper setup was made. This resulted in a crash during > >

[PATCH] drm/gma500: Remove lid code

2024-04-15 Thread Patrik Jakobsson
by the graphics driver so let's get rid of the lid code. This fixes the crash during boot. Fixes: 8f1aaccb04b7 ("drm/gma500: Implement client-based fbdev emulation") Cc: Enrico Bartky Cc: Thomas Zimmermann Signed-off-by: Patrik Jakobsson --- drivers/gpu/drm/gma500/Makefile | 1 - d

Re: [PATCH] drm/gma500: Check power status before accessing lid data in opregion

2024-04-12 Thread Patrik Jakobsson
alled before initialization. That might be another place to look. I'll see if I can do some testing on my own. > > Best regards > Thomas > > Am 12.04.24 um 09:24 schrieb Patrik Jakobsson: > > Due to changes in the order of initialization the psb_lid_timer_func > > could get calle

[PATCH] drm/gma500: Check power status before accessing lid data in opregion

2024-04-12 Thread Patrik Jakobsson
Due to changes in the order of initialization the psb_lid_timer_func could get called without the device being powered. Fix this by checking the power status before accessing the opregion. Cc: Enrico Bartky Cc: Thomas Zimmermann Signed-off-by: Patrik Jakobsson --- drivers/gpu/drm/gma500

Re: [PATCH v1 1/1] drm/gma500: Remove unused intel-mid.h

2024-03-11 Thread Patrik Jakobsson
On Tue, Mar 5, 2024 at 5:09 PM Andy Shevchenko wrote: > > intel-mid.h is providing some core parts of the South Complex PM, > which are usually are not used by individual drivers. In particular, > this driver doesn't use it, so simply remove the unused header. > Applied to drm-misc-next Thanks

Re: [PATCH] drm: Clean up errors in cdv_intel_dp.h

2024-01-11 Thread Patrik Jakobsson
On Thu, Jan 11, 2024 at 06:56:48AM +, GuoHua Chen wrote: Hi, Please use the correct prefix: drm/gma500 Also, the change is made in cdv_intel_dp.c and not cdv_intel_dp.h. This seems to be wrong in most of the patches you sent. Please send these fixes as a series. That makes them easier to

Re: [PATCH v2] drm/gma500: refactor deprecated strncpy

2023-09-27 Thread Patrik Jakobsson
On Tue, Sep 19, 2023 at 04:41:16AM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We should prefer more robust and less ambiguous string interfaces. > > Since `chan->base.name` is expected to be NUL-terminated, a suitable > replacement

Re: [PATCH] MAINTAINERS: Update gma500 git repo

2023-09-21 Thread Patrik Jakobsson
On Thu, Sep 21, 2023 at 1:00 PM Maxime Ripard wrote: > > The GMA500 driver has been handled through drm-misc for a while but the > git repo hasn't been updated. Make sure it points to the right place. > > Signed-off-by: Maxime Ripard Acked-by: Patrik Jakobsson > > --- >

Re: MAINTAINERS: Update drm-misc entry to match all drivers

2023-09-21 Thread Patrik Jakobsson
On Thu, Sep 21, 2023 at 10:47:58AM +0200, Maxime Ripard wrote: > Hi, > > Adding Paul in Cc > > On Thu, Sep 21, 2023 at 04:25:50PM +0800, suijingfeng wrote: > > On 2023/9/19 21:12, Maxime Ripard wrote: > > > We've had a number of times when a patch slipped through and we couldn't > > > pick them

Re: [PATCH] drm/gma500: refactor deprecated strncpy

2023-09-18 Thread Patrik Jakobsson
On Thu, Sep 14, 2023 at 09:37:31PM -0700, Kees Cook wrote: > On Thu, Sep 14, 2023 at 08:52:21PM +, Justin Stitt wrote: > > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > > > We should prefer more robust and less ambiguous string interfaces. > > > > Since

Re: [PATCH -next] drm/gma500: Remove unused declarations

2023-08-25 Thread Patrik Jakobsson
On Thu, Aug 17, 2023 at 09:37:54PM +0800, Yue Haibing wrote: > These declarations are not implemented now, remove them. > > Signed-off-by: Yue Haibing Applied to drm-misc-next Thanks Patrik > --- > drivers/gpu/drm/gma500/gma_display.h | 1 - > drivers/gpu/drm/gma500/psb_intel_drv.h | 14

Re: [PATCH] drm/gma500: Fix call trace when psb_gem_mm_init() fails

2023-08-25 Thread Patrik Jakobsson
On Fri, Jul 28, 2023 at 02:58:55AM +0800, Sui Jingfeng wrote: > Because the gma_irq_install() is call after psb_gem_mm_init() function, > when psb_gem_mm_init() fails, the interrupt line haven't been allocated. > Yet the gma_irq_uninstall() is called in the psb_driver_unload() function > without

Re: [PATCH] drm/gma500: remove duplicate macro definitions

2023-08-25 Thread Patrik Jakobsson
On Tue, Jul 25, 2023 at 02:31:07PM -0300, Jorge Maidana wrote: > Remove identical duplicate block of macro definitions in > drivers/gpu/drm/gma500/psb_drv.h. > > Signed-off-by: Jorge Maidana Applied to drm-misc-next Thanks Patrik > --- > drivers/gpu/drm/gma500/psb_drv.h | 8 > 1

Re: [PATCH] drm/gma500: Clear fbdev framebuffer with fb_memset_io()

2023-05-23 Thread Patrik Jakobsson
On Tue, May 23, 2023 at 1:29 PM Thomas Zimmermann wrote: > > Hi > > Am 23.05.23 um 09:00 schrieb Patrik Jakobsson: > > On Mon, May 22, 2023 at 09:06:37PM +0200, Thomas Zimmermann wrote: > >> The fbdev framebuffer is I/O memory, so clear it with fb_memset_io(). >

Re: [PATCH] drm/gma500: Clear fbdev framebuffer with fb_memset_io()

2023-05-23 Thread Patrik Jakobsson
On Mon, May 22, 2023 at 09:06:37PM +0200, Thomas Zimmermann wrote: > The fbdev framebuffer is I/O memory, so clear it with fb_memset_io(). > Fixes the following sparse warning: > > ../drivers/gpu/drm/gma500/fbdev.c:234:20: warning: incorrect type in argument > 1 (different address spaces) >

Re: [Intel-gfx] [PATCH 1/8] drm/gma500: Use drm_aperture_remove_conflicting_pci_framebuffers

2023-04-06 Thread Patrik Jakobsson
On Thu, Apr 6, 2023 at 9:32 AM Daniel Vetter wrote: > > On Wed, 5 Apr 2023 at 19:46, Patrik Jakobsson > wrote: > > > > On Wed, Apr 5, 2023 at 7:15 PM Daniel Vetter wrote: > > > > > > On Wed, 5 Apr 2023 at 18:54, Javier Martinez Canillas > > &g

Re: [Intel-gfx] [PATCH 1/8] drm/gma500: Use drm_aperture_remove_conflicting_pci_framebuffers

2023-04-05 Thread Patrik Jakobsson
On Wed, Apr 5, 2023 at 7:15 PM Daniel Vetter wrote: > > On Wed, 5 Apr 2023 at 18:54, Javier Martinez Canillas > wrote: > > > > Daniel Vetter writes: > > > > > On Wed, Apr 05, 2023 at 04:32:19PM +0200, Thomas Zimmermann wrote: > > > > [...] > > > > >> > > >/* > > >> > > > *

Re: [PATCH 1/8] drm/gma500: Use drm_aperture_remove_conflicting_pci_framebuffers

2023-04-05 Thread Patrik Jakobsson
ngle these special cases won't work. > > > > It's not pretty, but the simplest fix (since gma500 really is the only > > quirky pci driver like this we have) is to just have both calls. > > > > Signed-off-by: Daniel Vetter > > Cc: Patrik Jakobsson > > Cc: T

Re: [PATCH] drm/gma500: remove unused gma_pipe_event function

2023-03-21 Thread Patrik Jakobsson
On Sun, Mar 19, 2023 at 3:23 PM Tom Rix wrote: > > clang with W=1 reports > drivers/gpu/drm/gma500/psb_irq.c:35:19: error: unused function > 'gma_pipe_event' [-Werror,-Wunused-function] > static inline u32 gma_pipe_event(int pipe) > ^ > This function is not used, so remove it.

Re: [PATCH v2 0/7] drm/gma500: Convert fbdev to DRM client

2023-03-16 Thread Patrik Jakobsson
darview HW. > > v2: > * remove fb_base (Patrik) > * use 'static inline' in header files (kernel test robot) > * fix many minor issues and typos > Thanks Thomas! For the entire series: Acked-by: Patrik Jakobsson > Thomas Zimmermann (7): > drm/gma500: Rem

Re: [PATCH v2] fbdev: Fix incorrect page mapping clearance at fb_deferred_io_release()

2023-03-10 Thread Patrik Jakobsson
are called always in the > fb_info lock (mutex), it's safe to use the normal int for the > refcounting. > > Also, a useless BUG_ON() is dropped. > > Fixes: 3efc61d95259 ("fbdev: Fix invalid page access after closing deferred > I/O devices") > Cc: > Signed-off-

Re: [PATCH] fbdev: Fix incorrect page mapping clearance at fb_deferred_io_release()

2023-03-08 Thread Patrik Jakobsson
On Wed, Mar 8, 2023 at 10:14 AM Takashi Iwai wrote: > > On Wed, 08 Mar 2023 10:08:24 +0100, > Patrik Jakobsson wrote: > > > > On Wed, Mar 8, 2023 at 7:36 AM Takashi Iwai wrote: > > > > > > The recent fix for the deferred I/O by the commit > > >

Re: [PATCH] fbdev: Fix incorrect page mapping clearance at fb_deferred_io_release()

2023-03-08 Thread Patrik Jakobsson
On Wed, Mar 8, 2023 at 7:36 AM Takashi Iwai wrote: > > The recent fix for the deferred I/O by the commit > 3efc61d95259 ("fbdev: Fix invalid page access after closing deferred I/O > devices") > caused a regression when the same fb device is opened/closed while > it's being used. It resulted

Re: [PATCH 7/7] drm/gma500: Pass fb_info to psb_fbdev_vm_fault()

2023-03-06 Thread Patrik Jakobsson
On Thu, Feb 23, 2023 at 1:17 PM Thomas Zimmermann wrote: > > Instead of the DRM framebuffer, pass the FB info strcuture to the > fbdev page-fault handler psb_fbdev_vm_fault(). The framebuffer is a > high-level data structure and does not belong into fault handling. > The fb_info has all necessary

Re: [PATCH 5/7] drm/gma500: Inline psbfb_create() into psbfb_probe()

2023-03-06 Thread Patrik Jakobsson
On Thu, Feb 23, 2023 at 1:17 PM Thomas Zimmermann wrote: > > Inline psbfb_create() into its only caller psbfb_probe(). Streamline > the color-depth selection. > > Signed-off-by: Thomas Zimmermann > --- > drivers/gpu/drm/gma500/fbdev.c | 65 ++ > 1 file changed,

Re: [PATCH 2/7] drm/gma500: Move fbdev code into separate source file

2023-03-06 Thread Patrik Jakobsson
On Thu, Feb 23, 2023 at 1:17 PM Thomas Zimmermann wrote: > > Move the fbdev emulation from framebuffer.c into fbdev.c. Only build > the source code if the Kconfig symbol has been selected. Remaining in > framebuffer.c is gma500's code for DRM frambuffers. No functional > hanges. > >

Re: [PATCH 2/7] drm/gma500: Move fbdev code into separate source file

2023-02-26 Thread Patrik Jakobsson
On Mon, Feb 27, 2023 at 8:41 AM Thomas Zimmermann wrote: > > Hi > > Am 27.02.23 um 08:10 schrieb Patrik Jakobsson: > > On Thu, Feb 23, 2023 at 1:17 PM Thomas Zimmermann > > wrote: > >> > >> Move the fbdev emulation from framebuffer.c into fbdev.c. Only

Re: [PATCH 2/7] drm/gma500: Move fbdev code into separate source file

2023-02-26 Thread Patrik Jakobsson
On Thu, Feb 23, 2023 at 1:17 PM Thomas Zimmermann wrote: > > Move the fbdev emulation from framebuffer.c into fbdev.c. Only build > the source code if the Kconfig symbol has been selected. Remaining in > framebuffer.c is gma500's code for DRM frambuffers. No functional > hanges. > >

Re: [PATCH] fbdev: Fix invalid page access after closing deferred I/O devices

2023-01-30 Thread Patrik Jakobsson
c: > Signed-off-by: Takashi Iwai Reviewed-by: Patrik Jakobsson > --- > drivers/video/fbdev/core/fb_defio.c | 10 +- > drivers/video/fbdev/core/fbmem.c| 2 ++ > include/linux/fb.h | 1 + > 3 files changed, 12 insertions(+), 1 deletion(-) > &

Re: [PATCH] fbdev: Fix invalid page access after closing deferred I/O devices

2023-01-28 Thread Patrik Jakobsson
; Cc: > Signed-off-by: Takashi Iwai For some reason my first review didn't make it to the list. Trying again with my other email. As kernel test robot says, we need to check CONFIG_FB_DEFERRED_IO around access to info->fbdefio. With that fixed: Reviewed-by: Patrik Jakobsson > --

Re: [PATCH] drm: Remove drm_mode_config::fb_base

2022-10-21 Thread Patrik Jakobsson
On Wed, Oct 19, 2022 at 1:11 PM andriy.shevche...@linux.intel.com wrote: > > On Wed, Oct 19, 2022 at 09:32:26AM +0200, Thomas Zimmermann wrote: > > Am 18.10.22 um 17:52 schrieb Zack Rusin: > > > IIRC PSB hardware is only available in 32-bit systems. > > Dunno about deep details, but IIUC the

Re: [PATCH 0/6] drm/gma500: 1 fix + further cleanups

2022-09-18 Thread Patrik Jakobsson
On Sat, Sep 17, 2022 at 2:31 PM Hans de Goede wrote: > > Hi Patrik, > > On 9/14/22 09:50, Patrik Jakobsson wrote: > > On Fri, Sep 9, 2022 at 1:56 PM Hans de Goede wrote: > >> > >> Hi Patrik, > >> > >> Here is another gma500 patch-series w

Re: [PATCH v3 0/5] drm/gma500: Backlight handling changes

2022-09-18 Thread Patrik Jakobsson
klight_get_brightness() to get the brightness" patch > > Changes in v3: > - Fix unused variable warnings when CONFIG_BACKLIGHT is not selected by > marking the 2 variables as __maybe_unused. This looks good to me. I don't have access to my DIM setup in a couple of days so ple

Re: [PATCH 0/6] drm/gma500: 1 fix + further cleanups

2022-09-14 Thread Patrik Jakobsson
the moment so you can commit these yourself to drm-misc-next if you like. "drm/gma500: Wait longer for the GPU to power-down" can go through drm-misc-fixes if you prefer. It fixed the timeout message on two of my CDV machines but I never saw an actual problem from the timeouts. For the

Re: [PATCH v2 3/3] drm/gma500: Fix (vblank) IRQs not working after suspend/resume

2022-09-12 Thread Patrik Jakobsson
On Sat, Sep 10, 2022 at 9:50 PM Hans de Goede wrote: > > Hi Patrik, > > On 9/9/22 10:45, Hans de Goede wrote: > > Hi, > > > > On 9/9/22 09:34, Patrik Jakobsson wrote: > >> On Thu, Sep 8, 2022 at 3:39 PM Hans de Goede > >> wrote: > >>> &

Re: [PATCH v2 2/3] drm/gma500: Fix WARN_ON(lock->magic != lock) error

2022-09-09 Thread Patrik Jakobsson
ng: Looks good. I'll apply this to drm-misc-fixes. Let me know if it should go somewhere else. Signed-off-by: Patrik Jakobsson > > [ 79.693962] [ cut here ] > [ 79.693992] DEBUG_LOCKS_WARN_ON(lock->magic != lock) > [ 79.694015] WARNING: CPU: 0 PID: 240

Re: [PATCH v2 3/3] drm/gma500: Fix (vblank) IRQs not working after suspend/resume

2022-09-09 Thread Patrik Jakobsson
pci_restore_msi_stateOn Thu, Sep 8, 2022 at 3:39 PM Hans de Goede wrote: > > Hi, > > On 9/8/22 15:26, Patrik Jakobsson wrote: > > On Tue, Sep 6, 2022 at 10:38 PM Hans de Goede wrote: > >> > >> Fix gnome-shell (and other page-flip users) hanging after suspend

Re: [PATCH v2 3/3] drm/gma500: Fix (vblank) IRQs not working after suspend/resume

2022-09-08 Thread Patrik Jakobsson
On Tue, Sep 6, 2022 at 10:38 PM Hans de Goede wrote: > > Fix gnome-shell (and other page-flip users) hanging after suspend/resume > because of the gma500's IRQs not working. > > This fixes 2 problems with the IRQ handling: > > 1. gma_power_off() calls gma_irq_uninstall() which does a free_irq(),

Re: [PATCH] drm/gma500: fix repeated words in comments

2022-09-07 Thread Patrik Jakobsson
On Wed, Sep 7, 2022 at 1:39 PM Jilin Yuan wrote: > > Delete the redundant word 'for'. > > Signed-off-by: Jilin Yuan Patch applied to drm-misc-next -Patrik > --- > drivers/gpu/drm/gma500/oaktrail_crtc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [PATCH 1/3] drm/gma500: Fix BUG: sleeping function called from invalid context errors

2022-09-06 Thread Patrik Jakobsson
On Mon, Sep 5, 2022 at 3:37 PM Hans de Goede wrote: > > gma_crtc_page_flip() was holding the event_lock spinlock while calling > crtc_funcs->mode_set_base() which takes ww_mutex. > > The only reason to hold event_lock is to clear gma_crtc->page_flip_event > on mode_set_base() errors. > > Instead

Re: [PATCH] drm/gma500: Fix comment typo

2022-08-29 Thread Patrik Jakobsson
On Thu, Aug 4, 2022 at 1:48 PM Jason Wang wrote: > > The double `the' is duplicated in the comment, remove one. > > Signed-off-by: Jason Wang Pushed to drm-misc-next Thanks Patrik > --- > drivers/gpu/drm/gma500/cdv_intel_dp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff

Re: [PATCH 09/19] drm/gma500: Unify *_intel_lvds_mode_fixup()

2022-06-14 Thread Patrik Jakobsson
On Tue, Jun 14, 2022 at 9:23 AM Thomas Zimmermann wrote: > > Hi > > Am 13.06.22 um 14:34 schrieb Patrik Jakobsson: > > These functions mostly do the same thing so unify them. Change a check > > of !IS_MRST() to IS_PSB() to not change the behaviour for CDV. > > >

Re: [PATCH 01/19] drm/gma500: Unify *_lvds_get_max_backlight()

2022-06-13 Thread Patrik Jakobsson
On Mon, Jun 13, 2022 at 7:08 PM Sam Ravnborg wrote: > > Hi Patrick. > > On Mon, Jun 13, 2022 at 02:34:18PM +0200, Patrik Jakobsson wrote: > > These functions mostly do the same thing so unify them into one. All > > unified lvds code will live in gma_lvds.c. > > >

[PATCH 12/19] drm/gma500: Unify *_intel_lvds_mode_set()

2022-06-13 Thread Patrik Jakobsson
These functions mostly do the same thing so unify them. CDV include the pipe select bit in the pfit control register but we can do this on PSB as well since LVDS is always on the same pipe there. Oaktrail lvds modeset sequence is slightly different so is not unified here. Signed-off-by: Patrik

[PATCH 13/19] drm/gma500: Unify struct *_intel_lvds_helper_funcs

2022-06-13 Thread Patrik Jakobsson
These now only contains generic gma functions so create gma_lvds_helper_funcs that both PSB and CDV can use. Oaktrail still needs the modeset callback refactored to align with PSB and CDV. Signed-off-by: Patrik Jakobsson --- drivers/gpu/drm/gma500/cdv_intel_lvds.c | 11 +-- drivers/gpu

[PATCH 15/19] drm/gma500: Unify struct *_intel_lvds_connector_helper_funcs

2022-06-13 Thread Patrik Jakobsson
These now only contains generic gma functions so create gma_lvds_connector_helper_funcs that all chips can use. Signed-off-by: Patrik Jakobsson --- drivers/gpu/drm/gma500/cdv_intel_lvds.c | 10 +- drivers/gpu/drm/gma500/gma_lvds.c | 12 +--- drivers/gpu/drm/gma500

[PATCH 10/19] drm/gma500: Unify *_intel_lvds_prepare()

2022-06-13 Thread Patrik Jakobsson
The functions are identical so unify them. Signed-off-by: Patrik Jakobsson --- drivers/gpu/drm/gma500/cdv_intel_lvds.c | 20 +--- drivers/gpu/drm/gma500/gma_lvds.c | 18 ++ drivers/gpu/drm/gma500/gma_lvds.h | 1 + drivers/gpu/drm/gma500

[PATCH 14/19] drm/gma500: Unify *_intel_lvds_get_modes()

2022-06-13 Thread Patrik Jakobsson
These functions mostly do the same thing so unify them. Oaktrail already uses the PSB connector helpers so it is already handled. Signed-off-by: Patrik Jakobsson --- drivers/gpu/drm/gma500/cdv_intel_lvds.c | 27 +--- drivers/gpu/drm/gma500/gma_lvds.c | 26

[PATCH 17/19] drm/gma500: Unify *_intel_lvds_destroy()

2022-06-13 Thread Patrik Jakobsson
These functions mostly do the same thing so unify them into one. Only destroy i2c adapters that have actually been created. gma_i2c_destroy() is now also called for PSB. Signed-off-by: Patrik Jakobsson --- drivers/gpu/drm/gma500/cdv_intel_lvds.c | 14 +- drivers/gpu/drm/gma500

[PATCH 19/19] drm/gma500: Unify struct *_intel_lvds_connector_funcs

2022-06-13 Thread Patrik Jakobsson
These now only contains generic drm/gma functions so create gma_lvds_connector_funcs that all chips can use. Signed-off-by: Patrik Jakobsson --- drivers/gpu/drm/gma500/cdv_intel_lvds.c | 9 + drivers/gpu/drm/gma500/gma_lvds.c | 15 +++ drivers/gpu/drm/gma500

[PATCH 18/19] drm/gma500: Unify *_intel_lvds_set_property()

2022-06-13 Thread Patrik Jakobsson
These functions mostly do the same thing so unify them into one. Signed-off-by: Patrik Jakobsson --- drivers/gpu/drm/gma500/cdv_intel_lvds.c | 63 +- drivers/gpu/drm/gma500/gma_lvds.c | 64 ++ drivers/gpu/drm/gma500/gma_lvds.h | 2 + drivers

[PATCH 11/19] drm/gma500: Unify *_intel_lvds_commit()

2022-06-13 Thread Patrik Jakobsson
These functions are identical so unify them Signed-off-by: Patrik Jakobsson --- drivers/gpu/drm/gma500/cdv_intel_lvds.c | 15 +-- drivers/gpu/drm/gma500/gma_lvds.c | 15 ++- drivers/gpu/drm/gma500/gma_lvds.h | 2 +- drivers/gpu/drm/gma500/oaktrail_lvds.c

[PATCH 16/19] drm/gma500: Use i2c_bus in gma_encoder for PSB

2022-06-13 Thread Patrik Jakobsson
PSB stores the backlight i2c adapter in lvds_priv. CDV stores it in gma_encoder. Neither place is perfect but lets pick gma_encoder to make life simple. Signed-off-by: Patrik Jakobsson --- drivers/gpu/drm/gma500/gma_lvds.h | 2 -- drivers/gpu/drm/gma500/psb_intel_lvds.c | 10

[PATCH 07/19] drm/gma500: Unify struct *_intel_lvds_priv

2022-06-13 Thread Patrik Jakobsson
These structs are similar enough to be unified. This will allow unifying the lvds functions that access the lvds encoder private. Signed-off-by: Patrik Jakobsson --- drivers/gpu/drm/gma500/cdv_intel_lvds.c | 18 ++ drivers/gpu/drm/gma500/gma_lvds.c | 5 +++-- drivers/gpu

[PATCH 09/19] drm/gma500: Unify *_intel_lvds_mode_fixup()

2022-06-13 Thread Patrik Jakobsson
These functions mostly do the same thing so unify them. Change a check of !IS_MRST() to IS_PSB() to not change the behaviour for CDV. Signed-off-by: Patrik Jakobsson --- drivers/gpu/drm/gma500/cdv_intel_lvds.c | 51 +-- drivers/gpu/drm/gma500/gma_lvds.c | 59

[PATCH 08/19] drm/gma500: Unify *_intel_lvds_restore()

2022-06-13 Thread Patrik Jakobsson
Cedarview never implemented this so use the Poulsbo version for both. Signed-off-by: Patrik Jakobsson --- drivers/gpu/drm/gma500/cdv_intel_lvds.c | 6 +--- drivers/gpu/drm/gma500/gma_lvds.c | 41 +++ drivers/gpu/drm/gma500/gma_lvds.h | 1 + drivers/gpu/drm

[PATCH 03/19] drm/gma500: Unify *_lvds_set_power()

2022-06-13 Thread Patrik Jakobsson
These functions mostly do the same thing so unify them into one. Oaktrail doesn't power on/off the backlight so don't touch that. Ignore runtime-pm stuff since runtime-pm is broken anyways. Signed-off-by: Patrik Jakobsson --- drivers/gpu/drm/gma500/cdv_intel_lvds.c | 41

[PATCH 05/19] drm/gma500: Unify *_lvds_encoder_dpms()

2022-06-13 Thread Patrik Jakobsson
These functions are identical so unify them into one. Signed-off-by: Patrik Jakobsson --- drivers/gpu/drm/gma500/cdv_intel_lvds.c | 12 +--- drivers/gpu/drm/gma500/gma_lvds.c | 11 +++ drivers/gpu/drm/gma500/gma_lvds.h | 1 + drivers/gpu/drm/gma500/oaktrail_lvds.c

[PATCH 06/19] drm/gma500: Unify *_intel_lvds_save()

2022-06-13 Thread Patrik Jakobsson
Cedarview never implemented this so use the Poulsbo version for both. Signed-off-by: Patrik Jakobsson --- drivers/gpu/drm/gma500/cdv_intel_lvds.c | 6 +--- drivers/gpu/drm/gma500/gma_lvds.c | 38 +++ drivers/gpu/drm/gma500/gma_lvds.h | 1 + drivers/gpu/drm

[PATCH 04/19] drm/gma500: Unify *_lvds_mode_valid()

2022-06-13 Thread Patrik Jakobsson
These functions mostly do the same thing so unify them into one. Skip the INTEL_OUTPUT_MIPI2 code since we don't have that output type. Signed-off-by: Patrik Jakobsson --- drivers/gpu/drm/gma500/cdv_intel_lvds.c | 27 +- drivers/gpu/drm/gma500/gma_lvds.c | 25

[PATCH 02/19] drm/gma500: Unify *_lvds_set_backlight()

2022-06-13 Thread Patrik Jakobsson
These functions do the same thing so unify them into one. Signed-off-by: Patrik Jakobsson --- drivers/gpu/drm/gma500/cdv_intel_lvds.c | 29 ++ drivers/gpu/drm/gma500/gma_lvds.c | 26 drivers/gpu/drm/gma500/gma_lvds.h | 1 + drivers/gpu/drm

[PATCH 01/19] drm/gma500: Unify *_lvds_get_max_backlight()

2022-06-13 Thread Patrik Jakobsson
These functions mostly do the same thing so unify them into one. All unified lvds code will live in gma_lvds.c. Signed-off-by: Patrik Jakobsson --- drivers/gpu/drm/gma500/Makefile | 1 + drivers/gpu/drm/gma500/cdv_intel_lvds.c | 27 +++ drivers/gpu/drm/gma500/gma_lvds.c

[PATCH 00/19] drm/gma500: Unify most of the lvds code

2022-06-13 Thread Patrik Jakobsson
. Patrik Jakobsson (19): drm/gma500: Unify *_lvds_get_max_backlight() drm/gma500: Unify *_lvds_set_backlight() drm/gma500: Unify *_lvds_set_power() drm/gma500: Unify *_lvds_mode_valid() drm/gma500: Unify *_lvds_encoder_dpms() drm/gma500: Unify *_intel_lvds_save() drm/gma500: Unify

[PATCH] drm/gma500: Fix SDVO command debug printing

2022-06-10 Thread Patrik Jakobsson
At some point the DRM printers started adding a newline after each print. This caused SDVO command debug printing to look weird. Fix this by using snprintf to print into a buffer which can be printed as a whole by DRM_DEBUG_KMS(). Code is heavily inspired by i915. Signed-off-by: Patrik Jakobsson

Re: [PATCH v2 2/5] drm/ast: Fix updating the connector's EDID property

2022-06-07 Thread Patrik Jakobsson
On Tue, Jun 7, 2022 at 10:13 AM Thomas Zimmermann wrote: > > Hi > > Am 02.06.22 um 09:24 schrieb Patrik Jakobsson: > > On Tue, May 31, 2022 at 1:15 PM Thomas Zimmermann > > wrote: > >> > >> Read the display modes from the connectors DDC helper, wh

Re: [PATCH v2 4/5] drm/ast: Fail probing if DCC channel could not be initialized

2022-06-02 Thread Patrik Jakobsson
On Thu, Jun 2, 2022 at 11:32 AM Thomas Zimmermann wrote: > > Hi Patrik > > Am 02.06.22 um 09:42 schrieb Patrik Jakobsson: > > On Thu, Jun 2, 2022 at 9:25 AM Patrik Jakobsson > > wrote: > >> > >> On Tue, May 31, 2022 at 1:15 PM Thomas Zimmermann &

Re: [PATCH 2/5] drm/gma500: Fix spelling typo in comment

2022-06-02 Thread Patrik Jakobsson
On Fri, May 27, 2022 at 5:42 AM <1064094...@qq.com> wrote: > > From: pengfuyuan > > Fix spelling typo in comment. > > Reported-by: k2ci > Signed-off-by: pengfuyuan > --- > drivers/gpu/drm/gma500/psb_intel_sdvo_regs.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [PATCH] drm/gma500: Clean up some inconsistent indenting

2022-06-02 Thread Patrik Jakobsson
On Thu, May 5, 2022 at 10:10 AM Jiapeng Chong wrote: > > Eliminate the follow smatch warning: > > drivers/gpu/drm/gma500/cdv_device.c:250 cdv_errata() warn: > inconsistent indenting. > > Reported-by: Abaci Robot > Signed-off-by: Jiapeng Chong Hi Jiapeng, One entire patch to remove a single

Re: [PATCH v2 4/5] drm/ast: Fail probing if DCC channel could not be initialized

2022-06-02 Thread Patrik Jakobsson
On Thu, Jun 2, 2022 at 9:25 AM Patrik Jakobsson wrote: > > On Tue, May 31, 2022 at 1:15 PM Thomas Zimmermann wrote: > > > > Expect the hardware to provide a DDC channel. Fail probing if its > > initialization fails. > > > > Signed-off-by: Thomas Zimmermann &g

Re: [PATCH 0/8] Cleanup use of ddc i2c buses

2022-06-02 Thread Patrik Jakobsson
On Wed, Jun 1, 2022 at 9:56 PM Thomas Zimmermann wrote: > > Hi Patrik > > Am 01.06.22 um 11:23 schrieb Patrik Jakobsson: > > The various chips have slight differences in how they handle and store > > ddc i2c buses. This series tries to put the main i2c adapter for ddc &g

Re: [PATCH v2 5/5] drm/ast: Remove struct ast_{vga,sil164}_connector

2022-06-02 Thread Patrik Jakobsson
On Tue, May 31, 2022 at 1:15 PM Thomas Zimmermann wrote: > > Both, struct ast_vga_connector and struct ast_sil164_connector, are > now wrappers around struct drm_connector. Remove them. > > Signed-off-by: Thomas Zimmermann Reviewed-by: Patrik Jakobsson > --- > drivers/

Re: [PATCH v2 4/5] drm/ast: Fail probing if DCC channel could not be initialized

2022-06-02 Thread Patrik Jakobsson
On Tue, May 31, 2022 at 1:15 PM Thomas Zimmermann wrote: > > Expect the hardware to provide a DDC channel. Fail probing if its > initialization fails. > > Signed-off-by: Thomas Zimmermann It's funny how I just did the same thing to gma500. Great minds think alike ;) Revi

Re: [PATCH v2 3/5] drm/ast: Support output polling

2022-06-02 Thread Patrik Jakobsson
On Tue, May 31, 2022 at 1:15 PM Thomas Zimmermann wrote: > > Enable output polling for all connectors. VGA always uses EDID for this. As > there's currently no interrupt handling for the ast devices, we have to use > that trick for the various DP and DVI ports as well. > > Signed-off-by: Thomas

Re: [PATCH v2 2/5] drm/ast: Fix updating the connector's EDID property

2022-06-02 Thread Patrik Jakobsson
der removing _vga from the name. Either way: Reviewed-by: Patrik Jakobsson > { > - struct ast_vga_connector *ast_vga_connector = > to_ast_vga_connector(connector); > struct drm_device *dev = connector->dev; > struct ast_private *ast

Re: [PATCH v2 1/5] drm/ast: Support multiple outputs

2022-06-02 Thread Patrik Jakobsson
if (bDPExecute) > - ast->tx_chip_type = AST_TX_ASTDP; > + ast->tx_chip_types |= BIT(AST_TX_ASTDP); Hi Thomas, Just a matter of taste but an alternative to using the BIT macro everywhere is to just defi

[PATCH 7/8] drm/gma500: Make oaktrail lvds use ddc adapter from drm_connector

2022-06-01 Thread Patrik Jakobsson
ove it. Signed-off-by: Patrik Jakobsson --- drivers/gpu/drm/gma500/oaktrail_lvds.c | 50 +- drivers/gpu/drm/gma500/oaktrail_lvds_i2c.c | 14 +++--- drivers/gpu/drm/gma500/psb_intel_drv.h | 3 +- 3 files changed, 38 insertions(+), 29 deletions(-) diff --git a/drivers/gpu/

[PATCH 8/8] drm/gma500: Read EDID from the correct i2c adapter

2022-06-01 Thread Patrik Jakobsson
th PSB and CDV are affected but this bug. Signed-off-by: Patrik Jakobsson --- drivers/gpu/drm/gma500/cdv_intel_lvds.c | 3 +-- drivers/gpu/drm/gma500/psb_intel_lvds.c | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/gma500/cdv_intel_lvds.c b/drivers/gpu/drm/

[PATCH 6/8] drm/gma500: Make cdv crt use ddc adapter from drm_connector

2022-06-01 Thread Patrik Jakobsson
We're moving all uses of ddc_bus to drm_connector where they belong. Also cleanup the error handling in cdv_intel_crt_init(). Signed-off-by: Patrik Jakobsson --- drivers/gpu/drm/gma500/cdv_intel_crt.c | 47 +++--- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git

[PATCH 5/8] drm/gma500: Make psb lvds use ddc adapter from drm_connector

2022-06-01 Thread Patrik Jakobsson
We're moving all uses of ddc_bus to drm_connector where they belong. Also cleanup the error handling in psb_intel_lvds_init() and remove unused ddc_bus in psb_intel_lvds_priv. Signed-off-by: Patrik Jakobsson --- drivers/gpu/drm/gma500/psb_intel_lvds.c | 72 + 1 file

[PATCH 4/8] drm/gma500: Make cdv hdmi use ddc adapter from drm_connector

2022-06-01 Thread Patrik Jakobsson
We're moving all uses of ddc_bus from gma_encoder to drm_connector where they belong. Also, cleanup the error handling in cdv_hdmi_init() and remove unused i2c pointer in mid_intel_hdmi_priv. Signed-off-by: Patrik Jakobsson --- drivers/gpu/drm/gma500/cdv_intel_hdmi.c | 98

[PATCH 3/8] drm/gma500: Make cdv lvds use ddc adapter from drm_connector

2022-06-01 Thread Patrik Jakobsson
We're moving all uses of ddc_bus to drm_connector where they belong. Also, add missing call to destroy ddc bus when destroying the connector and cleanup the error handling in cdv_intel_lvds_init(). Signed-off-by: Patrik Jakobsson --- drivers/gpu/drm/gma500/cdv_intel_lvds.c | 67

[PATCH 2/8] drm/gma500: Make gma_i2c_chan a subclass of i2c_adapter

2022-06-01 Thread Patrik Jakobsson
This makes it easier to get at the full gma_i2c_chan when having an i2c_adapter from eg. drm_connector->ddc. Signed-off-by: Patrik Jakobsson --- drivers/gpu/drm/gma500/cdv_intel_crt.c | 2 +- drivers/gpu/drm/gma500/cdv_intel_hdmi.c| 6 +++--- drivers/gpu/drm/gma500/cdv_intel_lvd

[PATCH 1/8] drm/gma500: Use gma_ prefix for our i2c abstraction

2022-06-01 Thread Patrik Jakobsson
psb_intel_i2c_chan is used by all chips so use the correct prefix. Signed-off-by: Patrik Jakobsson --- drivers/gpu/drm/gma500/cdv_intel_crt.c | 4 ++-- drivers/gpu/drm/gma500/cdv_intel_hdmi.c| 6 +++--- drivers/gpu/drm/gma500/cdv_intel_lvds.c| 14 +- drivers/gpu/drm

[PATCH 0/8] Cleanup use of ddc i2c buses

2022-06-01 Thread Patrik Jakobsson
DVO are not included. Patrik Jakobsson (8): drm/gma500: Use gma_ prefix for our i2c abstraction drm/gma500: Make gma_i2c_chan a subclass of i2c_adapter drm/gma500: Make cdv lvds use ddc adapter from drm_connector drm/gma500: Make cdv hdmi use ddc adapter from drm_connector drm/gma500: Make psb l

Re: [PATCH v3] drm/gma500: depend on framebuffer

2022-04-21 Thread Patrik Jakobsson
On Thu, Apr 21, 2022 at 7:48 PM James Hilliard wrote: > > On Thu, Apr 21, 2022 at 8:20 AM Thomas Zimmermann wrote: > > > > Hi > > > > Am 21.04.22 um 14:54 schrieb Patrik Jakobsson: > > > On Thu, Apr 21, 2022 at 2:47 PM Javier Martinez Canillas &

Re: [PATCH v3] drm/gma500: depend on framebuffer

2022-04-21 Thread Patrik Jakobsson
On Thu, Apr 21, 2022 at 2:47 PM Javier Martinez Canillas wrote: > > Hello Patrik, > > On 4/21/22 14:39, Patrik Jakobsson wrote: > > On Thu, Apr 21, 2022 at 1:49 PM Thomas Zimmermann > > wrote: > >> > >> Hi > >> > >> Am 09.04.22 um 06

Re: [PATCH v3] drm/gma500: depend on framebuffer

2022-04-21 Thread Patrik Jakobsson
On Thu, Apr 21, 2022 at 1:49 PM Thomas Zimmermann wrote: > > Hi > > Am 09.04.22 um 06:23 schrieb James Hilliard: > > Select the efi framebuffer if efi is enabled. > > > > This appears to be needed for video output to function correctly. > > > > Signed-off-by: James Hilliard > > --- > > Changes

Re: [PATCH v3] drm/gma500: depend on framebuffer

2022-04-21 Thread Patrik Jakobsson
On Wed, Apr 20, 2022 at 1:42 AM James Hilliard wrote: > > On Tue, Apr 12, 2022 at 3:30 AM Patrik Jakobsson > wrote: > > > > On Tue, Apr 12, 2022 at 3:48 AM James Hilliard > > wrote: > > > > > > On Mon, Apr 11, 2022 at 3:27 AM Patrik Jakobsson >

Re: [PATCH v3] drm/gma500: fix a potential repeat execution in psb_driver_load

2022-04-20 Thread Patrik Jakobsson
e the loop when found entry by replacing switch/case with > if statement. > > Signed-off-by: Xiaomeng Tong Thanks for the patch. I've applied it to drm-misc-next. I fixed up an indentation issue on the second line. Cheers Patrik > --- > changes since v2: > - replace switch wi

Re: [PATCH v2] drm/gma500: fix a potential repeat execution in psb_driver_load

2022-04-12 Thread Patrik Jakobsson
On Wed, Apr 6, 2022 at 1:31 PM Xiaomeng Tong wrote: > > Instead of exiting the loop as expected when an entry is found, the > list_for_each_entry() continues until the traversal is complete. To > avoid potential executing 'ret = gma_backlight_init(dev);' repeatly, > goto outside the loop when the

Re: [PATCH] drm/gma500: add comments to register definitions

2022-04-12 Thread Patrik Jakobsson
On Tue, Apr 12, 2022 at 3:42 AM James Hilliard wrote: > > Extracted from various sources such EMGD releases. > > Signed-off-by: James Hilliard Hi James, These registers are documented in the Intel 965/G35 and G45 documentation [1]. I don't see a clear benefit of duplicating the names of the

Re: [PATCH v3] drm/gma500: depend on framebuffer

2022-04-12 Thread Patrik Jakobsson
On Tue, Apr 12, 2022 at 3:48 AM James Hilliard wrote: > > On Mon, Apr 11, 2022 at 3:27 AM Patrik Jakobsson > wrote: > > > > On Sun, Apr 10, 2022 at 10:05 PM James Hilliard > > wrote: > > > > > > On Sun, Apr 10, 2022 at 1:52 PM Patrik Jakobsson >

Re: [PATCH v3] drm/gma500: depend on framebuffer

2022-04-11 Thread Patrik Jakobsson
On Sun, Apr 10, 2022 at 10:05 PM James Hilliard wrote: > > On Sun, Apr 10, 2022 at 1:52 PM Patrik Jakobsson > wrote: > > > > On Sun, Apr 10, 2022 at 9:40 PM James Hilliard > > wrote: > > > > > > On Sun, Apr 10, 2022 at 1:36 PM Patrik Jakobsson >

  1   2   3   4   5   6   7   >