-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RP1 VEC and DPI drivers both can crash if they fail to map hardware registers #5901
Comments
njhollinghurst
added a commit
to njhollinghurst/linux
that referenced
this issue
Feb 3, 2024
Don't try to write to an unmapped register during clean-up. This covers the case where a Video Out Config register block could not be mapped due to contention from another driver. Signed-off-by: Nick Hollinghurst <[email protected]>
njhollinghurst
added a commit
to njhollinghurst/linux
that referenced
this issue
Feb 3, 2024
Don't try to write to an unmapped register during clean-up. This covers the case where a Video Out Config register block could not be mapped due to contention from another driver. Signed-off-by: Nick Hollinghurst <[email protected]>
njhollinghurst
added a commit
to njhollinghurst/linux
that referenced
this issue
Feb 5, 2024
Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
njhollinghurst
added a commit
to njhollinghurst/linux
that referenced
this issue
Feb 5, 2024
Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
pelwell
pushed a commit
that referenced
this issue
Feb 5, 2024
Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Feb 6, 2024
Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
Not sure why this didn't close itself. Closing issue now. |
pelwell
pushed a commit
that referenced
this issue
Feb 18, 2024
Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
pelwell
pushed a commit
that referenced
this issue
Feb 18, 2024
Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Feb 19, 2024
Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Feb 19, 2024
Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Feb 19, 2024
Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Feb 23, 2024
Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Feb 23, 2024
Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Mar 5, 2024
Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Mar 5, 2024
Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Mar 5, 2024
Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Mar 11, 2024
Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Mar 11, 2024
Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Mar 19, 2024
Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Mar 19, 2024
Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Mar 27, 2024
Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Mar 27, 2024
Add support for the RP1 DPI hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Mar 27, 2024
Add support for the RP1 VEC hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: rp1-vec: Allow non-standard modes with various crops Tweak sync timings in the advertised modelines. Accept other, custom modes, provided they fit within the active area of one of the existing hardware-supported TV modes. Instead of always padding symmetrically, try to respect the user's [hv]sync_start values, allowing the image to be shifted around the screen (to fine-tune overscan correction). Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: Use tv_mode from the command line and fix for Linux 6.6 Use the standard enum drm_connector_tv_mode instead of a private enum and switch from the legacy to the standard tv_mode property. Remove the module parameter "tv_norm". Instead, get tv_mode from the command line and make this the connector's default TV mode. Don't restrict the choice of modes based on tv_mode, but interpret nonstandard combinations as NTSC or PAL, depending on resolution. Thus the default tv_mode=NTSC effectively means "Auto". Tweak the advertised horizontal timings for 625/50 to match Rec.601 Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Mar 27, 2024
Add support for the RP1 DPI hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Mar 27, 2024
Add support for the RP1 VEC hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: rp1-vec: Allow non-standard modes with various crops Tweak sync timings in the advertised modelines. Accept other, custom modes, provided they fit within the active area of one of the existing hardware-supported TV modes. Instead of always padding symmetrically, try to respect the user's [hv]sync_start values, allowing the image to be shifted around the screen (to fine-tune overscan correction). Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: Use tv_mode from the command line and fix for Linux 6.6 Use the standard enum drm_connector_tv_mode instead of a private enum and switch from the legacy to the standard tv_mode property. Remove the module parameter "tv_norm". Instead, get tv_mode from the command line and make this the connector's default TV mode. Don't restrict the choice of modes based on tv_mode, but interpret nonstandard combinations as NTSC or PAL, depending on resolution. Thus the default tv_mode=NTSC effectively means "Auto". Tweak the advertised horizontal timings for 625/50 to match Rec.601 Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Apr 3, 2024
Add support for the RP1 DPI hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Apr 3, 2024
Add support for the RP1 VEC hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: rp1-vec: Allow non-standard modes with various crops Tweak sync timings in the advertised modelines. Accept other, custom modes, provided they fit within the active area of one of the existing hardware-supported TV modes. Instead of always padding symmetrically, try to respect the user's [hv]sync_start values, allowing the image to be shifted around the screen (to fine-tune overscan correction). Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: Use tv_mode from the command line and fix for Linux 6.6 Use the standard enum drm_connector_tv_mode instead of a private enum and switch from the legacy to the standard tv_mode property. Remove the module parameter "tv_norm". Instead, get tv_mode from the command line and make this the connector's default TV mode. Don't restrict the choice of modes based on tv_mode, but interpret nonstandard combinations as NTSC or PAL, depending on resolution. Thus the default tv_mode=NTSC effectively means "Auto". Tweak the advertised horizontal timings for 625/50 to match Rec.601 Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Sep 2, 2024
Add support for the RP1 DPI hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Sep 2, 2024
Add support for the RP1 VEC hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: rp1-vec: Allow non-standard modes with various crops Tweak sync timings in the advertised modelines. Accept other, custom modes, provided they fit within the active area of one of the existing hardware-supported TV modes. Instead of always padding symmetrically, try to respect the user's [hv]sync_start values, allowing the image to be shifted around the screen (to fine-tune overscan correction). Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: Use tv_mode from the command line and fix for Linux 6.6 Use the standard enum drm_connector_tv_mode instead of a private enum and switch from the legacy to the standard tv_mode property. Remove the module parameter "tv_norm". Instead, get tv_mode from the command line and make this the connector's default TV mode. Don't restrict the choice of modes based on tv_mode, but interpret nonstandard combinations as NTSC or PAL, depending on resolution. Thus the default tv_mode=NTSC effectively means "Auto". Tweak the advertised horizontal timings for 625/50 to match Rec.601 Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Sep 6, 2024
Add support for the RP1 DPI hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Sep 6, 2024
Add support for the RP1 VEC hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: rp1-vec: Allow non-standard modes with various crops Tweak sync timings in the advertised modelines. Accept other, custom modes, provided they fit within the active area of one of the existing hardware-supported TV modes. Instead of always padding symmetrically, try to respect the user's [hv]sync_start values, allowing the image to be shifted around the screen (to fine-tune overscan correction). Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: Use tv_mode from the command line and fix for Linux 6.6 Use the standard enum drm_connector_tv_mode instead of a private enum and switch from the legacy to the standard tv_mode property. Remove the module parameter "tv_norm". Instead, get tv_mode from the command line and make this the connector's default TV mode. Don't restrict the choice of modes based on tv_mode, but interpret nonstandard combinations as NTSC or PAL, depending on resolution. Thus the default tv_mode=NTSC effectively means "Auto". Tweak the advertised horizontal timings for 625/50 to match Rec.601 Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Sep 10, 2024
Add support for the RP1 DPI hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Sep 10, 2024
Add support for the RP1 VEC hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: rp1-vec: Allow non-standard modes with various crops Tweak sync timings in the advertised modelines. Accept other, custom modes, provided they fit within the active area of one of the existing hardware-supported TV modes. Instead of always padding symmetrically, try to respect the user's [hv]sync_start values, allowing the image to be shifted around the screen (to fine-tune overscan correction). Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: Use tv_mode from the command line and fix for Linux 6.6 Use the standard enum drm_connector_tv_mode instead of a private enum and switch from the legacy to the standard tv_mode property. Remove the module parameter "tv_norm". Instead, get tv_mode from the command line and make this the connector's default TV mode. Don't restrict the choice of modes based on tv_mode, but interpret nonstandard combinations as NTSC or PAL, depending on resolution. Thus the default tv_mode=NTSC effectively means "Auto". Tweak the advertised horizontal timings for 625/50 to match Rec.601 Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Sep 10, 2024
Add support for the RP1 DPI hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Sep 10, 2024
Add support for the RP1 VEC hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: rp1-vec: Allow non-standard modes with various crops Tweak sync timings in the advertised modelines. Accept other, custom modes, provided they fit within the active area of one of the existing hardware-supported TV modes. Instead of always padding symmetrically, try to respect the user's [hv]sync_start values, allowing the image to be shifted around the screen (to fine-tune overscan correction). Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: Use tv_mode from the command line and fix for Linux 6.6 Use the standard enum drm_connector_tv_mode instead of a private enum and switch from the legacy to the standard tv_mode property. Remove the module parameter "tv_norm". Instead, get tv_mode from the command line and make this the connector's default TV mode. Don't restrict the choice of modes based on tv_mode, but interpret nonstandard combinations as NTSC or PAL, depending on resolution. Thus the default tv_mode=NTSC effectively means "Auto". Tweak the advertised horizontal timings for 625/50 to match Rec.601 Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Sep 12, 2024
Add support for the RP1 DPI hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Sep 12, 2024
Add support for the RP1 VEC hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: rp1-vec: Allow non-standard modes with various crops Tweak sync timings in the advertised modelines. Accept other, custom modes, provided they fit within the active area of one of the existing hardware-supported TV modes. Instead of always padding symmetrically, try to respect the user's [hv]sync_start values, allowing the image to be shifted around the screen (to fine-tune overscan correction). Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: Use tv_mode from the command line and fix for Linux 6.6 Use the standard enum drm_connector_tv_mode instead of a private enum and switch from the legacy to the standard tv_mode property. Remove the module parameter "tv_norm". Instead, get tv_mode from the command line and make this the connector's default TV mode. Don't restrict the choice of modes based on tv_mode, but interpret nonstandard combinations as NTSC or PAL, depending on resolution. Thus the default tv_mode=NTSC effectively means "Auto". Tweak the advertised horizontal timings for 625/50 to match Rec.601 Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Sep 16, 2024
Add support for the RP1 DPI hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Sep 16, 2024
Add support for the RP1 VEC hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: rp1-vec: Allow non-standard modes with various crops Tweak sync timings in the advertised modelines. Accept other, custom modes, provided they fit within the active area of one of the existing hardware-supported TV modes. Instead of always padding symmetrically, try to respect the user's [hv]sync_start values, allowing the image to be shifted around the screen (to fine-tune overscan correction). Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: Use tv_mode from the command line and fix for Linux 6.6 Use the standard enum drm_connector_tv_mode instead of a private enum and switch from the legacy to the standard tv_mode property. Remove the module parameter "tv_norm". Instead, get tv_mode from the command line and make this the connector's default TV mode. Don't restrict the choice of modes based on tv_mode, but interpret nonstandard combinations as NTSC or PAL, depending on resolution. Thus the default tv_mode=NTSC effectively means "Auto". Tweak the advertised horizontal timings for 625/50 to match Rec.601 Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Sep 16, 2024
Add support for the RP1 DPI hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Sep 16, 2024
Add support for the RP1 VEC hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: rp1-vec: Allow non-standard modes with various crops Tweak sync timings in the advertised modelines. Accept other, custom modes, provided they fit within the active area of one of the existing hardware-supported TV modes. Instead of always padding symmetrically, try to respect the user's [hv]sync_start values, allowing the image to be shifted around the screen (to fine-tune overscan correction). Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: Use tv_mode from the command line and fix for Linux 6.6 Use the standard enum drm_connector_tv_mode instead of a private enum and switch from the legacy to the standard tv_mode property. Remove the module parameter "tv_norm". Instead, get tv_mode from the command line and make this the connector's default TV mode. Don't restrict the choice of modes based on tv_mode, but interpret nonstandard combinations as NTSC or PAL, depending on resolution. Thus the default tv_mode=NTSC effectively means "Auto". Tweak the advertised horizontal timings for 625/50 to match Rec.601 Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Oct 2, 2024
Add support for the RP1 DPI hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Oct 2, 2024
Add support for the RP1 VEC hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: rp1-vec: Allow non-standard modes with various crops Tweak sync timings in the advertised modelines. Accept other, custom modes, provided they fit within the active area of one of the existing hardware-supported TV modes. Instead of always padding symmetrically, try to respect the user's [hv]sync_start values, allowing the image to be shifted around the screen (to fine-tune overscan correction). Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: Use tv_mode from the command line and fix for Linux 6.6 Use the standard enum drm_connector_tv_mode instead of a private enum and switch from the legacy to the standard tv_mode property. Remove the module parameter "tv_norm". Instead, get tv_mode from the command line and make this the connector's default TV mode. Don't restrict the choice of modes based on tv_mode, but interpret nonstandard combinations as NTSC or PAL, depending on resolution. Thus the default tv_mode=NTSC effectively means "Auto". Tweak the advertised horizontal timings for 625/50 to match Rec.601 Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Oct 2, 2024
Add support for the RP1 DPI hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Oct 2, 2024
Add support for the RP1 VEC hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: rp1-vec: Allow non-standard modes with various crops Tweak sync timings in the advertised modelines. Accept other, custom modes, provided they fit within the active area of one of the existing hardware-supported TV modes. Instead of always padding symmetrically, try to respect the user's [hv]sync_start values, allowing the image to be shifted around the screen (to fine-tune overscan correction). Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: Use tv_mode from the command line and fix for Linux 6.6 Use the standard enum drm_connector_tv_mode instead of a private enum and switch from the legacy to the standard tv_mode property. Remove the module parameter "tv_norm". Instead, get tv_mode from the command line and make this the connector's default TV mode. Don't restrict the choice of modes based on tv_mode, but interpret nonstandard combinations as NTSC or PAL, depending on resolution. Thus the default tv_mode=NTSC effectively means "Auto". Tweak the advertised horizontal timings for 625/50 to match Rec.601 Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Oct 7, 2024
Add support for the RP1 DPI hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: dpi: Add support for MEDIA_BUS_FMT_RGB565_1X24_CPADHI This new format corresponds to the Raspberry Pi legacy DPI mode 3. Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: rp1-dpi: Add DRM_FORMAT_ARGB8888 and DRM_FORMAT_ABGR8888 Android requires this. As the underlying hardware doesn't support alpha blending, we ignore the alpha value. Signed-off-by: Jan Kehren <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Oct 7, 2024
Add support for the RP1 VEC hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: rp1-vec: Allow non-standard modes with various crops Tweak sync timings in the advertised modelines. Accept other, custom modes, provided they fit within the active area of one of the existing hardware-supported TV modes. Instead of always padding symmetrically, try to respect the user's [hv]sync_start values, allowing the image to be shifted around the screen (to fine-tune overscan correction). Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: Use tv_mode from the command line and fix for Linux 6.6 Use the standard enum drm_connector_tv_mode instead of a private enum and switch from the legacy to the standard tv_mode property. Remove the module parameter "tv_norm". Instead, get tv_mode from the command line and make this the connector's default TV mode. Don't restrict the choice of modes based on tv_mode, but interpret nonstandard combinations as NTSC or PAL, depending on resolution. Thus the default tv_mode=NTSC effectively means "Auto". Tweak the advertised horizontal timings for 625/50 to match Rec.601 Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: vec: Support more video modes in the RP1 VEC driver Support a wider range of pixel clock rates. The driver will round pixclock up to 108MHz/n but tries to honour the desired image width and position (of the centre of the display relative to HSYNC_STARTs). This adds complexity but removes the need for separate 13.5MHz and 15.428MHz modes. Support "fake" double-rate progressive modes (in which only every 2nd scanline is displayed). To work around aspect ratio issues. Add Monochrome TV mode support. Add "vintage" modes (544x380i for System A; 848x738i for System E) when configured for Monochrome. Add a way to create a "custom" display mode from a module parameter. Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: rp1-vec: Add DRM_FORMAT_ARGB8888 and DRM_FORMAT_ABGR8888 Android requires this. As the underlying hardware doesn't support alpha blending, we ignore the alpha value. Signed-off-by: Jan Kehren <[email protected]> drivers: drm: rp1-vec: Increase width limit, for PAL 16:9 @ 18MHz There was no technical reason for the DRM mode's width limit of 848; increase it to 960 (720*18MHz/13.5MHz) to support ~square pixels on 16:9 screens. Tweak the PAL active window to start slightly earlier. (The maximum number of visible columns at 18MHz is about 942.) Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Oct 10, 2024
Add support for the RP1 DPI hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Oct 10, 2024
Add support for the RP1 VEC hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: rp1-vec: Allow non-standard modes with various crops Tweak sync timings in the advertised modelines. Accept other, custom modes, provided they fit within the active area of one of the existing hardware-supported TV modes. Instead of always padding symmetrically, try to respect the user's [hv]sync_start values, allowing the image to be shifted around the screen (to fine-tune overscan correction). Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: Use tv_mode from the command line and fix for Linux 6.6 Use the standard enum drm_connector_tv_mode instead of a private enum and switch from the legacy to the standard tv_mode property. Remove the module parameter "tv_norm". Instead, get tv_mode from the command line and make this the connector's default TV mode. Don't restrict the choice of modes based on tv_mode, but interpret nonstandard combinations as NTSC or PAL, depending on resolution. Thus the default tv_mode=NTSC effectively means "Auto". Tweak the advertised horizontal timings for 625/50 to match Rec.601 Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Oct 10, 2024
Add support for the RP1 DPI hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Oct 10, 2024
Add support for the RP1 VEC hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: rp1-vec: Allow non-standard modes with various crops Tweak sync timings in the advertised modelines. Accept other, custom modes, provided they fit within the active area of one of the existing hardware-supported TV modes. Instead of always padding symmetrically, try to respect the user's [hv]sync_start values, allowing the image to be shifted around the screen (to fine-tune overscan correction). Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: Use tv_mode from the command line and fix for Linux 6.6 Use the standard enum drm_connector_tv_mode instead of a private enum and switch from the legacy to the standard tv_mode property. Remove the module parameter "tv_norm". Instead, get tv_mode from the command line and make this the connector's default TV mode. Don't restrict the choice of modes based on tv_mode, but interpret nonstandard combinations as NTSC or PAL, depending on resolution. Thus the default tv_mode=NTSC effectively means "Auto". Tweak the advertised horizontal timings for 625/50 to match Rec.601 Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Oct 14, 2024
Add support for the RP1 DPI hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: dpi: Add support for MEDIA_BUS_FMT_RGB565_1X24_CPADHI This new format corresponds to the Raspberry Pi legacy DPI mode 3. Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: rp1-dpi: Add DRM_FORMAT_ARGB8888 and DRM_FORMAT_ABGR8888 Android requires this. As the underlying hardware doesn't support alpha blending, we ignore the alpha value. Signed-off-by: Jan Kehren <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Oct 14, 2024
Add support for the RP1 VEC hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: rp1-vec: Allow non-standard modes with various crops Tweak sync timings in the advertised modelines. Accept other, custom modes, provided they fit within the active area of one of the existing hardware-supported TV modes. Instead of always padding symmetrically, try to respect the user's [hv]sync_start values, allowing the image to be shifted around the screen (to fine-tune overscan correction). Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: Use tv_mode from the command line and fix for Linux 6.6 Use the standard enum drm_connector_tv_mode instead of a private enum and switch from the legacy to the standard tv_mode property. Remove the module parameter "tv_norm". Instead, get tv_mode from the command line and make this the connector's default TV mode. Don't restrict the choice of modes based on tv_mode, but interpret nonstandard combinations as NTSC or PAL, depending on resolution. Thus the default tv_mode=NTSC effectively means "Auto". Tweak the advertised horizontal timings for 625/50 to match Rec.601 Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: vec: Support more video modes in the RP1 VEC driver Support a wider range of pixel clock rates. The driver will round pixclock up to 108MHz/n but tries to honour the desired image width and position (of the centre of the display relative to HSYNC_STARTs). This adds complexity but removes the need for separate 13.5MHz and 15.428MHz modes. Support "fake" double-rate progressive modes (in which only every 2nd scanline is displayed). To work around aspect ratio issues. Add Monochrome TV mode support. Add "vintage" modes (544x380i for System A; 848x738i for System E) when configured for Monochrome. Add a way to create a "custom" display mode from a module parameter. Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: rp1-vec: Add DRM_FORMAT_ARGB8888 and DRM_FORMAT_ABGR8888 Android requires this. As the underlying hardware doesn't support alpha blending, we ignore the alpha value. Signed-off-by: Jan Kehren <[email protected]> drivers: drm: rp1-vec: Increase width limit, for PAL 16:9 @ 18MHz There was no technical reason for the DRM mode's width limit of 848; increase it to 960 (720*18MHz/13.5MHz) to support ~square pixels on 16:9 screens. Tweak the PAL active window to start slightly earlier. (The maximum number of visible columns at 18MHz is about 942.) Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Oct 14, 2024
Add support for the RP1 DPI hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: dpi: Add support for MEDIA_BUS_FMT_RGB565_1X24_CPADHI This new format corresponds to the Raspberry Pi legacy DPI mode 3. Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: rp1-dpi: Add DRM_FORMAT_ARGB8888 and DRM_FORMAT_ABGR8888 Android requires this. As the underlying hardware doesn't support alpha blending, we ignore the alpha value. Signed-off-by: Jan Kehren <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Oct 14, 2024
Add support for the RP1 VEC hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: rp1-vec: Allow non-standard modes with various crops Tweak sync timings in the advertised modelines. Accept other, custom modes, provided they fit within the active area of one of the existing hardware-supported TV modes. Instead of always padding symmetrically, try to respect the user's [hv]sync_start values, allowing the image to be shifted around the screen (to fine-tune overscan correction). Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: Use tv_mode from the command line and fix for Linux 6.6 Use the standard enum drm_connector_tv_mode instead of a private enum and switch from the legacy to the standard tv_mode property. Remove the module parameter "tv_norm". Instead, get tv_mode from the command line and make this the connector's default TV mode. Don't restrict the choice of modes based on tv_mode, but interpret nonstandard combinations as NTSC or PAL, depending on resolution. Thus the default tv_mode=NTSC effectively means "Auto". Tweak the advertised horizontal timings for 625/50 to match Rec.601 Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: vec: Support more video modes in the RP1 VEC driver Support a wider range of pixel clock rates. The driver will round pixclock up to 108MHz/n but tries to honour the desired image width and position (of the centre of the display relative to HSYNC_STARTs). This adds complexity but removes the need for separate 13.5MHz and 15.428MHz modes. Support "fake" double-rate progressive modes (in which only every 2nd scanline is displayed). To work around aspect ratio issues. Add Monochrome TV mode support. Add "vintage" modes (544x380i for System A; 848x738i for System E) when configured for Monochrome. Add a way to create a "custom" display mode from a module parameter. Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: rp1-vec: Add DRM_FORMAT_ARGB8888 and DRM_FORMAT_ABGR8888 Android requires this. As the underlying hardware doesn't support alpha blending, we ignore the alpha value. Signed-off-by: Jan Kehren <[email protected]> drivers: drm: rp1-vec: Increase width limit, for PAL 16:9 @ 18MHz There was no technical reason for the DRM mode's width limit of 848; increase it to 960 (720*18MHz/13.5MHz) to support ~square pixels on 16:9 screens. Tweak the PAL active window to start slightly earlier. (The maximum number of visible columns at 18MHz is about 942.) Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Oct 17, 2024
Add support for the RP1 DPI hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
popcornmix
pushed a commit
that referenced
this issue
Oct 17, 2024
Add support for the RP1 VEC hardware. Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: rp1-vec: Allow non-standard modes with various crops Tweak sync timings in the advertised modelines. Accept other, custom modes, provided they fit within the active area of one of the existing hardware-supported TV modes. Instead of always padding symmetrically, try to respect the user's [hv]sync_start values, allowing the image to be shifted around the screen (to fine-tune overscan correction). Signed-off-by: Nick Hollinghurst <[email protected]> drm/rp1: depends on, instead of select, MFD_RP1 According to kconfig-language.txt [1], select should be used only for "non-visible symbols ... and for symbols with no dependencies". Since MFD_RP1 both is visible and has a dependency, "select" should not be used and "depends on" should be used instead. In particular, this fixes the build of this kernel tree on NixOS, where its kernel config system will try to answer 'M' to as many config as possible. [1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html Signed-off-by: Ratchanan Srirattanamet <[email protected]> drm: rp1: Use tv_mode from the command line and fix for Linux 6.6 Use the standard enum drm_connector_tv_mode instead of a private enum and switch from the legacy to the standard tv_mode property. Remove the module parameter "tv_norm". Instead, get tv_mode from the command line and make this the connector's default TV mode. Don't restrict the choice of modes based on tv_mode, but interpret nonstandard combinations as NTSC or PAL, depending on resolution. Thus the default tv_mode=NTSC effectively means "Auto". Tweak the advertised horizontal timings for 625/50 to match Rec.601 Signed-off-by: Nick Hollinghurst <[email protected]> drm: rp1: VEC and DPI drivers: Fix bug #5901 Rework probe() to use devm_drm_dev_alloc(), embedding the DRM device in the DPI or VEC device as now seems to be recommended. Change order of resource allocation and driver initialization. This prevents it trying to write to an unmapped register during clean-up, which previously could crash. Signed-off-by: Nick Hollinghurst <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
RP1's VEC and DPI drivers aren't intended to be used together (because of contention for PLL / clock resources). So rather lazily, they also share a common block of registers. Only one driver will probe successfully.
So far as intended; except that when probe fails, during cleanup the driver tries to write to an unmapped register, resulting in an Oops.
Steps to reproduce the behaviour
On Raspberry Pi 5, enable both composite video and load vc4-kms-vga666 or vc4-kms-dpi-generic overlay.
Device (s)
Raspberry Pi 5
System
6.6
Logs
Additional context
No response
The text was updated successfully, but these errors were encountered: