diff mbox series

[v2,2/2] drm/fb-helper: Ignore the value of fb_var_screeninfo.pixclock

Message ID 20190108072353.28078-3-mironov.ivan@gmail.com (mailing list archive)
State New, archived
Headers show
Series Fix SDL 1.2 on emulated fbdev devices (broken in kernels >=4.19) | expand

Commit Message

Ivan Mironov Jan. 8, 2019, 7:23 a.m. UTC
Strict requirement of pixclock to be zero breaks support of SDL 1.2
which contains hardcoded table of supported video modes with non-zero
pixclock values[1].

To better understand which pixclock values are considered valid and how
driver should handle these values, I briefly examined few existing fbdev
drivers and documentation in Documentation/fb/. And it looks like there
are no strict rules on that and actual behaviour varies:

	* some drivers treat (pixclock == 0) as "use defaults" (uvesafb.c);
	* some treat (pixclock == 0) as invalid value which leads to
	  -EINVAL (clps711x-fb.c);
	* some pass converted pixclock value to hardware (uvesafb.c);
	* some are trying to find nearest value from predefined table
          (vga16fb.c, video_gx.c).

Given this, I believe that it should be safe to just ignore this value if
changing is not supported. It seems that any portable fbdev application
which was not written only for one specific device working under one
specific kernel version should not rely on any particular behaviour of
pixclock anyway.

However, while enabling SDL1 applications to work out of the box when
there is no /etc/fb.modes with valid settings, this change affects the
video mode choosing logic in SDL. Depending on current screen
resolution, contents of /etc/fb.modes and resolution requested by
application, this may lead to user-visible difference (not always):
image will be displayed in a right way, but it will be aligned to the
left instead of center. There is no "right behaviour" here as well, as
emulated fbdev, opposing to old fbdev drivers, simply ignores any
requsts of video mode changes with resolutions smaller than current.

The easiest way to reproduce this problem is to install sdl-sopwith[2],
remove /etc/fb.modes file if it exists, and then try to run sopwith
from console without X. At least in Fedora 29, sopwith may be simply
installed from standard repositories.

[1] SDL 1.2.15 source code, src/video/fbcon/SDL_fbvideo.c, vesa_timings
[2] http://sdl-sopwith.sourceforge.net/

Signed-off-by: Ivan Mironov <mironov.ivan@gmail.com>
Cc: stable@vger.kernel.org
Fixes: 79e539453b34e ("DRM: i915: add mode setting support")
Fixes: 771fe6b912fca ("drm/radeon: introduce kernel modesetting for radeon hardware")
Fixes: 785b93ef8c309 ("drm/kms: move driver specific fb common code to helper functions (v2)")
---
 drivers/gpu/drm/drm_fb_helper.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Sasha Levin Jan. 9, 2019, 3:52 p.m. UTC | #1
Hi,

[This is an automated email]

This commit has been processed because it contains a "Fixes:" tag,
fixing commit: 79e539453b34 DRM: i915: add mode setting support.

The bot has tested the following trees: v4.20.0, v4.19.13, v4.14.91, v4.9.148, v4.4.169, v3.18.131.

v4.20.0: Failed to apply! Possible dependencies:
    042bf753842d ("drm/fourcc: Add char_per_block, block_w and block_h in drm_format_info")
    9c71a6686bfa ("drm: fourcc: Convert drm_format_info kerneldoc to in-line member documentation")

v4.19.13: Failed to apply! Possible dependencies:
    042bf753842d ("drm/fourcc: Add char_per_block, block_w and block_h in drm_format_info")
    9c71a6686bfa ("drm: fourcc: Convert drm_format_info kerneldoc to in-line member documentation")
    c76abab59b3c ("drm: Use horizontal and vertical chroma subsampling factor while calculating offsets in the physical address of framebuffer")

v4.14.91: Failed to apply! Possible dependencies:
    042bf753842d ("drm/fourcc: Add char_per_block, block_w and block_h in drm_format_info")
    4cc4e1b40f3f ("drm/fourcc: Add a alpha field to drm_format_info")
    9c71a6686bfa ("drm: fourcc: Convert drm_format_info kerneldoc to in-line member documentation")
    c76abab59b3c ("drm: Use horizontal and vertical chroma subsampling factor while calculating offsets in the physical address of framebuffer")
    ce2d54619a10 ("drm/fourcc: Add is_yuv field to drm_format_info to denote if the format is yuv")

v4.9.148: Failed to apply! Possible dependencies:
    042bf753842d ("drm/fourcc: Add char_per_block, block_w and block_h in drm_format_info")
    05fc03217e08 ("drm/mm: Some doc polish")
    06df8ac682e6 ("drm: kselftest for drm_mm_debug()")
    14d7f96f90fb ("drm/fb_cma_helper: Add drm_fb_cma_prepare_fb() helper")
    2bd966d106e3 ("drm: kselftest for drm_mm_replace_node()")
    2fba0de0a9ec ("drm: kselftest for drm_mm_insert_node_in_range()")
    393b50f30566 ("drm: kselftest for drm_mm_init()")
    4636ce93d5b2 ("drm/fb-cma-helper: Add drm_fb_cma_get_gem_addr()")
    50f0033d1a0f ("drm: Add some kselftests for the DRM range manager (struct drm_mm)")
    5628648df755 ("drm/fb-cma-helper: Use drm_gem_framebuffer_helper")
    5705670d0463 ("drm: Track drm_mm allocators and show leaks on shutdown")
    6259a56ba0e1 ("drm: Add asserts to catch overflow in drm_mm_init() and drm_mm_init_scan()")
    62a0d98a188c ("drm: allow to use mmuless SoC")
    72a93e8dd52c ("drm: Take ownership of the dmabuf->obj when exporting")
    7886692a5804 ("drm: kselftest for drm_mm_insert_node()")
    900537dc3889 ("drm: kselftest for drm_mm_reserve_node()")
    940eba2d58a7 ("drm/gem|prime|mm: Use recommened kerneldoc for struct member refs")
    9a71e277888b ("drm: Extract struct drm_mm_scan from struct drm_mm")
    9b26f2ed29f8 ("drm: kselftest for drm_mm and alignment")
    b112481bb327 ("drm/cma-helper: simplify setup for drivers with ->dirty callbacks")
    b3ee963fe41d ("drm: Compile time enabling for asserts in drm_mm")
    ba004e39b199 ("drm: Fix kerneldoc for drm_mm_scan_remove_block()")
    c76abab59b3c ("drm: Use horizontal and vertical chroma subsampling factor while calculating offsets in the physical address of framebuffer")
    e6b62714e87c ("drm: Introduce drm_gem_object_{get,put}()")

v4.4.169: Failed to apply! Possible dependencies:
    042bf753842d ("drm/fourcc: Add char_per_block, block_w and block_h in drm_format_info")
    14d7f96f90fb ("drm/fb_cma_helper: Add drm_fb_cma_prepare_fb() helper")
    199c77179c87 ("drm/fb-cma-helper: Add fb_deferred_io support")
    1eb83451ba55 ("drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create()")
    4636ce93d5b2 ("drm/fb-cma-helper: Add drm_fb_cma_get_gem_addr()")
    5628648df755 ("drm/fb-cma-helper: Use drm_gem_framebuffer_helper")
    70c0616d5a84 ("drm/fb_cma_helper: remove duplicate const from drm_fb_cma_alloc")
    b112481bb327 ("drm/cma-helper: simplify setup for drivers with ->dirty callbacks")
    c76abab59b3c ("drm: Use horizontal and vertical chroma subsampling factor while calculating offsets in the physical address of framebuffer")
    ce0c57576810 ("drm/fb_cma_helper: Implement fb_mmap callback")
    fdce184609ee ("drm/fb-cma-helper: Use const for drm_framebuffer_funcs argument")

v3.18.131: Failed to apply! Possible dependencies:
    042bf753842d ("drm/fourcc: Add char_per_block, block_w and block_h in drm_format_info")
    14d7f96f90fb ("drm/fb_cma_helper: Add drm_fb_cma_prepare_fb() helper")
    199c77179c87 ("drm/fb-cma-helper: Add fb_deferred_io support")
    1a396789f65a ("drm: add Atmel HLCDC Display Controller support")
    1eb83451ba55 ("drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create()")
    2a8cb4894540 ("drm/exynos: merge exynos_drm_buf.c to exynos_drm_gem.c")
    2b8376c803c4 ("drm/exynos: remove struct exynos_drm_encoder layer")
    39a839f2e651 ("drm/exynos: s/exynos_gem_obj/obj in exynos_drm_fbdev.c")
    421ee18d4e04 ("drm/exynos: fix null pointer dereference issue")
    4636ce93d5b2 ("drm/fb-cma-helper: Add drm_fb_cma_get_gem_addr()")
    4846e4520849 ("drm/exynos: clean up machine compatible string check")
    5628648df755 ("drm/fb-cma-helper: Use drm_gem_framebuffer_helper")
    5cbb37df378d ("drm/exynos: resolve infinite loop issue on multi-platform")
    70c0616d5a84 ("drm/fb_cma_helper: remove duplicate const from drm_fb_cma_alloc")
    7239067795dc ("drm/exynos: remove ifdeferry from initialization code")
    7ded85885d49 ("drm/exynos: remove superfluous error messages")
    813fd67b57ff ("drm/exynos: cleanup name of gem object for exynos_drm")
    820687befec4 ("drm/exynos: move Exynos platform drivers registration to init")
    94e30d93f936 ("drm/exynos: remove exynos_drm_fb_set_buf_cnt()")
    96976c3d9aff ("drm/exynos: Add DECON driver")
    b74ea6a97e82 ("drm/exynos: remove DRM_EXYNOS_DMABUF config")
    c76abab59b3c ("drm: Use horizontal and vertical chroma subsampling factor while calculating offsets in the physical address of framebuffer")
    ce0c57576810 ("drm/fb_cma_helper: Implement fb_mmap callback")
    cf67cc9a29ac ("drm/exynos: remove struct exynos_drm_display")
    d38ceaf99ed0 ("drm/amdgpu: add core driver (v4)")
    d56125afcbdf ("drm/exynos: update exynos_drm_framebuffer_init() for multiple buffers")
    e9fbdcb45a36 ("drm/exynos: fix possible infinite loop issue")


How should we proceed with this patch?

--
Thanks,
Sasha
Sasha Levin Jan. 9, 2019, 3:52 p.m. UTC | #2
Hi,

[This is an automated email]

This commit has been processed because it contains a "Fixes:" tag,
fixing commit: 79e539453b34 DRM: i915: add mode setting support.

The bot has tested the following trees: v4.20.0, v4.19.13, v4.14.91, v4.9.148, v4.4.169, v3.18.131.

v4.20.0: Failed to apply! Possible dependencies:
    042bf753842d ("drm/fourcc: Add char_per_block, block_w and block_h in drm_format_info")
    9c71a6686bfa ("drm: fourcc: Convert drm_format_info kerneldoc to in-line member documentation")

v4.19.13: Failed to apply! Possible dependencies:
    042bf753842d ("drm/fourcc: Add char_per_block, block_w and block_h in drm_format_info")
    9c71a6686bfa ("drm: fourcc: Convert drm_format_info kerneldoc to in-line member documentation")
    c76abab59b3c ("drm: Use horizontal and vertical chroma subsampling factor while calculating offsets in the physical address of framebuffer")

v4.14.91: Failed to apply! Possible dependencies:
    042bf753842d ("drm/fourcc: Add char_per_block, block_w and block_h in drm_format_info")
    4cc4e1b40f3f ("drm/fourcc: Add a alpha field to drm_format_info")
    9c71a6686bfa ("drm: fourcc: Convert drm_format_info kerneldoc to in-line member documentation")
    c76abab59b3c ("drm: Use horizontal and vertical chroma subsampling factor while calculating offsets in the physical address of framebuffer")
    ce2d54619a10 ("drm/fourcc: Add is_yuv field to drm_format_info to denote if the format is yuv")

v4.9.148: Failed to apply! Possible dependencies:
    042bf753842d ("drm/fourcc: Add char_per_block, block_w and block_h in drm_format_info")
    05fc03217e08 ("drm/mm: Some doc polish")
    06df8ac682e6 ("drm: kselftest for drm_mm_debug()")
    14d7f96f90fb ("drm/fb_cma_helper: Add drm_fb_cma_prepare_fb() helper")
    2bd966d106e3 ("drm: kselftest for drm_mm_replace_node()")
    2fba0de0a9ec ("drm: kselftest for drm_mm_insert_node_in_range()")
    393b50f30566 ("drm: kselftest for drm_mm_init()")
    4636ce93d5b2 ("drm/fb-cma-helper: Add drm_fb_cma_get_gem_addr()")
    50f0033d1a0f ("drm: Add some kselftests for the DRM range manager (struct drm_mm)")
    5628648df755 ("drm/fb-cma-helper: Use drm_gem_framebuffer_helper")
    5705670d0463 ("drm: Track drm_mm allocators and show leaks on shutdown")
    6259a56ba0e1 ("drm: Add asserts to catch overflow in drm_mm_init() and drm_mm_init_scan()")
    62a0d98a188c ("drm: allow to use mmuless SoC")
    72a93e8dd52c ("drm: Take ownership of the dmabuf->obj when exporting")
    7886692a5804 ("drm: kselftest for drm_mm_insert_node()")
    900537dc3889 ("drm: kselftest for drm_mm_reserve_node()")
    940eba2d58a7 ("drm/gem|prime|mm: Use recommened kerneldoc for struct member refs")
    9a71e277888b ("drm: Extract struct drm_mm_scan from struct drm_mm")
    9b26f2ed29f8 ("drm: kselftest for drm_mm and alignment")
    b112481bb327 ("drm/cma-helper: simplify setup for drivers with ->dirty callbacks")
    b3ee963fe41d ("drm: Compile time enabling for asserts in drm_mm")
    ba004e39b199 ("drm: Fix kerneldoc for drm_mm_scan_remove_block()")
    c76abab59b3c ("drm: Use horizontal and vertical chroma subsampling factor while calculating offsets in the physical address of framebuffer")
    e6b62714e87c ("drm: Introduce drm_gem_object_{get,put}()")

v4.4.169: Failed to apply! Possible dependencies:
    042bf753842d ("drm/fourcc: Add char_per_block, block_w and block_h in drm_format_info")
    14d7f96f90fb ("drm/fb_cma_helper: Add drm_fb_cma_prepare_fb() helper")
    199c77179c87 ("drm/fb-cma-helper: Add fb_deferred_io support")
    1eb83451ba55 ("drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create()")
    4636ce93d5b2 ("drm/fb-cma-helper: Add drm_fb_cma_get_gem_addr()")
    5628648df755 ("drm/fb-cma-helper: Use drm_gem_framebuffer_helper")
    70c0616d5a84 ("drm/fb_cma_helper: remove duplicate const from drm_fb_cma_alloc")
    b112481bb327 ("drm/cma-helper: simplify setup for drivers with ->dirty callbacks")
    c76abab59b3c ("drm: Use horizontal and vertical chroma subsampling factor while calculating offsets in the physical address of framebuffer")
    ce0c57576810 ("drm/fb_cma_helper: Implement fb_mmap callback")
    fdce184609ee ("drm/fb-cma-helper: Use const for drm_framebuffer_funcs argument")

v3.18.131: Failed to apply! Possible dependencies:
    042bf753842d ("drm/fourcc: Add char_per_block, block_w and block_h in drm_format_info")
    14d7f96f90fb ("drm/fb_cma_helper: Add drm_fb_cma_prepare_fb() helper")
    199c77179c87 ("drm/fb-cma-helper: Add fb_deferred_io support")
    1a396789f65a ("drm: add Atmel HLCDC Display Controller support")
    1eb83451ba55 ("drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create()")
    2a8cb4894540 ("drm/exynos: merge exynos_drm_buf.c to exynos_drm_gem.c")
    2b8376c803c4 ("drm/exynos: remove struct exynos_drm_encoder layer")
    39a839f2e651 ("drm/exynos: s/exynos_gem_obj/obj in exynos_drm_fbdev.c")
    421ee18d4e04 ("drm/exynos: fix null pointer dereference issue")
    4636ce93d5b2 ("drm/fb-cma-helper: Add drm_fb_cma_get_gem_addr()")
    4846e4520849 ("drm/exynos: clean up machine compatible string check")
    5628648df755 ("drm/fb-cma-helper: Use drm_gem_framebuffer_helper")
    5cbb37df378d ("drm/exynos: resolve infinite loop issue on multi-platform")
    70c0616d5a84 ("drm/fb_cma_helper: remove duplicate const from drm_fb_cma_alloc")
    7239067795dc ("drm/exynos: remove ifdeferry from initialization code")
    7ded85885d49 ("drm/exynos: remove superfluous error messages")
    813fd67b57ff ("drm/exynos: cleanup name of gem object for exynos_drm")
    820687befec4 ("drm/exynos: move Exynos platform drivers registration to init")
    94e30d93f936 ("drm/exynos: remove exynos_drm_fb_set_buf_cnt()")
    96976c3d9aff ("drm/exynos: Add DECON driver")
    b74ea6a97e82 ("drm/exynos: remove DRM_EXYNOS_DMABUF config")
    c76abab59b3c ("drm: Use horizontal and vertical chroma subsampling factor while calculating offsets in the physical address of framebuffer")
    ce0c57576810 ("drm/fb_cma_helper: Implement fb_mmap callback")
    cf67cc9a29ac ("drm/exynos: remove struct exynos_drm_display")
    d38ceaf99ed0 ("drm/amdgpu: add core driver (v4)")
    d56125afcbdf ("drm/exynos: update exynos_drm_framebuffer_init() for multiple buffers")
    e9fbdcb45a36 ("drm/exynos: fix possible infinite loop issue")


How should we proceed with this patch?

--
Thanks,
Sasha
Ivan Mironov Jan. 10, 2019, 1:08 p.m. UTC | #3
On Wed, 2019-01-09 at 15:52 +0000, Sasha Levin wrote:
> Hi,
> 
> [This is an automated email]
> 
> This commit has been processed because it contains a "Fixes:" tag,
> fixing commit: 79e539453b34 DRM: i915: add mode setting support.
> 
> The bot has tested the following trees: v4.20.0, v4.19.13, v4.14.91, v4.9.148, v4.4.169, v3.18.131.
> 
> v4.20.0: Failed to apply! Possible dependencies:
>     042bf753842d ("drm/fourcc: Add char_per_block, block_w and block_h in drm_format_info")
>     9c71a6686bfa ("drm: fourcc: Convert drm_format_info kerneldoc to in-line member documentation")
> 
> v4.19.13: Failed to apply! Possible dependencies:
>     042bf753842d ("drm/fourcc: Add char_per_block, block_w and block_h in drm_format_info")
>     9c71a6686bfa ("drm: fourcc: Convert drm_format_info kerneldoc to in-line member documentation")
>     c76abab59b3c ("drm: Use horizontal and vertical chroma subsampling factor while calculating offsets in the physical address of framebuffer")
> 
> v4.14.91: Failed to apply! Possible dependencies:
>     042bf753842d ("drm/fourcc: Add char_per_block, block_w and block_h in drm_format_info")
>     4cc4e1b40f3f ("drm/fourcc: Add a alpha field to drm_format_info")
>     9c71a6686bfa ("drm: fourcc: Convert drm_format_info kerneldoc to in-line member documentation")
>     c76abab59b3c ("drm: Use horizontal and vertical chroma subsampling factor while calculating offsets in the physical address of framebuffer")
>     ce2d54619a10 ("drm/fourcc: Add is_yuv field to drm_format_info to denote if the format is yuv")
> 
> v4.9.148: Failed to apply! Possible dependencies:
>     042bf753842d ("drm/fourcc: Add char_per_block, block_w and block_h in drm_format_info")
>     05fc03217e08 ("drm/mm: Some doc polish")
>     06df8ac682e6 ("drm: kselftest for drm_mm_debug()")
>     14d7f96f90fb ("drm/fb_cma_helper: Add drm_fb_cma_prepare_fb() helper")
>     2bd966d106e3 ("drm: kselftest for drm_mm_replace_node()")
>     2fba0de0a9ec ("drm: kselftest for drm_mm_insert_node_in_range()")
>     393b50f30566 ("drm: kselftest for drm_mm_init()")
>     4636ce93d5b2 ("drm/fb-cma-helper: Add drm_fb_cma_get_gem_addr()")
>     50f0033d1a0f ("drm: Add some kselftests for the DRM range manager (struct drm_mm)")
>     5628648df755 ("drm/fb-cma-helper: Use drm_gem_framebuffer_helper")
>     5705670d0463 ("drm: Track drm_mm allocators and show leaks on shutdown")
>     6259a56ba0e1 ("drm: Add asserts to catch overflow in drm_mm_init() and drm_mm_init_scan()")
>     62a0d98a188c ("drm: allow to use mmuless SoC")
>     72a93e8dd52c ("drm: Take ownership of the dmabuf->obj when exporting")
>     7886692a5804 ("drm: kselftest for drm_mm_insert_node()")
>     900537dc3889 ("drm: kselftest for drm_mm_reserve_node()")
>     940eba2d58a7 ("drm/gem|prime|mm: Use recommened kerneldoc for struct member refs")
>     9a71e277888b ("drm: Extract struct drm_mm_scan from struct drm_mm")
>     9b26f2ed29f8 ("drm: kselftest for drm_mm and alignment")
>     b112481bb327 ("drm/cma-helper: simplify setup for drivers with ->dirty callbacks")
>     b3ee963fe41d ("drm: Compile time enabling for asserts in drm_mm")
>     ba004e39b199 ("drm: Fix kerneldoc for drm_mm_scan_remove_block()")
>     c76abab59b3c ("drm: Use horizontal and vertical chroma subsampling factor while calculating offsets in the physical address of framebuffer")
>     e6b62714e87c ("drm: Introduce drm_gem_object_{get,put}()")
> 
> v4.4.169: Failed to apply! Possible dependencies:
>     042bf753842d ("drm/fourcc: Add char_per_block, block_w and block_h in drm_format_info")
>     14d7f96f90fb ("drm/fb_cma_helper: Add drm_fb_cma_prepare_fb() helper")
>     199c77179c87 ("drm/fb-cma-helper: Add fb_deferred_io support")
>     1eb83451ba55 ("drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create()")
>     4636ce93d5b2 ("drm/fb-cma-helper: Add drm_fb_cma_get_gem_addr()")
>     5628648df755 ("drm/fb-cma-helper: Use drm_gem_framebuffer_helper")
>     70c0616d5a84 ("drm/fb_cma_helper: remove duplicate const from drm_fb_cma_alloc")
>     b112481bb327 ("drm/cma-helper: simplify setup for drivers with ->dirty callbacks")
>     c76abab59b3c ("drm: Use horizontal and vertical chroma subsampling factor while calculating offsets in the physical address of framebuffer")
>     ce0c57576810 ("drm/fb_cma_helper: Implement fb_mmap callback")
>     fdce184609ee ("drm/fb-cma-helper: Use const for drm_framebuffer_funcs argument")
> 
> v3.18.131: Failed to apply! Possible dependencies:
>     042bf753842d ("drm/fourcc: Add char_per_block, block_w and block_h in drm_format_info")
>     14d7f96f90fb ("drm/fb_cma_helper: Add drm_fb_cma_prepare_fb() helper")
>     199c77179c87 ("drm/fb-cma-helper: Add fb_deferred_io support")
>     1a396789f65a ("drm: add Atmel HLCDC Display Controller support")
>     1eb83451ba55 ("drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create()")
>     2a8cb4894540 ("drm/exynos: merge exynos_drm_buf.c to exynos_drm_gem.c")
>     2b8376c803c4 ("drm/exynos: remove struct exynos_drm_encoder layer")
>     39a839f2e651 ("drm/exynos: s/exynos_gem_obj/obj in exynos_drm_fbdev.c")
>     421ee18d4e04 ("drm/exynos: fix null pointer dereference issue")
>     4636ce93d5b2 ("drm/fb-cma-helper: Add drm_fb_cma_get_gem_addr()")
>     4846e4520849 ("drm/exynos: clean up machine compatible string check")
>     5628648df755 ("drm/fb-cma-helper: Use drm_gem_framebuffer_helper")
>     5cbb37df378d ("drm/exynos: resolve infinite loop issue on multi-platform")
>     70c0616d5a84 ("drm/fb_cma_helper: remove duplicate const from drm_fb_cma_alloc")
>     7239067795dc ("drm/exynos: remove ifdeferry from initialization code")
>     7ded85885d49 ("drm/exynos: remove superfluous error messages")
>     813fd67b57ff ("drm/exynos: cleanup name of gem object for exynos_drm")
>     820687befec4 ("drm/exynos: move Exynos platform drivers registration to init")
>     94e30d93f936 ("drm/exynos: remove exynos_drm_fb_set_buf_cnt()")
>     96976c3d9aff ("drm/exynos: Add DECON driver")
>     b74ea6a97e82 ("drm/exynos: remove DRM_EXYNOS_DMABUF config")
>     c76abab59b3c ("drm: Use horizontal and vertical chroma subsampling factor while calculating offsets in the physical address of framebuffer")
>     ce0c57576810 ("drm/fb_cma_helper: Implement fb_mmap callback")
>     cf67cc9a29ac ("drm/exynos: remove struct exynos_drm_display")
>     d38ceaf99ed0 ("drm/amdgpu: add core driver (v4)")
>     d56125afcbdf ("drm/exynos: update exynos_drm_framebuffer_init() for multiple buffers")
>     e9fbdcb45a36 ("drm/exynos: fix possible infinite loop issue")
> 
> 
> How should we proceed with this patch?
> 
> --
> Thanks,
> Sasha

Hi,

I'm new to kernel development, so: what exactly I'm supposed to do in
such case? Rebase my patch on top of older versions and then resend
patches somewhere?

Just checked the v3.18.131. Apparently code in question was not changed
since then, so manual rebase would be trivial.
Daniel Vetter Jan. 11, 2019, 9:17 a.m. UTC | #4
On Fri, Jan 11, 2019 at 9:19 AM Ivan Mironov <mironov.ivan@gmail.com> wrote:
>
> On Wed, 2019-01-09 at 15:52 +0000, Sasha Levin wrote:
> > Hi,
> >
> > [This is an automated email]
> >
> > This commit has been processed because it contains a "Fixes:" tag,
> > fixing commit: 79e539453b34 DRM: i915: add mode setting support.
> >
> > The bot has tested the following trees: v4.20.0, v4.19.13, v4.14.91, v4.9.148, v4.4.169, v3.18.131.
> >
> > v4.20.0: Failed to apply! Possible dependencies:
> >     042bf753842d ("drm/fourcc: Add char_per_block, block_w and block_h in drm_format_info")
> >     9c71a6686bfa ("drm: fourcc: Convert drm_format_info kerneldoc to in-line member documentation")
> >
> > v4.19.13: Failed to apply! Possible dependencies:
> >     042bf753842d ("drm/fourcc: Add char_per_block, block_w and block_h in drm_format_info")
> >     9c71a6686bfa ("drm: fourcc: Convert drm_format_info kerneldoc to in-line member documentation")
> >     c76abab59b3c ("drm: Use horizontal and vertical chroma subsampling factor while calculating offsets in the physical address of framebuffer")
> >
> > v4.14.91: Failed to apply! Possible dependencies:
> >     042bf753842d ("drm/fourcc: Add char_per_block, block_w and block_h in drm_format_info")
> >     4cc4e1b40f3f ("drm/fourcc: Add a alpha field to drm_format_info")
> >     9c71a6686bfa ("drm: fourcc: Convert drm_format_info kerneldoc to in-line member documentation")
> >     c76abab59b3c ("drm: Use horizontal and vertical chroma subsampling factor while calculating offsets in the physical address of framebuffer")
> >     ce2d54619a10 ("drm/fourcc: Add is_yuv field to drm_format_info to denote if the format is yuv")
> >
> > v4.9.148: Failed to apply! Possible dependencies:
> >     042bf753842d ("drm/fourcc: Add char_per_block, block_w and block_h in drm_format_info")
> >     05fc03217e08 ("drm/mm: Some doc polish")
> >     06df8ac682e6 ("drm: kselftest for drm_mm_debug()")
> >     14d7f96f90fb ("drm/fb_cma_helper: Add drm_fb_cma_prepare_fb() helper")
> >     2bd966d106e3 ("drm: kselftest for drm_mm_replace_node()")
> >     2fba0de0a9ec ("drm: kselftest for drm_mm_insert_node_in_range()")
> >     393b50f30566 ("drm: kselftest for drm_mm_init()")
> >     4636ce93d5b2 ("drm/fb-cma-helper: Add drm_fb_cma_get_gem_addr()")
> >     50f0033d1a0f ("drm: Add some kselftests for the DRM range manager (struct drm_mm)")
> >     5628648df755 ("drm/fb-cma-helper: Use drm_gem_framebuffer_helper")
> >     5705670d0463 ("drm: Track drm_mm allocators and show leaks on shutdown")
> >     6259a56ba0e1 ("drm: Add asserts to catch overflow in drm_mm_init() and drm_mm_init_scan()")
> >     62a0d98a188c ("drm: allow to use mmuless SoC")
> >     72a93e8dd52c ("drm: Take ownership of the dmabuf->obj when exporting")
> >     7886692a5804 ("drm: kselftest for drm_mm_insert_node()")
> >     900537dc3889 ("drm: kselftest for drm_mm_reserve_node()")
> >     940eba2d58a7 ("drm/gem|prime|mm: Use recommened kerneldoc for struct member refs")
> >     9a71e277888b ("drm: Extract struct drm_mm_scan from struct drm_mm")
> >     9b26f2ed29f8 ("drm: kselftest for drm_mm and alignment")
> >     b112481bb327 ("drm/cma-helper: simplify setup for drivers with ->dirty callbacks")
> >     b3ee963fe41d ("drm: Compile time enabling for asserts in drm_mm")
> >     ba004e39b199 ("drm: Fix kerneldoc for drm_mm_scan_remove_block()")
> >     c76abab59b3c ("drm: Use horizontal and vertical chroma subsampling factor while calculating offsets in the physical address of framebuffer")
> >     e6b62714e87c ("drm: Introduce drm_gem_object_{get,put}()")
> >
> > v4.4.169: Failed to apply! Possible dependencies:
> >     042bf753842d ("drm/fourcc: Add char_per_block, block_w and block_h in drm_format_info")
> >     14d7f96f90fb ("drm/fb_cma_helper: Add drm_fb_cma_prepare_fb() helper")
> >     199c77179c87 ("drm/fb-cma-helper: Add fb_deferred_io support")
> >     1eb83451ba55 ("drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create()")
> >     4636ce93d5b2 ("drm/fb-cma-helper: Add drm_fb_cma_get_gem_addr()")
> >     5628648df755 ("drm/fb-cma-helper: Use drm_gem_framebuffer_helper")
> >     70c0616d5a84 ("drm/fb_cma_helper: remove duplicate const from drm_fb_cma_alloc")
> >     b112481bb327 ("drm/cma-helper: simplify setup for drivers with ->dirty callbacks")
> >     c76abab59b3c ("drm: Use horizontal and vertical chroma subsampling factor while calculating offsets in the physical address of framebuffer")
> >     ce0c57576810 ("drm/fb_cma_helper: Implement fb_mmap callback")
> >     fdce184609ee ("drm/fb-cma-helper: Use const for drm_framebuffer_funcs argument")
> >
> > v3.18.131: Failed to apply! Possible dependencies:
> >     042bf753842d ("drm/fourcc: Add char_per_block, block_w and block_h in drm_format_info")
> >     14d7f96f90fb ("drm/fb_cma_helper: Add drm_fb_cma_prepare_fb() helper")
> >     199c77179c87 ("drm/fb-cma-helper: Add fb_deferred_io support")
> >     1a396789f65a ("drm: add Atmel HLCDC Display Controller support")
> >     1eb83451ba55 ("drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create()")
> >     2a8cb4894540 ("drm/exynos: merge exynos_drm_buf.c to exynos_drm_gem.c")
> >     2b8376c803c4 ("drm/exynos: remove struct exynos_drm_encoder layer")
> >     39a839f2e651 ("drm/exynos: s/exynos_gem_obj/obj in exynos_drm_fbdev.c")
> >     421ee18d4e04 ("drm/exynos: fix null pointer dereference issue")
> >     4636ce93d5b2 ("drm/fb-cma-helper: Add drm_fb_cma_get_gem_addr()")
> >     4846e4520849 ("drm/exynos: clean up machine compatible string check")
> >     5628648df755 ("drm/fb-cma-helper: Use drm_gem_framebuffer_helper")
> >     5cbb37df378d ("drm/exynos: resolve infinite loop issue on multi-platform")
> >     70c0616d5a84 ("drm/fb_cma_helper: remove duplicate const from drm_fb_cma_alloc")
> >     7239067795dc ("drm/exynos: remove ifdeferry from initialization code")
> >     7ded85885d49 ("drm/exynos: remove superfluous error messages")
> >     813fd67b57ff ("drm/exynos: cleanup name of gem object for exynos_drm")
> >     820687befec4 ("drm/exynos: move Exynos platform drivers registration to init")
> >     94e30d93f936 ("drm/exynos: remove exynos_drm_fb_set_buf_cnt()")
> >     96976c3d9aff ("drm/exynos: Add DECON driver")
> >     b74ea6a97e82 ("drm/exynos: remove DRM_EXYNOS_DMABUF config")
> >     c76abab59b3c ("drm: Use horizontal and vertical chroma subsampling factor while calculating offsets in the physical address of framebuffer")
> >     ce0c57576810 ("drm/fb_cma_helper: Implement fb_mmap callback")
> >     cf67cc9a29ac ("drm/exynos: remove struct exynos_drm_display")
> >     d38ceaf99ed0 ("drm/amdgpu: add core driver (v4)")
> >     d56125afcbdf ("drm/exynos: update exynos_drm_framebuffer_init() for multiple buffers")
> >     e9fbdcb45a36 ("drm/exynos: fix possible infinite loop issue")
> >
> >
> > How should we proceed with this patch?
> >
> > --
> > Thanks,
> > Sasha
>
> Hi,
>
> I'm new to kernel development, so: what exactly I'm supposed to do in
> such case? Rebase my patch on top of older versions and then resend
> patches somewhere?
>
> Just checked the v3.18.131. Apparently code in question was not changed
> since then, so manual rebase would be trivial.

If you want to do that work of backporting to older kernels, then:
- grab latest point release of each such kernel you care about.
- cherry-pick the upstream commit with git cherry-pick -x (the -x is
required by stable kernel release rules)
- add a note at the bottom that this is the manual backport for $kernel_release
- submit to stable team

https://www.kernel.org/doc/html/v4.14/process/stable-kernel-rules.html#option-3

Cheers, Daniel

>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox series

Patch

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index ed7e91423258..2d4c2b38508e 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -1690,9 +1690,14 @@  int drm_fb_helper_check_var(struct fb_var_screeninfo *var,
 	struct drm_fb_helper *fb_helper = info->par;
 	struct drm_framebuffer *fb = fb_helper->fb;
 
-	if (var->pixclock != 0 || in_dbg_master())
+	if (in_dbg_master())
 		return -EINVAL;
 
+	if (var->pixclock != 0) {
+		DRM_DEBUG("fbdev emulation doesn't support changing the pixel clock, value of pixclock is ignored\n");
+		var->pixclock = 0;
+	}
+
 	if ((drm_format_info_block_width(fb->format, 0) > 1) ||
 	    (drm_format_info_block_height(fb->format, 0) > 1))
 		return -EINVAL;