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 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] 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 whit

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 a/drive

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 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

[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

[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 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 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 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

[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 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 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_l

[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 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 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 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 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 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 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 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 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 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 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

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. > > >

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 v3] drm/gma500: fix a potential repeat execution in psb_driver_load

2022-04-20 Thread Patrik Jakobsson
oto outside 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: > - re

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: 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 v2

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 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 &

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

2022-06-01 Thread Patrik Jakobsson
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

[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 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 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

[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

[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

[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

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

2022-06-01 Thread Patrik Jakobsson
oth 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

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

2022-06-01 Thread Patrik Jakobsson
emove 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

Re: [PATCH 1/5] gma500: fix a missing break in oaktrail_crtc_mode_set

2022-04-01 Thread Patrik Jakobsson
;base, > > To fix this, when found the entry, add a break after the switch > statement. Hi, this is already fixed in: commit b1a7d0ddb169774c3db5afe9e64124daea7fdd9f Author: Patrik Jakobsson Date: Tue Mar 22 14:17:38 2022 +0100 drm/gma500: Make use of the drm connector itera

Re: [PATCH 2/5] gma500: fix a missing break in cdv_intel_crtc_mode_set

2022-04-01 Thread Patrik Jakobsson
ch statement. > > Fixes: d66760962d75 ("gma500: Program the DPLL lane based on the selected > digitial port") > Signed-off-by: Xiaomeng Tong Hi, this one is also already fixed in: commit b1a7d0ddb169774c3db5afe9e64124daea7fdd9f Author: Patrik Jakobsson Date:

Re: [PATCH 3/5] gma500: fix a missing break in psb_intel_crtc_mode_set

2022-04-01 Thread Patrik Jakobsson
On Wed, Mar 30, 2022 at 2:03 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. It > could result in multiple 'is_*' flags being set with true mistakely. > > To fix this, when found the

Re: [PATCH 4/5] gma500: fix a missing break in cdv_intel_dp_set_m_n

2022-04-01 Thread Patrik Jakobsson
On Wed, Mar 30, 2022 at 2:03 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. It > could lead to a invalid reference to 'lane_count/bpp' after the loop. > > The invalid reference to 'l

Re: [PATCH 5/5] gma500: fix a missing break in psb_driver_load

2022-04-01 Thread Patrik Jakobsson
On Wed, Mar 30, 2022 at 2:03 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, > add a break after the switch s

Re: [PATCH] drm/gma500: fix a missing break in psb_driver_load

2022-04-06 Thread Patrik Jakobsson
On Fri, Apr 1, 2022 at 1:58 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, > break the loop when the entry i

Re: [PATCH] drm/gma500: fix a missing break in psb_intel_crtc_mode_set

2022-04-06 Thread Patrik Jakobsson
On Fri, Apr 1, 2022 at 1:50 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. > when found the entry, add a break after the switch statement. > > Signed-off-by: Xiaomeng Tong Thanks f

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

2022-04-10 Thread Patrik Jakobsson
On Sat, Apr 9, 2022 at 6:23 AM James Hilliard wrote: > > Select the efi framebuffer if efi is enabled. > > This appears to be needed for video output to function correctly. > > Signed-off-by: James Hilliard Hi James, EFI_FB is its own driver and not needed by gma500 to drive its hardware. What m

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

2022-04-10 Thread Patrik Jakobsson
On Sun, Apr 10, 2022 at 9:40 PM James Hilliard wrote: > > On Sun, Apr 10, 2022 at 1:36 PM Patrik Jakobsson > wrote: > > > > On Sat, Apr 9, 2022 at 6:23 AM James Hilliard > > wrote: > > > > > > Select the efi framebuffer if efi is enabled. > >

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 >

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] 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 regi

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: 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 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 u

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 a/drivers/gpu/drm/gm

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(), b

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 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

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 0/6] drm/gma500: 1 fix + further cleanups

2022-09-14 Thread Patrik Jakobsson
y at 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

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

2022-09-18 Thread Patrik Jakobsson
ot;Use backlight_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

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 with

Re: [PATCH] drm/scdc: Fix typo in bit definition of SCDC_STATUS_FLAGS

2019-11-04 Thread Patrik Jakobsson
On Tue, Oct 22, 2019 at 5:53 PM Patrik Jakobsson wrote: > > On Tue, Oct 22, 2019 at 11:51 AM Jani Nikula > wrote: > > > > On Tue, 22 Oct 2019, Thierry Reding wrote: > > > On Tue, Oct 22, 2019 at 11:16:51AM +0300, Jani Nikula wrote: > > >> On Wed, 16

Re: [PATCH 1/2] drm/gma500: Add missing call to allow enabling vblank on psb/cdv

2019-11-06 Thread Patrik Jakobsson
ed-off-by: Paul Kocialkowski Don't think we ever found a need for having vblanks enabled... until now. I'll have a look if something can be done for Oaktrail since I have hw. Reviewed-by: Patrik Jakobsson > --- > drivers/gpu/drm/gma500/gma_display.c | 2 ++ > 1 file ch

Re: [PATCH 2/2] drm/gma500: Add page flip support on psb/cdv

2019-11-06 Thread Patrik Jakobsson
c); > + unsigned long flags; > > - if (pipe_stat_val & PIPE_TE_STATUS) > drm_handle_vblank(dev, pipe); > + > + spin_lock_irqsave(&dev->event_lock, flags); > + if (gma_crtc->page_flip_event) { > + drm_crtc_send_vblank_event(crtc, > + gma_crtc->page_flip_event); > + gma_crtc->page_flip_event = NULL; > + drm_crtc_vblank_put(crtc); > + } > + spin_unlock_irqrestore(&dev->event_lock, flags); > + } > } > > /* > -- > 2.23.0 > Looks good! Reviewed-by: Patrik Jakobsson ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH 2/2] drm/gma500: Add page flip support on psb/cdv

2019-11-07 Thread Patrik Jakobsson
On Thu, Nov 7, 2019 at 9:31 AM Daniel Vetter wrote: > > On Wed, Nov 06, 2019 at 04:24:59PM +0100, Patrik Jakobsson wrote: > > On Wed, Nov 6, 2019 at 10:44 AM Paul Kocialkowski > > wrote: > > > > > > Legacy (non-atomic) page flip support is added to the dri

Re: [PATCH 2/2] drm/gma500: Add page flip support on psb/cdv

2019-11-07 Thread Patrik Jakobsson
On Thu, Nov 7, 2019 at 10:21 AM Daniel Vetter wrote: > > On Thu, Nov 7, 2019 at 10:08 AM Patrik Jakobsson > wrote: > > > > On Thu, Nov 7, 2019 at 9:31 AM Daniel Vetter wrote: > > > > > > On Wed, Nov 06, 2019 at 04:24:59PM +0100, Patrik Jakobsson wrote:

Re: [PATCH] drm/gma500: Fixup fbdev stolen size usage evaluation

2019-11-12 Thread Patrik Jakobsson
On Thu, Nov 7, 2019 at 4:30 PM Paul Kocialkowski wrote: > > psbfb_probe performs an evaluation of the required size from the stolen > GTT memory, but gets it wrong in two distinct ways: > - The resulting size must be page-size-aligned; > - The size to allocate is derived from the surface dimension

Re: [PATCH] drm/gma500: Fixup fbdev stolen size usage evaluation

2019-11-13 Thread Patrik Jakobsson
On Tue, Nov 12, 2019 at 4:50 PM Paul Kocialkowski wrote: > > Hi, > > On Tue 12 Nov 19, 16:11, Paul Kocialkowski wrote: > > Hi, > > > > On Tue 12 Nov 19, 11:20, Patrik Jakobsson wrote: > > > On Thu, Nov 7, 2019 at 4:30 PM Paul Kocialkowski > > >

Re: [PATCH][next] drm/gma500: fix null dereference of pointer fb before null check

2019-12-19 Thread Patrik Jakobsson
On Mon, Dec 16, 2019 at 5:21 PM Colin King wrote: > > From: Colin Ian King > > Pointer fb is being dereferenced when assigning dev before it > is null checked. Fix this by only dereferencing dev after the > null check. Applied to drm-misc-next Thanks Patrik > > Fixes: 6b7ce2c4161a ("drm/gma50

Re: [PATCH next] drm/gma500: remove set but not used variables 'hist_reg'

2020-01-08 Thread Patrik Jakobsson
On Fri, Dec 27, 2019 at 12:52 PM Chen Zhou wrote: > > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/gpu/drm/gma500/psb_irq.c: In function psb_irq_turn_off_dpst: > drivers/gpu/drm/gma500/psb_irq.c:473:6: > warning: variable hist_reg set but not used > [-Wunused-but-set-variabl

[PATCH] drm/scdc: Fix typo in bit definition of SCDC_STATUS_FLAGS

2019-10-16 Thread Patrik Jakobsson
Fix typo where bits got compared (x < y) instead of shifted (x << y). Signed-off-by: Patrik Jakobsson --- include/drm/drm_scdc_helper.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/drm/drm_scdc_helper.h b/include/drm/drm_scdc_helper.h index f92

Re: [PATCH] drm/scdc: Fix typo in bit definition of SCDC_STATUS_FLAGS

2019-10-22 Thread Patrik Jakobsson
On Tue, Oct 22, 2019 at 11:51 AM Jani Nikula wrote: > > On Tue, 22 Oct 2019, Thierry Reding wrote: > > On Tue, Oct 22, 2019 at 11:16:51AM +0300, Jani Nikula wrote: > >> On Wed, 16 Oct 2019, Patrik Jakobsson wrote: > >> > Fix typo where bits got compared (

Re: [PATCH v3 06/22] drm/gma500: Convert to CRTC VBLANK callbacks

2020-01-20 Thread Patrik Jakobsson
On Mon, Jan 20, 2020 at 9:23 AM Thomas Zimmermann wrote: > > VBLANK callbacks in struct drm_driver are deprecated in favor of > their equivalents in struct drm_crtc_funcs. Convert gma500 over. > > Signed-off-by: Thomas Zimmermann Looks good. For this patch: Acked-by: P

Re: [PATCH] drm/gma500: Fixup fbdev stolen size usage evaluation

2019-11-19 Thread Patrik Jakobsson
On Tue, Nov 19, 2019 at 3:11 PM Paul Kocialkowski wrote: > > Hi, > > On Wed 13 Nov 19, 11:04, Patrik Jakobsson wrote: > > On Tue, Nov 12, 2019 at 4:50 PM Paul Kocialkowski > > wrote: > > > > > > Hi, > > > > > > On Tue 12 Nov 19, 16:11,

Re: [PATCH 0/6] drm/gma500: Cleanup framebuffer and fbdev

2019-11-25 Thread Patrik Jakobsson
gt; Weston on an Atom Z520 with Poulsbo graphics chip. Hi Thomas, nice cleanups! I'll apply to drm-misc-next For series: Signed-off-by: Patrik Jakobsson Thanks > > Thomas Zimmermann (6): > drm/gma500: Remove addr_space field from psb_framebuffer > drm/gma500: Remove fie

Re: [PATCH] drm/gma500: Call psb_driver_{load,unload}() before registering device

2019-12-05 Thread Patrik Jakobsson
On Wed, Dec 4, 2019 at 7:46 PM Thomas Zimmermann wrote: > > The load/unload callbacks in struct drm_driver are deprecated. Remove > them and call functions explicitly. > > Signed-off-by: Thomas Zimmermann Acked-by: Patrik Jakobsson Thanks for the patch. -Patrik > ---

Re: [PATCH] drm/gma500: Pass GPIO for Intel MID using descriptors

2019-12-09 Thread Patrik Jakobsson
he code so I just stayed off it, as the > result is unpredictable. > > People wanting to do a more throrugh and proper cleanup > of the GMA500 driver can work on top of this, I can't > solve much more since I don't have access to the hardware, > I can only attempt to tidy up

Re: [PATCH] drm/gma500: add a missed gma_power_end in error path

2019-12-09 Thread Patrik Jakobsson
On Mon, Dec 9, 2019 at 9:57 AM Chuhong Yuan wrote: > > oaktrail_lvds_mode_set() misses a gma_power_end() in an error path. > Add the call to fix it. > > Signed-off-by: Chuhong Yuan Hi Chuhong, thanks for the patch. Applied to drm-misc-next -Patrik > --- > drivers/gpu/drm/gma500/oaktrail_lvds

Re: gma500: issue with continue statement not doing anything useful

2021-06-18 Thread Patrik Jakobsson
s.c > > commit 9bd81acdb648509dbbc32d4da0477c9fae0d6a73 > Author: Patrik Jakobsson > Date: Mon Dec 19 21:41:33 2011 + > > gma500: Convert Oaktrail to work with new output handling > > The analysis is as follows: > > 114/* Find the connector we're trying to se

Re: [PATCH] drm/gma500/oaktrail_lvds: replace continue with break

2021-06-18 Thread Patrik Jakobsson
tic analysis checking. Invert the criteria > matching logic and use a break to terminate the loop once > the first suitable connector has been found. > > Thanks to Patrik Jakobsson for explaining the original > intent of the code and suggesting this change. Applied to drm-misc-next Thanks for the patch!

Re: [PATCH] drm/gma500/oaktrail_lvds: replace continue with break

2021-06-19 Thread Patrik Jakobsson
a. The > > use of the continue statement is a little unintuitive and > > can confuse static analysis checking. Invert the criteria > > matching logic and use a break to terminate the loop once > > the first suitable connector has been found. > > > > Thanks to Patri

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

2023-01-28 Thread Patrik Jakobsson
> 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 &g

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 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. > > Signed-off-by:

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-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. > > Signed-off-by:

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, 26

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] 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 in

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] 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 Intel

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

2023-04-05 Thread Patrik Jakobsson
ng to untangle 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 Jakobs

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: > > > > [...] > > > > >> > > >/* > > >> > > > * WARNIN

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: [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: > Sign

<    1   2   3   4   5   6   7   >