* [PATCH] drm: probe_helper: Hide ugly ifdef
@ 2016-04-19 17:40 Ezequiel Garcia
2016-04-19 17:40 ` [PATCH] drm: Make drm.debug parameter description more helpful Ezequiel Garcia
2016-04-20 9:24 ` [PATCH] drm: probe_helper: Hide ugly ifdef Jani Nikula
0 siblings, 2 replies; 10+ messages in thread
From: Ezequiel Garcia @ 2016-04-19 17:40 UTC (permalink / raw)
To: dri-devel; +Cc: Ezequiel Garcia
Push the ifdef to the drm_edid.h and create a stub, for the
DRM_LOAD_EDID_FIRMWARE=n case. This removes some clutter in
the code, making it more readable.
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
---
drivers/gpu/drm/drm_probe_helper.c | 2 --
include/drm/drm_edid.h | 8 ++++++++
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
index e714b5a7955f..0329080d7f7c 100644
--- a/drivers/gpu/drm/drm_probe_helper.c
+++ b/drivers/gpu/drm/drm_probe_helper.c
@@ -264,10 +264,8 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
count = drm_add_edid_modes(connector, edid);
drm_edid_to_eld(connector, edid);
} else {
-#ifdef CONFIG_DRM_LOAD_EDID_FIRMWARE
count = drm_load_edid_firmware(connector);
if (count == 0)
-#endif
count = (*connector_funcs->get_modes)(connector);
}
diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
index 2af97691e878..5996598bc778 100644
--- a/include/drm/drm_edid.h
+++ b/include/drm/drm_edid.h
@@ -328,7 +328,15 @@ int drm_edid_to_speaker_allocation(struct edid *edid, u8 **sadb);
int drm_av_sync_delay(struct drm_connector *connector,
const struct drm_display_mode *mode);
struct drm_connector *drm_select_eld(struct drm_encoder *encoder);
+
+#ifdef CONFIG_DRM_LOAD_EDID_FIRMWARE
int drm_load_edid_firmware(struct drm_connector *connector);
+#else
+static inline int drm_load_edid_firmware(struct drm_connector *connector)
+{
+ return 0;
+}
+#endif
int
drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame,
--
2.7.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH] drm: Make drm.debug parameter description more helpful
2016-04-19 17:40 [PATCH] drm: probe_helper: Hide ugly ifdef Ezequiel Garcia
@ 2016-04-19 17:40 ` Ezequiel Garcia
2016-04-19 21:00 ` Emil Velikov
` (2 more replies)
2016-04-20 9:24 ` [PATCH] drm: probe_helper: Hide ugly ifdef Jani Nikula
1 sibling, 3 replies; 10+ messages in thread
From: Ezequiel Garcia @ 2016-04-19 17:40 UTC (permalink / raw)
To: dri-devel; +Cc: Ezequiel Garcia
Let's be user-friendly and print an actually helpful parameter
description.
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
---
drivers/gpu/drm/drm_drv.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index 167c8d3d4a31..49b658069b51 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -37,15 +37,24 @@
#include "drm_legacy.h"
#include "drm_internal.h"
-unsigned int drm_debug = 0; /* bitmask of DRM_UT_x */
+/*
+ * drm_debug: Enable debug output.
+ * Bitmask of DRM_UT_x. See include/drm/drmP.h for details.
+ */
+unsigned int drm_debug = 0;
EXPORT_SYMBOL(drm_debug);
MODULE_AUTHOR(CORE_AUTHOR);
MODULE_DESCRIPTION(CORE_DESC);
MODULE_LICENSE("GPL and additional rights");
-MODULE_PARM_DESC(debug, "Enable debug output");
+MODULE_PARM_DESC(debug, "Enables debug output, where each bit enables a debug category.\n"
+"Bit 0 (0x1) will enable CORE messages (drm core code)\n"
+"Bit 1 (0x2) will enable DRIVER messages (drm controller code)\n"
+"Bit 2 (0x4) will enable KMS messages (modesetting code)\n"
+"Bit 3 (0x8) will enable PRMIE messages (prime code)\n");
module_param_named(debug, drm_debug, int, 0600);
+
static DEFINE_SPINLOCK(drm_minor_lock);
static struct idr drm_minors_idr;
--
2.7.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] drm: Make drm.debug parameter description more helpful
2016-04-19 17:40 ` [PATCH] drm: Make drm.debug parameter description more helpful Ezequiel Garcia
@ 2016-04-19 21:00 ` Emil Velikov
2016-04-20 9:21 ` Jani Nikula
2016-04-20 16:45 ` [PATCH v2] " Ezequiel Garcia
2 siblings, 0 replies; 10+ messages in thread
From: Emil Velikov @ 2016-04-19 21:00 UTC (permalink / raw)
To: Ezequiel Garcia; +Cc: ML dri-devel
On 19 April 2016 at 18:40, Ezequiel Garcia
<ezequiel@vanguardiasur.com.ar> wrote:
> Let's be user-friendly and print an actually helpful parameter
> description.
>
> Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
> ---
> drivers/gpu/drm/drm_drv.c | 13 +++++++++++--
> 1 file changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
> index 167c8d3d4a31..49b658069b51 100644
> --- a/drivers/gpu/drm/drm_drv.c
> +++ b/drivers/gpu/drm/drm_drv.c
> @@ -37,15 +37,24 @@
> #include "drm_legacy.h"
> #include "drm_internal.h"
>
> -unsigned int drm_debug = 0; /* bitmask of DRM_UT_x */
> +/*
> + * drm_debug: Enable debug output.
> + * Bitmask of DRM_UT_x. See include/drm/drmP.h for details.
> + */
> +unsigned int drm_debug = 0;
> EXPORT_SYMBOL(drm_debug);
>
> MODULE_AUTHOR(CORE_AUTHOR);
> MODULE_DESCRIPTION(CORE_DESC);
> MODULE_LICENSE("GPL and additional rights");
> -MODULE_PARM_DESC(debug, "Enable debug output");
> +MODULE_PARM_DESC(debug, "Enables debug output, where each bit enables a debug category.\n"
> +"Bit 0 (0x1) will enable CORE messages (drm core code)\n"
> +"Bit 1 (0x2) will enable DRIVER messages (drm controller code)\n"
> +"Bit 2 (0x4) will enable KMS messages (modesetting code)\n"
> +"Bit 3 (0x8) will enable PRMIE messages (prime code)\n");
typo "PRIME"
If you're doing to document things please mention all the options -
you've missed the following two.
#define DRM_UT_ATOMIC 0x10
#define DRM_UT_VBL 0x20
Thanks
Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] drm: Make drm.debug parameter description more helpful
2016-04-19 17:40 ` [PATCH] drm: Make drm.debug parameter description more helpful Ezequiel Garcia
2016-04-19 21:00 ` Emil Velikov
@ 2016-04-20 9:21 ` Jani Nikula
2016-04-20 15:48 ` Ezequiel Garcia
2016-04-20 16:45 ` [PATCH v2] " Ezequiel Garcia
2 siblings, 1 reply; 10+ messages in thread
From: Jani Nikula @ 2016-04-20 9:21 UTC (permalink / raw)
To: dri-devel; +Cc: Ezequiel Garcia
On Tue, 19 Apr 2016, Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> wrote:
> Let's be user-friendly and print an actually helpful parameter
> description.
>
> Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
> ---
> drivers/gpu/drm/drm_drv.c | 13 +++++++++++--
> 1 file changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
> index 167c8d3d4a31..49b658069b51 100644
> --- a/drivers/gpu/drm/drm_drv.c
> +++ b/drivers/gpu/drm/drm_drv.c
> @@ -37,15 +37,24 @@
> #include "drm_legacy.h"
> #include "drm_internal.h"
>
> -unsigned int drm_debug = 0; /* bitmask of DRM_UT_x */
> +/*
> + * drm_debug: Enable debug output.
> + * Bitmask of DRM_UT_x. See include/drm/drmP.h for details.
> + */
> +unsigned int drm_debug = 0;
> EXPORT_SYMBOL(drm_debug);
>
> MODULE_AUTHOR(CORE_AUTHOR);
> MODULE_DESCRIPTION(CORE_DESC);
> MODULE_LICENSE("GPL and additional rights");
> -MODULE_PARM_DESC(debug, "Enable debug output");
> +MODULE_PARM_DESC(debug, "Enables debug output, where each bit enables a debug category.\n"
Please keep it as "Enable".
> +"Bit 0 (0x1) will enable CORE messages (drm core code)\n"
> +"Bit 1 (0x2) will enable DRIVER messages (drm controller code)\n"
> +"Bit 2 (0x4) will enable KMS messages (modesetting code)\n"
> +"Bit 3 (0x8) will enable PRMIE messages (prime code)\n");
Maybe prefix the continuation lines with a space or a tab? The last line
probably shouldn't contain \n. See what modinfo(8) displays and make it
pretty.
> module_param_named(debug, drm_debug, int, 0600);
>
> +
Spurious whitepace.
> static DEFINE_SPINLOCK(drm_minor_lock);
> static struct idr drm_minors_idr;
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] drm: probe_helper: Hide ugly ifdef
2016-04-19 17:40 [PATCH] drm: probe_helper: Hide ugly ifdef Ezequiel Garcia
2016-04-19 17:40 ` [PATCH] drm: Make drm.debug parameter description more helpful Ezequiel Garcia
@ 2016-04-20 9:24 ` Jani Nikula
2016-04-20 11:35 ` Daniel Vetter
1 sibling, 1 reply; 10+ messages in thread
From: Jani Nikula @ 2016-04-20 9:24 UTC (permalink / raw)
To: dri-devel; +Cc: Ezequiel Garcia
On Tue, 19 Apr 2016, Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> wrote:
> Push the ifdef to the drm_edid.h and create a stub, for the
> DRM_LOAD_EDID_FIRMWARE=n case. This removes some clutter in
> the code, making it more readable.
>
> Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/drm_probe_helper.c | 2 --
> include/drm/drm_edid.h | 8 ++++++++
> 2 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
> index e714b5a7955f..0329080d7f7c 100644
> --- a/drivers/gpu/drm/drm_probe_helper.c
> +++ b/drivers/gpu/drm/drm_probe_helper.c
> @@ -264,10 +264,8 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
> count = drm_add_edid_modes(connector, edid);
> drm_edid_to_eld(connector, edid);
> } else {
> -#ifdef CONFIG_DRM_LOAD_EDID_FIRMWARE
> count = drm_load_edid_firmware(connector);
> if (count == 0)
> -#endif
> count = (*connector_funcs->get_modes)(connector);
> }
>
> diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
> index 2af97691e878..5996598bc778 100644
> --- a/include/drm/drm_edid.h
> +++ b/include/drm/drm_edid.h
> @@ -328,7 +328,15 @@ int drm_edid_to_speaker_allocation(struct edid *edid, u8 **sadb);
> int drm_av_sync_delay(struct drm_connector *connector,
> const struct drm_display_mode *mode);
> struct drm_connector *drm_select_eld(struct drm_encoder *encoder);
> +
> +#ifdef CONFIG_DRM_LOAD_EDID_FIRMWARE
> int drm_load_edid_firmware(struct drm_connector *connector);
> +#else
> +static inline int drm_load_edid_firmware(struct drm_connector *connector)
> +{
> + return 0;
> +}
> +#endif
>
> int
> drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame,
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] drm: probe_helper: Hide ugly ifdef
2016-04-20 9:24 ` [PATCH] drm: probe_helper: Hide ugly ifdef Jani Nikula
@ 2016-04-20 11:35 ` Daniel Vetter
0 siblings, 0 replies; 10+ messages in thread
From: Daniel Vetter @ 2016-04-20 11:35 UTC (permalink / raw)
To: Jani Nikula; +Cc: Ezequiel Garcia, dri-devel
On Wed, Apr 20, 2016 at 12:24:16PM +0300, Jani Nikula wrote:
> On Tue, 19 Apr 2016, Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> wrote:
> > Push the ifdef to the drm_edid.h and create a stub, for the
> > DRM_LOAD_EDID_FIRMWARE=n case. This removes some clutter in
> > the code, making it more readable.
> >
> > Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
>
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Applied to drm-misc, thanks.
-Daniel
>
>
> > ---
> > drivers/gpu/drm/drm_probe_helper.c | 2 --
> > include/drm/drm_edid.h | 8 ++++++++
> > 2 files changed, 8 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
> > index e714b5a7955f..0329080d7f7c 100644
> > --- a/drivers/gpu/drm/drm_probe_helper.c
> > +++ b/drivers/gpu/drm/drm_probe_helper.c
> > @@ -264,10 +264,8 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
> > count = drm_add_edid_modes(connector, edid);
> > drm_edid_to_eld(connector, edid);
> > } else {
> > -#ifdef CONFIG_DRM_LOAD_EDID_FIRMWARE
> > count = drm_load_edid_firmware(connector);
> > if (count == 0)
> > -#endif
> > count = (*connector_funcs->get_modes)(connector);
> > }
> >
> > diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
> > index 2af97691e878..5996598bc778 100644
> > --- a/include/drm/drm_edid.h
> > +++ b/include/drm/drm_edid.h
> > @@ -328,7 +328,15 @@ int drm_edid_to_speaker_allocation(struct edid *edid, u8 **sadb);
> > int drm_av_sync_delay(struct drm_connector *connector,
> > const struct drm_display_mode *mode);
> > struct drm_connector *drm_select_eld(struct drm_encoder *encoder);
> > +
> > +#ifdef CONFIG_DRM_LOAD_EDID_FIRMWARE
> > int drm_load_edid_firmware(struct drm_connector *connector);
> > +#else
> > +static inline int drm_load_edid_firmware(struct drm_connector *connector)
> > +{
> > + return 0;
> > +}
> > +#endif
> >
> > int
> > drm_hdmi_avi_infoframe_from_display_mode(struct hdmi_avi_infoframe *frame,
>
> --
> Jani Nikula, Intel Open Source Technology Center
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] drm: Make drm.debug parameter description more helpful
2016-04-20 9:21 ` Jani Nikula
@ 2016-04-20 15:48 ` Ezequiel Garcia
0 siblings, 0 replies; 10+ messages in thread
From: Ezequiel Garcia @ 2016-04-20 15:48 UTC (permalink / raw)
To: Jani Nikula; +Cc: Emil Velikov, dri-devel
(Adding Dave again)
On 20 April 2016 at 06:21, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> On Tue, 19 Apr 2016, Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> wrote:
>> Let's be user-friendly and print an actually helpful parameter
>> description.
>>
>> Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
>> ---
>> drivers/gpu/drm/drm_drv.c | 13 +++++++++++--
>> 1 file changed, 11 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
>> index 167c8d3d4a31..49b658069b51 100644
>> --- a/drivers/gpu/drm/drm_drv.c
>> +++ b/drivers/gpu/drm/drm_drv.c
>> @@ -37,15 +37,24 @@
>> #include "drm_legacy.h"
>> #include "drm_internal.h"
>>
>> -unsigned int drm_debug = 0; /* bitmask of DRM_UT_x */
>> +/*
>> + * drm_debug: Enable debug output.
>> + * Bitmask of DRM_UT_x. See include/drm/drmP.h for details.
>> + */
>> +unsigned int drm_debug = 0;
>> EXPORT_SYMBOL(drm_debug);
>>
>> MODULE_AUTHOR(CORE_AUTHOR);
>> MODULE_DESCRIPTION(CORE_DESC);
>> MODULE_LICENSE("GPL and additional rights");
>> -MODULE_PARM_DESC(debug, "Enable debug output");
>> +MODULE_PARM_DESC(debug, "Enables debug output, where each bit enables a debug category.\n"
>
> Please keep it as "Enable".
>
>> +"Bit 0 (0x1) will enable CORE messages (drm core code)\n"
>> +"Bit 1 (0x2) will enable DRIVER messages (drm controller code)\n"
>> +"Bit 2 (0x4) will enable KMS messages (modesetting code)\n"
>> +"Bit 3 (0x8) will enable PRMIE messages (prime code)\n");
>
> Maybe prefix the continuation lines with a space or a tab? The last line
> probably shouldn't contain \n. See what modinfo(8) displays and make it
> pretty.
>
>> module_param_named(debug, drm_debug, int, 0600);
>>
>> +
>
> Spurious whitepace.
>
Thanks for the feedback. I'll post a v2.
--
Ezequiel García, VanguardiaSur
www.vanguardiasur.com.ar
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2] drm: Make drm.debug parameter description more helpful
2016-04-19 17:40 ` [PATCH] drm: Make drm.debug parameter description more helpful Ezequiel Garcia
2016-04-19 21:00 ` Emil Velikov
2016-04-20 9:21 ` Jani Nikula
@ 2016-04-20 16:45 ` Ezequiel Garcia
2016-04-21 7:32 ` Jani Nikula
2 siblings, 1 reply; 10+ messages in thread
From: Ezequiel Garcia @ 2016-04-20 16:45 UTC (permalink / raw)
To: dri-devel; +Cc: Ezequiel Garcia
Let's be user-friendly and print an actually helpful parameter
description.
This makes modinfo output the debug parameter like this:
parm: debug:Enable debug output, where each bit enables a debug category.
Bit 0 (0x01) will enable CORE messages (drm core code)
Bit 1 (0x02) will enable DRIVER messages (drm controller code)
Bit 2 (0x04) will enable KMS messages (modesetting code)
Bit 3 (0x08) will enable PRIME messages (prime code)
Bit 4 (0x10) will enable ATOMIC messages (atomic code)
Bit 5 (0x20) will enable VBL messages (vblank code) (int)
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
--
Changes from v1:
* Fixed s/PRMIE/PRIME typo.
* Add ATOMIC and VBL debug parameter documentation.
* Prefix the continuation lines with two tabs and
removed the last new line.
* Remove spurious whitespace.
drivers/gpu/drm/drm_drv.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index 167c8d3d4a31..c4f45ac04ea4 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -37,13 +37,23 @@
#include "drm_legacy.h"
#include "drm_internal.h"
-unsigned int drm_debug = 0; /* bitmask of DRM_UT_x */
+/*
+ * drm_debug: Enable debug output.
+ * Bitmask of DRM_UT_x. See include/drm/drmP.h for details.
+ */
+unsigned int drm_debug = 0;
EXPORT_SYMBOL(drm_debug);
MODULE_AUTHOR(CORE_AUTHOR);
MODULE_DESCRIPTION(CORE_DESC);
MODULE_LICENSE("GPL and additional rights");
-MODULE_PARM_DESC(debug, "Enable debug output");
+MODULE_PARM_DESC(debug, "Enable debug output, where each bit enables a debug category.\n"
+"\t\tBit 0 (0x01) will enable CORE messages (drm core code)\n"
+"\t\tBit 1 (0x02) will enable DRIVER messages (drm controller code)\n"
+"\t\tBit 2 (0x04) will enable KMS messages (modesetting code)\n"
+"\t\tBit 3 (0x08) will enable PRIME messages (prime code)\n"
+"\t\tBit 4 (0x10) will enable ATOMIC messages (atomic code)\n"
+"\t\tBit 5 (0x20) will enable VBL messages (vblank code)");
module_param_named(debug, drm_debug, int, 0600);
static DEFINE_SPINLOCK(drm_minor_lock);
--
2.7.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v2] drm: Make drm.debug parameter description more helpful
2016-04-20 16:45 ` [PATCH v2] " Ezequiel Garcia
@ 2016-04-21 7:32 ` Jani Nikula
2016-04-21 7:50 ` Daniel Vetter
0 siblings, 1 reply; 10+ messages in thread
From: Jani Nikula @ 2016-04-21 7:32 UTC (permalink / raw)
To: dri-devel; +Cc: Ezequiel Garcia
On Wed, 20 Apr 2016, Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> wrote:
> Let's be user-friendly and print an actually helpful parameter
> description.
>
> This makes modinfo output the debug parameter like this:
>
> parm: debug:Enable debug output, where each bit enables a debug category.
> Bit 0 (0x01) will enable CORE messages (drm core code)
> Bit 1 (0x02) will enable DRIVER messages (drm controller code)
> Bit 2 (0x04) will enable KMS messages (modesetting code)
> Bit 3 (0x08) will enable PRIME messages (prime code)
> Bit 4 (0x10) will enable ATOMIC messages (atomic code)
> Bit 5 (0x20) will enable VBL messages (vblank code) (int)
>
> Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> --
> Changes from v1:
>
> * Fixed s/PRMIE/PRIME typo.
> * Add ATOMIC and VBL debug parameter documentation.
> * Prefix the continuation lines with two tabs and
> removed the last new line.
> * Remove spurious whitespace.
>
> drivers/gpu/drm/drm_drv.c | 14 ++++++++++++--
> 1 file changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
> index 167c8d3d4a31..c4f45ac04ea4 100644
> --- a/drivers/gpu/drm/drm_drv.c
> +++ b/drivers/gpu/drm/drm_drv.c
> @@ -37,13 +37,23 @@
> #include "drm_legacy.h"
> #include "drm_internal.h"
>
> -unsigned int drm_debug = 0; /* bitmask of DRM_UT_x */
> +/*
> + * drm_debug: Enable debug output.
> + * Bitmask of DRM_UT_x. See include/drm/drmP.h for details.
> + */
> +unsigned int drm_debug = 0;
> EXPORT_SYMBOL(drm_debug);
>
> MODULE_AUTHOR(CORE_AUTHOR);
> MODULE_DESCRIPTION(CORE_DESC);
> MODULE_LICENSE("GPL and additional rights");
> -MODULE_PARM_DESC(debug, "Enable debug output");
> +MODULE_PARM_DESC(debug, "Enable debug output, where each bit enables a debug category.\n"
> +"\t\tBit 0 (0x01) will enable CORE messages (drm core code)\n"
> +"\t\tBit 1 (0x02) will enable DRIVER messages (drm controller code)\n"
> +"\t\tBit 2 (0x04) will enable KMS messages (modesetting code)\n"
> +"\t\tBit 3 (0x08) will enable PRIME messages (prime code)\n"
> +"\t\tBit 4 (0x10) will enable ATOMIC messages (atomic code)\n"
> +"\t\tBit 5 (0x20) will enable VBL messages (vblank code)");
> module_param_named(debug, drm_debug, int, 0600);
>
> static DEFINE_SPINLOCK(drm_minor_lock);
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2] drm: Make drm.debug parameter description more helpful
2016-04-21 7:32 ` Jani Nikula
@ 2016-04-21 7:50 ` Daniel Vetter
0 siblings, 0 replies; 10+ messages in thread
From: Daniel Vetter @ 2016-04-21 7:50 UTC (permalink / raw)
To: Jani Nikula; +Cc: Ezequiel Garcia, dri-devel
On Thu, Apr 21, 2016 at 10:32:11AM +0300, Jani Nikula wrote:
> On Wed, 20 Apr 2016, Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> wrote:
> > Let's be user-friendly and print an actually helpful parameter
> > description.
> >
> > This makes modinfo output the debug parameter like this:
> >
> > parm: debug:Enable debug output, where each bit enables a debug category.
> > Bit 0 (0x01) will enable CORE messages (drm core code)
> > Bit 1 (0x02) will enable DRIVER messages (drm controller code)
> > Bit 2 (0x04) will enable KMS messages (modesetting code)
> > Bit 3 (0x08) will enable PRIME messages (prime code)
> > Bit 4 (0x10) will enable ATOMIC messages (atomic code)
> > Bit 5 (0x20) will enable VBL messages (vblank code) (int)
> >
> > Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
>
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Applied to drm-misc, thanks.
-Daniel
>
>
>
> > --
> > Changes from v1:
> >
> > * Fixed s/PRMIE/PRIME typo.
> > * Add ATOMIC and VBL debug parameter documentation.
> > * Prefix the continuation lines with two tabs and
> > removed the last new line.
> > * Remove spurious whitespace.
> >
> > drivers/gpu/drm/drm_drv.c | 14 ++++++++++++--
> > 1 file changed, 12 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
> > index 167c8d3d4a31..c4f45ac04ea4 100644
> > --- a/drivers/gpu/drm/drm_drv.c
> > +++ b/drivers/gpu/drm/drm_drv.c
> > @@ -37,13 +37,23 @@
> > #include "drm_legacy.h"
> > #include "drm_internal.h"
> >
> > -unsigned int drm_debug = 0; /* bitmask of DRM_UT_x */
> > +/*
> > + * drm_debug: Enable debug output.
> > + * Bitmask of DRM_UT_x. See include/drm/drmP.h for details.
> > + */
> > +unsigned int drm_debug = 0;
> > EXPORT_SYMBOL(drm_debug);
> >
> > MODULE_AUTHOR(CORE_AUTHOR);
> > MODULE_DESCRIPTION(CORE_DESC);
> > MODULE_LICENSE("GPL and additional rights");
> > -MODULE_PARM_DESC(debug, "Enable debug output");
> > +MODULE_PARM_DESC(debug, "Enable debug output, where each bit enables a debug category.\n"
> > +"\t\tBit 0 (0x01) will enable CORE messages (drm core code)\n"
> > +"\t\tBit 1 (0x02) will enable DRIVER messages (drm controller code)\n"
> > +"\t\tBit 2 (0x04) will enable KMS messages (modesetting code)\n"
> > +"\t\tBit 3 (0x08) will enable PRIME messages (prime code)\n"
> > +"\t\tBit 4 (0x10) will enable ATOMIC messages (atomic code)\n"
> > +"\t\tBit 5 (0x20) will enable VBL messages (vblank code)");
> > module_param_named(debug, drm_debug, int, 0600);
> >
> > static DEFINE_SPINLOCK(drm_minor_lock);
>
> --
> Jani Nikula, Intel Open Source Technology Center
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2016-04-21 7:50 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-19 17:40 [PATCH] drm: probe_helper: Hide ugly ifdef Ezequiel Garcia
2016-04-19 17:40 ` [PATCH] drm: Make drm.debug parameter description more helpful Ezequiel Garcia
2016-04-19 21:00 ` Emil Velikov
2016-04-20 9:21 ` Jani Nikula
2016-04-20 15:48 ` Ezequiel Garcia
2016-04-20 16:45 ` [PATCH v2] " Ezequiel Garcia
2016-04-21 7:32 ` Jani Nikula
2016-04-21 7:50 ` Daniel Vetter
2016-04-20 9:24 ` [PATCH] drm: probe_helper: Hide ugly ifdef Jani Nikula
2016-04-20 11:35 ` Daniel Vetter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.