diff mbox

drm: Make PANEL_ORIENTATION_QUIRKS depend on DRM

Message ID 20180115154857.6668-1-chris@chris-wilson.co.uk (mailing list archive)
State New, archived
Headers show

Commit Message

Chris Wilson Jan. 15, 2018, 3:48 p.m. UTC
Commit 404d1a3edc38 ("drm: Add panel orientation quirks, v6.")
introduced a new internal Kconfig option for DRM and placed in the
middle of the DRM option sequence without including a depends on DRM.
This has the unfortunate side-effect of breaking the DRM menuconfig to
not include the existing DRM options.

Fixes: 404d1a3edc38 ("drm: Add panel orientation quirks, v6.")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Hans de Goede <hdegoede@redhat.com>
---
 drivers/gpu/drm/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Hans de Goede Jan. 15, 2018, 3:56 p.m. UTC | #1
Hi,

On 15-01-18 16:48, Chris Wilson wrote:
> Commit 404d1a3edc38 ("drm: Add panel orientation quirks, v6.")
> introduced a new internal Kconfig option for DRM and placed in the
> middle of the DRM option sequence without including a depends on DRM.
> This has the unfortunate side-effect of breaking the DRM menuconfig to
> not include the existing DRM options.

These quirks can also be used by fbdev drivers, so the Kconfig option
intentionally does not have a depends on DRM.

After reading how menuconfig works in Documentation/kbuild/kconfig-language.txt
I can see how I've broken things, sorry.

But your fix is not correct, the fbdev code does a
select DRM_PANEL_ORIENTATION_QUIRKS without depending on
DRM so this will cause circular dependency issues.

The proper fix would be to move the entry entirely to the
end putting it together with DRM_LIB_RANDOM which also does
not depend on DRM.

Shall I submit a patch with the proper fix, or will you?

Regards,

Hans


> 
> Fixes: 404d1a3edc38 ("drm: Add panel orientation quirks, v6.")
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Hans de Goede <hdegoede@redhat.com>



> ---
>   drivers/gpu/drm/Kconfig | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
> index 0bc374459440..3218d0e8fb1b 100644
> --- a/drivers/gpu/drm/Kconfig
> +++ b/drivers/gpu/drm/Kconfig
> @@ -30,6 +30,7 @@ config DRM_MIPI_DSI
>   # Separate option because drm_panel_orientation_quirks.c is shared with fbdev
>   config DRM_PANEL_ORIENTATION_QUIRKS
>   	tristate
> +	depends on DRM
>   
>   config DRM_DP_AUX_CHARDEV
>   	bool "DRM DP AUX Interface"
>
Chris Wilson Jan. 15, 2018, 3:58 p.m. UTC | #2
Quoting Hans de Goede (2018-01-15 15:56:26)
> Hi,
> 
> On 15-01-18 16:48, Chris Wilson wrote:
> > Commit 404d1a3edc38 ("drm: Add panel orientation quirks, v6.")
> > introduced a new internal Kconfig option for DRM and placed in the
> > middle of the DRM option sequence without including a depends on DRM.
> > This has the unfortunate side-effect of breaking the DRM menuconfig to
> > not include the existing DRM options.
> 
> These quirks can also be used by fbdev drivers, so the Kconfig option
> intentionally does not have a depends on DRM.
> 
> After reading how menuconfig works in Documentation/kbuild/kconfig-language.txt
> I can see how I've broken things, sorry.
> 
> But your fix is not correct, the fbdev code does a
> select DRM_PANEL_ORIENTATION_QUIRKS without depending on
> DRM so this will cause circular dependency issues.
> 
> The proper fix would be to move the entry entirely to the
> end putting it together with DRM_LIB_RANDOM which also does
> not depend on DRM.
> 
> Shall I submit a patch with the proper fix, or will you?

Go for it.
-Chris
kernel test robot Jan. 17, 2018, 2:49 a.m. UTC | #3
Hi Chris,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on drm/drm-next]
[also build test WARNING on next-20180116]
[cannot apply to v4.15-rc8]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Chris-Wilson/drm-Make-PANEL_ORIENTATION_QUIRKS-depend-on-DRM/20180117-091428
base:   git://people.freedesktop.org/~airlied/linux.git drm-next
config: x86_64-kexec (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

warning: (FB_EFI) selects DRM_PANEL_ORIENTATION_QUIRKS which has unmet direct dependencies (HAS_IOMEM && DRM)

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
diff mbox

Patch

diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
index 0bc374459440..3218d0e8fb1b 100644
--- a/drivers/gpu/drm/Kconfig
+++ b/drivers/gpu/drm/Kconfig
@@ -30,6 +30,7 @@  config DRM_MIPI_DSI
 # Separate option because drm_panel_orientation_quirks.c is shared with fbdev
 config DRM_PANEL_ORIENTATION_QUIRKS
 	tristate
+	depends on DRM
 
 config DRM_DP_AUX_CHARDEV
 	bool "DRM DP AUX Interface"