AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	"Boris Brezillon"
	<boris.brezillon-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org>,
	"David Airlie" <airlied-cv59FeDIM0c@public.gmane.org>,
	nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	"Eric Anholt" <eric-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org>,
	kbuild-all-JC7UmRfGjtg@public.gmane.org,
	"Alex Deucher" <alexander.deucher-5C7GfCeVMHo@public.gmane.org>,
	"Christian König" <christian.koenig-5C7GfCeVMHo@public.gmane.org>,
	"Ben Skeggs" <bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH 1/3] drm/connector: Add generic underscan properties
Date: Tue, 8 May 2018 04:49:03 +0800	[thread overview]
Message-ID: <201805080325.75UcHSKn%fengguang.wu@intel.com> (raw)
In-Reply-To: <20180507144434.20466-2-boris.brezillon-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 5526 bytes --]

Hi Boris,

I love your patch! Yet something to improve:

[auto build test ERROR on anholt/for-next]
[also build test ERROR on v4.17-rc4 next-20180507]
[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/Boris-Brezillon/drm-connector-Provide-generic-support-for-underscan/20180508-022336
base:   https://github.com/anholt/linux for-next
config: x86_64-randconfig-x010-201818 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All error/warnings (new ones prefixed by >>):

   drivers/gpu//drm/drm_connector.c: In function 'drm_connector_attach_underscan_properties':
>> drivers/gpu//drm/drm_connector.c:1188:50: warning: passing argument 3 of 'drm_property_add_enum' makes integer from pointer without a cast [-Wint-conversion]
      ret = drm_property_add_enum(prop, entry->type, entry->name);
                                                     ^~~~~
   In file included from include/drm/drm_crtc.h:42:0,
                    from include/drm/drmP.h:69,
                    from drivers/gpu//drm/drm_connector.c:23:
   include/drm/drm_property.h:263:5: note: expected 'uint64_t {aka long long unsigned int}' but argument is of type 'const char * const'
    int drm_property_add_enum(struct drm_property *property, int index,
        ^~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu//drm/drm_connector.c:1188:9: error: too few arguments to function 'drm_property_add_enum'
      ret = drm_property_add_enum(prop, entry->type, entry->name);
            ^~~~~~~~~~~~~~~~~~~~~
   In file included from include/drm/drm_crtc.h:42:0,
                    from include/drm/drmP.h:69,
                    from drivers/gpu//drm/drm_connector.c:23:
   include/drm/drm_property.h:263:5: note: declared here
    int drm_property_add_enum(struct drm_property *property, int index,
        ^~~~~~~~~~~~~~~~~~~~~

vim +/drm_property_add_enum +1188 drivers/gpu//drm/drm_connector.c

  1141	
  1142	/**
  1143	 * drm_connector_attach_underscan_properties - attach atomic underscan
  1144	 *					       properties
  1145	 * @connector: connector to attach underscan mode properties on.
  1146	 * @mode_mask: bitmask of %DRM_UNDERSCAN_XX modes encoding the supported
  1147	 *	       underscan modes.
  1148	 * @max_hborder: maximum size of the horizontal border expressed in pixels.
  1149	 *		 Should be > 0.
  1150	 * @max_vborder: maximum size of the vertical border expressed in pixels.
  1151	 *		 Should be > 0.
  1152	 *
  1153	 * This is used to add support for underscan to atomic drivers.
  1154	 * The underscan config will be set to &drm_connector_state.underscan
  1155	 * and can be used from &drm_connector_helper_funcs->atomic_check for
  1156	 * validation.
  1157	 *
  1158	 * Returns:
  1159	 * Zero on success, negative errno on failure.
  1160	 */
  1161	int drm_connector_attach_underscan_properties(struct drm_connector *connector,
  1162						      u32 mode_mask, u64 max_hborder,
  1163						      u64 max_vborder)
  1164	{
  1165		unsigned int i, nmodes = ARRAY_SIZE(drm_underscan_mode_enum_list);
  1166		struct drm_device *dev = connector->dev;
  1167		struct drm_property *prop;
  1168	
  1169		if (!max_hborder || !max_vborder)
  1170			return -EINVAL;
  1171	
  1172		if (!hweight32(mode_mask) || (mode_mask & ~GENMASK(nmodes - 1, 0)))
  1173			return -EINVAL;
  1174	
  1175		prop = drm_property_create(dev, DRM_MODE_PROP_ENUM, "underscan",
  1176					   hweight32(mode_mask));
  1177		if (!prop)
  1178			return -ENOMEM;
  1179	
  1180		for (i = 0; i < ARRAY_SIZE(drm_underscan_mode_enum_list); i++) {
  1181			const struct drm_prop_enum_list *entry;
  1182			int ret;
  1183	
  1184			if (!(BIT(i) & mode_mask))
  1185				continue;
  1186	
  1187			entry = &drm_underscan_mode_enum_list[i];
> 1188			ret = drm_property_add_enum(prop, entry->type, entry->name);
  1189			if (ret)
  1190				goto err_free_mode_prop;
  1191		}
  1192	
  1193		connector->underscan_mode_property = prop;
  1194	
  1195		prop = drm_property_create_range(dev, 0, "underscan hborder", 0,
  1196						 max_hborder);
  1197		if (!prop)
  1198			goto err_free_mode_prop;
  1199	
  1200		connector->underscan_hborder_property = prop;
  1201	
  1202		prop = drm_property_create_range(dev, 0, "underscan vborder", 0,
  1203						 max_vborder);
  1204		if (!prop)
  1205			goto err_free_hborder_prop;
  1206	
  1207		connector->underscan_vborder_property = prop;
  1208	
  1209		drm_object_attach_property(&connector->base,
  1210					   connector->underscan_mode_property,
  1211					   DRM_UNDERSCAN_OFF);
  1212		drm_object_attach_property(&connector->base,
  1213					   connector->underscan_hborder_property, 0);
  1214		drm_object_attach_property(&connector->base,
  1215					   connector->underscan_vborder_property, 0);
  1216	
  1217		return 0;
  1218	
  1219	err_free_hborder_prop:
  1220		drm_property_destroy(dev, connector->underscan_hborder_property);
  1221		connector->underscan_hborder_property = NULL;
  1222	
  1223	err_free_mode_prop:
  1224		drm_property_destroy(dev, connector->underscan_mode_property);
  1225		connector->underscan_mode_property = NULL;
  1226	
  1227		return -ENOMEM;
  1228	}
  1229	EXPORT_SYMBOL(drm_connector_attach_underscan_properties);
  1230	

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29494 bytes --]

[-- Attachment #3: Type: text/plain, Size: 154 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

  parent reply	other threads:[~2018-05-07 20:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-07 14:44 [PATCH 0/3] drm/connector: Provide generic support for underscan Boris Brezillon
     [not found] ` <20180507144434.20466-1-boris.brezillon-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org>
2018-05-07 14:44   ` [PATCH 1/3] drm/connector: Add generic underscan properties Boris Brezillon
     [not found]     ` <20180507144434.20466-2-boris.brezillon-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org>
2018-05-07 15:01       ` Ville Syrjälä
     [not found]         ` <20180507150144.GE23723-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2018-05-07 16:19           ` Boris Brezillon
2018-05-07 18:26             ` Harry Wentland
     [not found]               ` <bae27de8-aa4d-fc3a-1667-a139e1a9220f-5C7GfCeVMHo@public.gmane.org>
2018-05-08  0:18                 ` Ben Skeggs
     [not found]                   ` <CACAvsv7R=kYvG3_2doHhuC9WcVjRnAFBNYb9XpBho8cUq6hUCQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-05-11 13:46                     ` Boris Brezillon
2018-05-07 20:49       ` kbuild test robot [this message]
2018-05-07 15:15     ` Daniel Vetter
     [not found]       ` <20180507151533.GD28661-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2018-05-07 15:25         ` Daniel Vetter
     [not found]           ` <20180507152530.GF28661-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2018-05-11 13:48             ` Boris Brezillon
2018-05-07 14:44   ` [PATCH 2/3] drm/vc4: Take underscan setup into account when updating planes Boris Brezillon
2018-05-07 14:44   ` [PATCH 3/3] drm/vc4: Attach underscan props to the HDMI connector Boris Brezillon
2018-05-07 15:24     ` Daniel Vetter
     [not found]       ` <20180507152408.GE28661-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2018-05-09 14:52         ` Boris Brezillon
2018-05-14 16:43           ` Daniel Vetter
2018-05-09  7:28 ` [PATCH 0/3] drm/connector: Provide generic support for underscan Boris Brezillon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201805080325.75UcHSKn%fengguang.wu@intel.com \
    --to=lkp-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=airlied-cv59FeDIM0c@public.gmane.org \
    --cc=alexander.deucher-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=boris.brezillon-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org \
    --cc=bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=christian.koenig-5C7GfCeVMHo@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=eric-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org \
    --cc=kbuild-all-JC7UmRfGjtg@public.gmane.org \
    --cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox