diff mbox series

[v4,2/7] drm/bridge: tfp410: Set input_bus_flags in atomic_check

Message ID 20201201121830.29704-3-nikhil.nd@ti.com (mailing list archive)
State New, archived
Headers show
Series drm/tidss: Use new connector model for tidss | expand

Commit Message

Nikhil Devshatwar Dec. 1, 2020, 12:18 p.m. UTC
input_bus_flags are specified in drm_bridge_timings (legacy) as well
as drm_bridge_state->input_bus_cfg.flags

The flags from the timings will be deprecated. Bridges are supposed
to validate and set the bridge state flags from atomic_check.

Implement atomic_check hook for the same.

Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
---
 drivers/gpu/drm/bridge/ti-tfp410.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

Comments

kernel test robot Dec. 1, 2020, 2:29 p.m. UTC | #1
Hi Nikhil,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next drm-tip/drm-tip linus/master v5.10-rc6 next-20201201]
[cannot apply to drm/drm-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Nikhil-Devshatwar/drm-tidss-Use-new-connector-model-for-tidss/20201201-202125
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: mips-randconfig-r023-20201201 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ac40a2d8f16b8a8c68fc811d67f647740e965cb8)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install mips cross compiling tool for clang build
        # apt-get install binutils-mips-linux-gnu
        # https://github.com/0day-ci/linux/commit/936e9f4e0dd9ad362b11e4cb6a240cdaec2b8b28
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Nikhil-Devshatwar/drm-tidss-Use-new-connector-model-for-tidss/20201201-202125
        git checkout 936e9f4e0dd9ad362b11e4cb6a240cdaec2b8b28
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=mips 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/bridge/ti-tfp410.c:236:5: warning: no previous prototype for function 'tfp410_atomic_check' [-Wmissing-prototypes]
   int tfp410_atomic_check(struct drm_bridge *bridge,
       ^
   drivers/gpu/drm/bridge/ti-tfp410.c:236:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
   int tfp410_atomic_check(struct drm_bridge *bridge,
   ^
   static 
   drivers/gpu/drm/bridge/ti-tfp410.c:248:1: error: non-void function does not return a value [-Werror,-Wreturn-type]
   }
   ^
   1 warning and 1 error generated.

vim +/tfp410_atomic_check +236 drivers/gpu/drm/bridge/ti-tfp410.c

   235	
 > 236	int tfp410_atomic_check(struct drm_bridge *bridge,
   237			    struct drm_bridge_state *bridge_state,
   238			    struct drm_crtc_state *crtc_state,
   239			    struct drm_connector_state *conn_state)
   240	{
   241		struct tfp410 *dvi = drm_bridge_to_tfp410(bridge);
   242	
   243		/*
   244		 * There might be flags negotiation supported in future
   245		 * Set the bus flags in atomic_check statically for now
   246		 */
   247		bridge_state->input_bus_cfg.flags = dvi->timings.input_bus_flags;
   248	}
   249	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
diff mbox series

Patch

diff --git a/drivers/gpu/drm/bridge/ti-tfp410.c b/drivers/gpu/drm/bridge/ti-tfp410.c
index 3def9acba86b..4c536df003c8 100644
--- a/drivers/gpu/drm/bridge/ti-tfp410.c
+++ b/drivers/gpu/drm/bridge/ti-tfp410.c
@@ -233,6 +233,20 @@  static u32 *tfp410_get_input_bus_fmts(struct drm_bridge *bridge,
 	return input_fmts;
 }
 
+int tfp410_atomic_check(struct drm_bridge *bridge,
+		    struct drm_bridge_state *bridge_state,
+		    struct drm_crtc_state *crtc_state,
+		    struct drm_connector_state *conn_state)
+{
+	struct tfp410 *dvi = drm_bridge_to_tfp410(bridge);
+
+	/*
+	 * There might be flags negotiation supported in future
+	 * Set the bus flags in atomic_check statically for now
+	 */
+	bridge_state->input_bus_cfg.flags = dvi->timings.input_bus_flags;
+}
+
 static const struct drm_bridge_funcs tfp410_bridge_funcs = {
 	.attach		= tfp410_attach,
 	.detach		= tfp410_detach,
@@ -243,6 +257,7 @@  static const struct drm_bridge_funcs tfp410_bridge_funcs = {
 	.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
 	.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
 	.atomic_get_input_bus_fmts = tfp410_get_input_bus_fmts,
+	.atomic_check = tfp410_atomic_check,
 };
 
 static const struct drm_bridge_timings tfp410_default_timings = {