mipi monitor driver compile error

I have a mipi DSI panel monitor and I want to make it work with jetson nano board. So I used make menuconfig to configured mipi. Before I include the option <> NVIDIA Tegra DRM , it could build successfully. However, when I include the option <> NVIDIA Tegra DRM and exit with save, it couldn’t build successfully. So I disinclude it again, it couldn’t build successfully anyway.
Following is my menuconfig path :

->Device Drivers

->Graphics support

<*> NVIDIA Tegra DRM

ANY HELP!!!

[b]My build terminal is ’ make ARCH=64 O=$TEGRA_KERNEL_OUT ’
Following is build error:

In file included
from /home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/drivers/cry pto/tegra-se-nvhost.c:36:0:
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/include/linux/nvhost.h: In functi on ‘nvhost_syncpt_read_ext_check’:
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/include/linux/nvhost.h:487:2: err or: implicit declaration of function ‘host1x_syncpt_update_min’; did you mean ‘host1x_syncpt_read_min’? [-W error=implicit-function-declaration]
host1x_syncpt_update_min(syncpt);
^~~~~~~~~~~~~~~~~~~~~~~~
host1x_syncpt_read_min
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/include/linux/nvhost.h: In functi on ‘nvhost_syncpt_is_expired_ext’:
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/include/linux/nvhost.h:526:9: err or: implicit declaration of function ‘host1x_syncpt_is_expired’; did you mean ‘host1x_syncpt_base_id’? [-We rror=implicit-function-declaration]
return host1x_syncpt_is_expired(syncpt, thresh);
^~~~~~~~~~~~~~~~~~~~~~~~
host1x_syncpt_base_id
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/include/linux/nvhost.h: In functi on ‘nvhost_syncpt_set_min_eq_max_ext’:
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/include/linux/nvhost.h:535:2: err or: implicit declaration of function ‘host1x_syncpt_reset’; did you mean ‘host1x_syncpt_free’? [-Werror=imp licit-function-declaration]
host1x_syncpt_reset(syncpt);
^~~~~~~~~~~~~~~~~~~
host1x_syncpt_free
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/include/linux/nvhost.h: In functi on ‘nvhost_intr_register_notifier’:
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/include/linux/nvhost.h:553:9: err or: implicit declaration of function ‘host1x_intr_register_notifier’; did you mean ‘nvhost_intr_register_no tifier’? [-Werror=implicit-function-declaration]
return host1x_intr_register_notifier(syncpt, thresh, callback,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nvhost_intr_register_notifier
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/include/linux/nvhost.h: In functi on ‘nvhost_sync_create_fence’:
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/include/linux/nvhost.h:580:9: err or: implicit declaration of function ‘host1x_sync_create_fence’; did you mean ‘nvhost_sync_create_fence’? -Werror=implicit-function-declaration]
return host1x_sync_create_fence(host, (void *)pts, num_pts, name);
^~~~~~~~~~~~~~~~~~~~~~~~
nvhost_sync_create_fence
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/include/linux/nvhost.h:580:9: err or: return makes pointer from integer without a cast [-Werror=int-conversion]
return host1x_sync_create_fence(host, (void *)pts, num_pts, name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/include/linux/nvhost.h: In functi on ‘nvhost_sync_create_fence_fd’:
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/include/linux/nvhost.h:592:9: err or: implicit declaration of function ‘host1x_sync_create_fence_fd’; did you mean ‘nvhost_sync_create_fence_ fd’? [-Werror=implicit-function-declaration]
return host1x_sync_create_fence_fd(host, (void *)pts, num_pts,
^~~~~~~~~~~~~~~~~~~~~~~~~~~
nvhost_sync_create_fence_fd
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/include/linux/nvhost.h: In functi on ‘nvhost_sync_fdget’:
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/include/linux/nvhost.h:598:9: err or: implicit declaration of function ‘host1x_sync_fdget’; did you mean ‘host1x_syncpt_get’? [-Werror=implic it-function-declaration]
return host1x_sync_fdget(fd);
^~~~~~~~~~~~~~~~~
host1x_syncpt_get
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/include/linux/nvhost.h:598:9: err or: return makes pointer from integer without a cast [-Werror=int-conversion]
return host1x_sync_fdget(fd);
^~~~~~~~~~~~~~~~~~~~~
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/include/linux/nvhost.h: In functi on ‘nvhost_sync_num_pts’:
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/include/linux/nvhost.h:603:9: err or: implicit declaration of function ‘host1x_sync_num_fences’; did you mean ‘host1x_syncpt_free’? [-Werror= implicit-function-declaration]
return host1x_sync_num_fences(fence);
^~~~~~~~~~~~~~~~~~~~~~
host1x_syncpt_free
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/include/linux/nvhost.h: In functi on ‘nvhost_sync_pt_id’:
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/include/linux/nvhost.h:608:9: err or: implicit declaration of function ‘host1x_sync_pt_id’; did you mean ‘host1x_syncpt_id’? [-Werror=implici t-function-declaration]
return host1x_sync_pt_id(pt);
^~~~~~~~~~~~~~~~~
host1x_syncpt_id
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/include/linux/nvhost.h: In functi on ‘nvhost_sync_pt_thresh’:
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/include/linux/nvhost.h:613:9: err or: implicit declaration of function ‘host1x_sync_pt_thresh’; did you mean ‘nvhost_sync_pt_thresh’? [-Werro r=implicit-function-declaration]
return host1x_sync_pt_thresh(pt);
^~~~~~~~~~~~~~~~~~~~~
nvhost_sync_pt_thresh
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/include/linux/nvhost.h: In functi on ‘nvhost_sync_fence_set_name’:
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/include/linux/nvhost.h:618:9: err or: implicit declaration of function ‘host1x_sync_fence_set_name’; did you mean ‘nvhost_sync_fence_set_nam ’? [-Werror=implicit-function-declaration]
return host1x_sync_fence_set_name(fence_fd, name);
^~~~~~~~~~~~~~~~~~~~~~~~~~
nvhost_sync_fence_set_name
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/include/linux/nvhost.h: In functi on ‘nvhost_syncpt_create_fence_single_ext’:
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/include/linux/nvhost.h:628:9: err or: implicit declaration of function ‘host1x_sync_create_fence_single’; did you mean ‘nvhost_syncpt_create_ fence_single_ext’? [-Werror=implicit-function-declaration]
return host1x_sync_create_fence_single(host, id, thresh,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nvhost_syncpt_create_fence_single_ext
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/include/linux/nvhost.h: At top le vel:
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/include/linux/nvhost.h:664:69: er ror: parameter 6 (‘kind’) has incomplete type
enum nvdev_fence_kind kind,
^~~~
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/include/linux/nvhost.h:659:20: er ror: function declaration isn’t a prototype [-Werror=strict-prototypes]
static inline void nvhost_eventlib_log_fences(struct platform_device *pdev,
^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/drivers/crypto/tegra-se-nvhost.c In function ‘tegra_se_channel_submit_gather’:
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/drivers/crypto/tegra-se-nvhost.c: 858:9: error: implicit declaration of function ‘nvhost_channel_map’; did you mean ‘nvhost_channel_unmap’? -Werror=implicit-function-declaration]
err = nvhost_channel_map(pdata, &se_dev->channel, pdata);
^~~~~~~~~~~~~~~~~~
nvhost_channel_unmap
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/drivers/crypto/tegra-se-nvhost.c: 865:8: error: implicit declaration of function ‘nvhost_job_alloc’; did you mean ‘host1x_job_alloc’? [-Werro r=implicit-function-declaration]
job = nvhost_job_alloc(se_dev->channel, 1, 0, 0, 1);
^~~~~~~~~~~~~~~~
host1x_job_alloc
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/drivers/crypto/tegra-se-nvhost.c: 865:6: error: assignment makes pointer from integer without a cast [-Werror=int-conversion]
job = nvhost_job_alloc(se_dev->channel, 1, 0, 0, 1);
^
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/drivers/crypto/tegra-se-nvhost.c: 897:8: error: implicit declaration of function ‘nvhost_job_add_client_gather_address’; did you mean ‘nvhost _job_add_gather’? [-Werror=implicit-function-declaration]
err = nvhost_job_add_client_gather_address(job, num_words,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nvhost_job_add_gather
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/drivers/crypto/tegra-se-nvhost.c: 904:8: error: implicit declaration of function ‘nvhost_channel_submit’; did you mean ‘nvhost_channel_abort’ ? [-Werror=implicit-function-declaration]
err = nvhost_channel_submit(job);
^~~~~~~~~~~~~~~~~~~~~
nvhost_channel_abort
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/drivers/crypto/tegra-se-nvhost.c: 934:9: error: implicit declaration of function ‘nvhost_intr_register_fast_notifier’; did you mean ‘nvhost_i ntr_register_notifier’? [-Werror=implicit-function-declaration]
err = nvhost_intr_register_fast_notifier(
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nvhost_intr_register_notifier
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/drivers/crypto/tegra-se-nvhost.c: 979:2: error: implicit declaration of function ‘nvhost_job_put’; did you mean ‘nvhost_job_pin’? [-Werror=im plicit-function-declaration]
nvhost_job_put(job);
^~~~~~~~~~~~~~
nvhost_job_pin
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/drivers/crypto/tegra-se-nvhost.c: 982:2: error: implicit declaration of function ‘nvhost_module_idle’; did you mean ‘nvhost_module_do_idle’? [-Werror=implicit-function-declaration]
nvhost_module_idle(se_dev->pdev);
^~~~~~~~~~~~~~~~~~
nvhost_module_do_idle
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/drivers/crypto/tegra-se-nvhost.c In function ‘tegra_se_nvhost_prepare_poweroff’:
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/drivers/crypto/tegra-se-nvhost.c: 4078:3: error: implicit declaration of function ‘nvhost_putchannel’; did you mean ‘nvhost_getchannel’? [-We rror=implicit-function-declaration]
nvhost_putchannel(se_dev->channel, 1);
^~~~~~~~~~~~~~~~~
nvhost_getchannel
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/drivers/crypto/tegra-se-nvhost.c In function ‘tegra_se_probe’:
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/drivers/crypto/tegra-se-nvhost.c: 4246:8: error: implicit declaration of function ‘nvhost_client_device_get_resources’; did you mean ‘nvhost_ client_request_firmware’? [-Werror=implicit-function-declaration]
err = nvhost_client_device_get_resources(pdev);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nvhost_client_request_firmware
CC drivers/extcon/extcon-gpio.o
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/drivers/crypto/tegra-se-nvhost.c: 4254:8: error: implicit declaration of function ‘nvhost_module_init’; did you mean ‘nvhost_module_busy’? [- Werror=implicit-function-declaration]
err = nvhost_module_init(pdev);
^~~~~~~~~~~~~~~~~~
nvhost_module_busy
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/drivers/crypto/tegra-se-nvhost.c: 4261:8: error: implicit declaration of function ‘nvhost_client_device_init’; did you mean ‘host1x_device_in it’? [-Werror=implicit-function-declaration]
err = nvhost_client_device_init(pdev);
^~~~~~~~~~~~~~~~~~~~~~~~~
host1x_device_init
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/drivers/crypto/tegra-se-nvhost.c In function ‘tegra_se_remove’:
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/drivers/crypto/tegra-se-nvhost.c: 4552:2: error: implicit declaration of function ‘nvhost_client_device_release’; did you mean ‘nvhost_channe l_release’? [-Werror=implicit-function-declaration]
nvhost_client_device_release(pdev);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
nvhost_channel_release
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/drivers/crypto/tegra-se-nvhost.c At top level:
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/nvidia/drivers/crypto/tegra-se-nvhost.c: 4565:10: error: ‘nvhost_module_pm_ops’ undeclared here (not in a function); did you mean ‘nvhost_module_pow ered’?
.pm = &nvhost_module_pm_ops,
^~~~~~~~~~~~~~~~~~~~
nvhost_module_powered
cc1: all warnings being treated as errors
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/kernel-4.9/scripts/Makefile.build:335: r ecipe for target ‘drivers/crypto/tegra-se-nvhost.o’ failed
make[3]: *** [drivers/crypto/tegra-se-nvhost.o] Error 1
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/kernel-4.9/scripts/Makefile.build:649: r ecipe for target ‘drivers/crypto’ failed
make[2]: *** [drivers/crypto] Error 2
make[2]: *** Waiting for unfinished jobs…
CC drivers/extcon/extcon-gpio-states.o
CC drivers/extcon/extcon-usb-gpio.o
CC drivers/dma-buf/reservation.o
CC drivers/extcon/extcon-disp-state.o
LD drivers/extcon/extcon-core.o
CC drivers/dma-buf/seqno-fence.o
CC drivers/dma-buf/fence-array.o
CC drivers/dma-buf/sync_file.o
LD drivers/extcon/built-in.o
LD drivers/dma-buf/built-in.o
/home/ubuntu64/Workspace/JetsonNano/Linux_for_Tegra/sources/kernel/kernel-4.9/Makefile:1104: recipe for tar get ‘drivers’ failed
make[1]: *** [drivers] Error 2
make[1]: Leaving directory ‘/home/ubuntu64/Workspace/JetsonNano/kernel_out’
Makefile:171: recipe for target ‘sub-make’ failed
make: *** [sub-make] Error 2

I’ll be very thankful if anybody could know sth, plz tell me.

Hi,

  1. The dsi panel initialization does not need to rebuild TEGRA DRM driver. Instead, you need to enable it through device tree.

Please refer to the device tree of tx1 -> hardware/nvidia/platform/t210/jetson/kernel-dts/tegra210-jetson-cv-base-p2597-2180-a00.dts

In this file, it indicates what you need as below.

269 		dc@54200000 {
270 			status = "okay";
271 			nvidia,dc-flags = <TEGRA_DC_FLAG_ENABLED>;
272 			nvidia,emc-clk-rate = <300000000>;
273 			nvidia,fb-bpp = <32>; /* bits per pixel */
274 			nvidia,fb-flags = <TEGRA_FB_FLIP_ON_PROBE>;
275 			nvidia,dc-or-node = "/host1x/dsi";
276 			nvidia,dc-connector = <&dsi>;
277 			win-mask = <0x7>; /* Assign only wins A/B/C */
278 		};
279 
280 		/* tegradc.1 */
281 		dc@54240000 {
282 			status = "okay";
283 			nvidia,dc-flags = <TEGRA_DC_FLAG_ENABLED>;
284 			nvidia,emc-clk-rate = <300000000>;
285 			nvidia,cmu-enable = <1>;
286 			nvidia,fb-bpp = <32>; /* bits per pixel */
287 			nvidia,fb-flags = <TEGRA_FB_FLIP_ON_PROBE>;
288 			nvidia,dc-or-node = "/host1x/sor1";
289 			nvidia,dc-connector = <&sor1>;
290 			win-mask = <0x7>; /* Assign only wins A/B/C */
291 		};
292 
293 		dsi {
294 			nvidia,dsi-controller-vs = <DSI_VS_1>;
295 			status = "okay";
296 			nvidia,active-panel = <&panel_a_wuxga_8_0>;
297 			panel-a-wuxga-8-0 {
298 				status = "okay";
299 				nvidia,dsi-dpd-pads = <DSIC_DPD_EN DSID_DPD_EN>;
300 				nvidia,panel-rst-gpio = <&gpio TEGRA_GPIO(V, 2) 0>; /* PV2 */
301 				nvidia,panel-bl-pwm-gpio = <&gpio TEGRA_GPIO(V, 0) 0>; /* PV0 */
302 				disp-default-out {
303 					nvidia,out-flags = <TEGRA_DC_OUT_CONTINUOUS_MODE>;
304 				};
305 			};
306 		};
  1. Your command to build driver is not correct, please refer to L4T documentation from our download center.