tree: git://anongit.freedesktop.org/drm/drm-tip drm-tip head: d4794b009ccd1ef8816e15c833f07ab696911a8d commit: bd6ee5d2d2032416ba36ec6c24bf513f4ff0d338 [2/8] Merge remote-tracking branch 'drm-misc/drm-misc-next' into drm-tip config: x86_64-randconfig-s5-02041749 (attached as .config) compiler: gcc-8 (Debian 8.2.0-14) 8.2.0 reproduce: git checkout bd6ee5d2d2032416ba36ec6c24bf513f4ff0d338 # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): drivers/gpu/drm//arm/display/komeda/komeda_dev.c: In function 'komeda_parse_pipe_dt': >> drivers/gpu/drm//arm/display/komeda/komeda_dev.c:27:3: error: implicit declaration of function 'DRM_ERROR'; did you mean 'DRM_IOR'? [-Werror=implicit-function-declaration] DRM_ERROR("get aclk for pipeline %d failed!\n", pipe_id); ^~~~~~~~~ DRM_IOR drivers/gpu/drm//arm/display/komeda/komeda_dev.c: In function 'komeda_dev_create': >> drivers/gpu/drm//arm/display/komeda/komeda_dev.c:127:2: error: implicit declaration of function 'DRM_INFO'; did you mean 'DRM_IO'? [-Werror=implicit-function-declaration] DRM_INFO("Found ARM Mali-D%x version r%dp%d\n", ^~~~~~~~ DRM_IO drivers/gpu/drm//arm/display/komeda/komeda_dev.c: In function 'komeda_dev_destroy': drivers/gpu/drm//arm/display/komeda/komeda_dev.c:170:3: error: implicit declaration of function 'devm_iounmap'; did you mean 'pci_iounmap'? [-Werror=implicit-function-declaration] devm_iounmap(dev, mdev->reg_base); ^~~~~~~~~~~~ pci_iounmap Cyclomatic Complexity 1 include/linux/err.h:ERR_PTR Cyclomatic Complexity 1 include/linux/err.h:PTR_ERR Cyclomatic Complexity 1 include/linux/err.h:IS_ERR Cyclomatic Complexity 1 include/linux/device.h:devm_kzalloc Cyclomatic Complexity 2 include/linux/of.h:of_property_read_u32_array Cyclomatic Complexity 1 include/linux/of.h:of_property_read_u32 Cyclomatic Complexity 3 include/linux/clk.h:clk_prepare_enable Cyclomatic Complexity 1 include/linux/clk.h:clk_disable_unprepare Cyclomatic Complexity 1 drivers/gpu/drm//arm/display/komeda/komeda_dev.h:komeda_product_match Cyclomatic Complexity 5 drivers/gpu/drm//arm/display/komeda/komeda_dev.c:komeda_parse_pipe_dt Cyclomatic Complexity 5 drivers/gpu/drm//arm/display/komeda/komeda_dev.c:komeda_parse_dt Cyclomatic Complexity 7 drivers/gpu/drm//arm/display/komeda/komeda_dev.c:komeda_dev_destroy Cyclomatic Complexity 9 drivers/gpu/drm//arm/display/komeda/komeda_dev.c:komeda_dev_create cc1: some warnings being treated as errors -- drivers/gpu/drm//arm/display/komeda/komeda_pipeline.c: In function 'komeda_pipeline_add': >> drivers/gpu/drm//arm/display/komeda/komeda_pipeline.c:18:3: error: implicit declaration of function 'DRM_ERROR'; did you mean 'DRM_IOR'? [-Werror=implicit-function-declaration] DRM_ERROR("Exceed max support %d pipelines.\n", ^~~~~~~~~ DRM_IOR Cyclomatic Complexity 1 include/linux/device.h:devm_kzalloc Cyclomatic Complexity 4 drivers/gpu/drm//arm/display/komeda/komeda_pipeline.c:komeda_pipeline_add Cyclomatic Complexity 9 drivers/gpu/drm//arm/display/komeda/komeda_pipeline.c:komeda_pipeline_get_component_pos Cyclomatic Complexity 2 drivers/gpu/drm//arm/display/komeda/komeda_pipeline.c:komeda_pipeline_get_component Cyclomatic Complexity 12 drivers/gpu/drm//arm/display/komeda/komeda_pipeline.c:komeda_component_add Cyclomatic Complexity 1 drivers/gpu/drm//arm/display/komeda/komeda_pipeline.c:komeda_component_destroy Cyclomatic Complexity 2 drivers/gpu/drm//arm/display/komeda/komeda_pipeline.c:komeda_pipeline_destroy cc1: some warnings being treated as errors -- drivers/gpu/drm//arm/display/komeda/komeda_kms.c:32:15: error: variable 'komeda_kms_driver' has initializer but incomplete type static struct drm_driver komeda_kms_driver = { ^~~~~~~~~~ drivers/gpu/drm//arm/display/komeda/komeda_kms.c:33:3: error: 'struct drm_driver' has no member named 'driver_features' .driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC | ^~~~~~~~~~~~~~~ drivers/gpu/drm//arm/display/komeda/komeda_kms.c:33:21: error: 'DRIVER_GEM' undeclared here (not in a function) .driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC | ^~~~~~~~~~ drivers/gpu/drm//arm/display/komeda/komeda_kms.c:33:34: error: 'DRIVER_MODESET' undeclared here (not in a function); did you mean 'HRTIMER_MODE_SOFT'? .driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC | ^~~~~~~~~~~~~~ HRTIMER_MODE_SOFT >> drivers/gpu/drm//arm/display/komeda/komeda_kms.c:33:51: error: 'DRIVER_ATOMIC' undeclared here (not in a function); did you mean 'DRM_UT_ATOMIC'? .driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC | ^~~~~~~~~~~~~ DRM_UT_ATOMIC >> drivers/gpu/drm//arm/display/komeda/komeda_kms.c:34:7: error: 'DRIVER_PRIME' undeclared here (not in a function); did you mean 'DRM_UT_PRIME'? DRIVER_PRIME, ^~~~~~~~~~~~ DRM_UT_PRIME drivers/gpu/drm//arm/display/komeda/komeda_kms.c:33:21: warning: excess elements in struct initializer .driver_features = DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC | ^~~~~~~~~~ drivers/gpu/drm//arm/display/komeda/komeda_kms.c:33:21: note: (near initialization for 'komeda_kms_driver') drivers/gpu/drm//arm/display/komeda/komeda_kms.c:35:3: error: 'struct drm_driver' has no member named 'lastclose' .lastclose = drm_fb_helper_lastclose, ^~~~~~~~~ drivers/gpu/drm//arm/display/komeda/komeda_kms.c:35:17: warning: excess elements in struct initializer .lastclose = drm_fb_helper_lastclose, ^~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm//arm/display/komeda/komeda_kms.c:35:17: note: (near initialization for 'komeda_kms_driver') drivers/gpu/drm//arm/display/komeda/komeda_kms.c:36:3: error: 'struct drm_driver' has no member named 'gem_free_object_unlocked' .gem_free_object_unlocked = drm_gem_cma_free_object, ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm//arm/display/komeda/komeda_kms.c:36:30: warning: excess elements in struct initializer .gem_free_object_unlocked = drm_gem_cma_free_object, ^~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm//arm/display/komeda/komeda_kms.c:36:30: note: (near initialization for 'komeda_kms_driver') drivers/gpu/drm//arm/display/komeda/komeda_kms.c:37:3: error: 'struct drm_driver' has no member named 'gem_vm_ops' .gem_vm_ops = &drm_gem_cma_vm_ops, ^~~~~~~~~~ drivers/gpu/drm//arm/display/komeda/komeda_kms.c:37:18: warning: excess elements in struct initializer .gem_vm_ops = &drm_gem_cma_vm_ops, ^ drivers/gpu/drm//arm/display/komeda/komeda_kms.c:37:18: note: (near initialization for 'komeda_kms_driver') drivers/gpu/drm//arm/display/komeda/komeda_kms.c:38:3: error: 'struct drm_driver' has no member named 'dumb_create' .dumb_create = komeda_gem_cma_dumb_create, ^~~~~~~~~~~ drivers/gpu/drm//arm/display/komeda/komeda_kms.c:38:19: warning: excess elements in struct initializer .dumb_create = komeda_gem_cma_dumb_create, ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm//arm/display/komeda/komeda_kms.c:38:19: note: (near initialization for 'komeda_kms_driver') drivers/gpu/drm//arm/display/komeda/komeda_kms.c:39:3: error: 'struct drm_driver' has no member named 'prime_handle_to_fd' .prime_handle_to_fd = drm_gem_prime_handle_to_fd, ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm//arm/display/komeda/komeda_kms.c:39:25: warning: excess elements in struct initializer .prime_handle_to_fd = drm_gem_prime_handle_to_fd, ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm//arm/display/komeda/komeda_kms.c:39:25: note: (near initialization for 'komeda_kms_driver') drivers/gpu/drm//arm/display/komeda/komeda_kms.c:40:3: error: 'struct drm_driver' has no member named 'prime_fd_to_handle' .prime_fd_to_handle = drm_gem_prime_fd_to_handle, ^~~~~~~~~~~~~~~~~~ drivers/gpu/drm//arm/display/komeda/komeda_kms.c:40:25: warning: excess elements in struct initializer .prime_fd_to_handle = drm_gem_prime_fd_to_handle, ^~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm//arm/display/komeda/komeda_kms.c:40:25: note: (near initialization for 'komeda_kms_driver') drivers/gpu/drm//arm/display/komeda/komeda_kms.c:41:3: error: 'struct drm_driver' has no member named 'gem_prime_export' .gem_prime_export = drm_gem_prime_export, ^~~~~~~~~~~~~~~~ drivers/gpu/drm//arm/display/komeda/komeda_kms.c:41:23: warning: excess elements in struct initializer .gem_prime_export = drm_gem_prime_export, ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm//arm/display/komeda/komeda_kms.c:41:23: note: (near initialization for 'komeda_kms_driver') drivers/gpu/drm//arm/display/komeda/komeda_kms.c:42:3: error: 'struct drm_driver' has no member named 'gem_prime_import' .gem_prime_import = drm_gem_prime_import, ^~~~~~~~~~~~~~~~ drivers/gpu/drm//arm/display/komeda/komeda_kms.c:42:23: warning: excess elements in struct initializer .gem_prime_import = drm_gem_prime_import, ^~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm//arm/display/komeda/komeda_kms.c:42:23: note: (near initialization for 'komeda_kms_driver') drivers/gpu/drm//arm/display/komeda/komeda_kms.c:43:3: error: 'struct drm_driver' has no member named 'gem_prime_get_sg_table' .gem_prime_get_sg_table = drm_gem_cma_prime_get_sg_table, ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm//arm/display/komeda/komeda_kms.c:43:29: warning: excess elements in struct initializer .gem_prime_get_sg_table = drm_gem_cma_prime_get_sg_table, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm//arm/display/komeda/komeda_kms.c:43:29: note: (near initialization for 'komeda_kms_driver') drivers/gpu/drm//arm/display/komeda/komeda_kms.c:44:3: error: 'struct drm_driver' has no member named 'gem_prime_import_sg_table' .gem_prime_import_sg_table = drm_gem_cma_prime_import_sg_table, ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm//arm/display/komeda/komeda_kms.c:44:31: warning: excess elements in struct initializer .gem_prime_import_sg_table = drm_gem_cma_prime_import_sg_table, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm//arm/display/komeda/komeda_kms.c:44:31: note: (near initialization for 'komeda_kms_driver') drivers/gpu/drm//arm/display/komeda/komeda_kms.c:45:3: error: 'struct drm_driver' has no member named 'gem_prime_vmap' .gem_prime_vmap = drm_gem_cma_prime_vmap, ^~~~~~~~~~~~~~ drivers/gpu/drm//arm/display/komeda/komeda_kms.c:45:22: warning: excess elements in struct initializer .gem_prime_vmap = drm_gem_cma_prime_vmap, ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm//arm/display/komeda/komeda_kms.c:45:22: note: (near initialization for 'komeda_kms_driver') drivers/gpu/drm//arm/display/komeda/komeda_kms.c:46:3: error: 'struct drm_driver' has no member named 'gem_prime_vunmap' .gem_prime_vunmap = drm_gem_cma_prime_vunmap, ^~~~~~~~~~~~~~~~ drivers/gpu/drm//arm/display/komeda/komeda_kms.c:46:23: warning: excess elements in struct initializer .gem_prime_vunmap = drm_gem_cma_prime_vunmap, ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm//arm/display/komeda/komeda_kms.c:46:23: note: (near initialization for 'komeda_kms_driver') drivers/gpu/drm//arm/display/komeda/komeda_kms.c:47:3: error: 'struct drm_driver' has no member named 'gem_prime_mmap' .gem_prime_mmap = drm_gem_cma_prime_mmap, ^~~~~~~~~~~~~~ drivers/gpu/drm//arm/display/komeda/komeda_kms.c:47:22: warning: excess elements in struct initializer .gem_prime_mmap = drm_gem_cma_prime_mmap, ^~~~~~~~~~~~~~~~~~~~~~ drivers/gpu/drm//arm/display/komeda/komeda_kms.c:47:22: note: (near initialization for 'komeda_kms_driver') drivers/gpu/drm//arm/display/komeda/komeda_kms.c:48:3: error: 'struct drm_driver' has no member named 'fops' .fops = &komeda_cma_fops, -- In file included from drivers/gpu/drm//arm/display/komeda/komeda_crtc.c:15: drivers/gpu/drm//arm/display/komeda/komeda_kms.h:87:20: error: field 'base' has incomplete type struct drm_device base; ^~~~ drivers/gpu/drm//arm/display/komeda/komeda_crtc.c: In function 'komeda_kms_setup_crtcs': >> drivers/gpu/drm//arm/display/komeda/komeda_crtc.c:45:3: error: implicit declaration of function 'DRM_INFO'; did you mean 'DRM_IO'? [-Werror=implicit-function-declaration] DRM_INFO("crtc%d: master(pipe-%d) slave(%s) output: %s.\n", ^~~~~~~~ DRM_IO drivers/gpu/drm//arm/display/komeda/komeda_crtc.c: In function 'komeda_crtc_add': drivers/gpu/drm//arm/display/komeda/komeda_crtc.c:88:2: error: implicit declaration of function 'drm_crtc_vblank_reset'; did you mean 'drm_crtc_commit_get'? [-Werror=implicit-function-declaration] drm_crtc_vblank_reset(crtc); ^~~~~~~~~~~~~~~~~~~~~ drm_crtc_commit_get cc1: some warnings being treated as errors vim +27 drivers/gpu/drm//arm/display/komeda/komeda_dev.c bd628c1b james qian wang (Arm Technology China 2019-01-03 11) 29e56aec james qian wang (Arm Technology China 2019-01-03 12) static int komeda_parse_pipe_dt(struct komeda_dev *mdev, struct device_node *np) 29e56aec james qian wang (Arm Technology China 2019-01-03 13) { 29e56aec james qian wang (Arm Technology China 2019-01-03 14) struct komeda_pipeline *pipe; 29e56aec james qian wang (Arm Technology China 2019-01-03 15) struct clk *clk; 29e56aec james qian wang (Arm Technology China 2019-01-03 16) u32 pipe_id; 29e56aec james qian wang (Arm Technology China 2019-01-03 17) int ret = 0; 29e56aec james qian wang (Arm Technology China 2019-01-03 18) 29e56aec james qian wang (Arm Technology China 2019-01-03 19) ret = of_property_read_u32(np, "reg", &pipe_id); 29e56aec james qian wang (Arm Technology China 2019-01-03 20) if (ret != 0 || pipe_id >= mdev->n_pipelines) 29e56aec james qian wang (Arm Technology China 2019-01-03 21) return -EINVAL; 29e56aec james qian wang (Arm Technology China 2019-01-03 22) 29e56aec james qian wang (Arm Technology China 2019-01-03 23) pipe = mdev->pipelines[pipe_id]; 29e56aec james qian wang (Arm Technology China 2019-01-03 24) 29e56aec james qian wang (Arm Technology China 2019-01-03 25) clk = of_clk_get_by_name(np, "aclk"); 29e56aec james qian wang (Arm Technology China 2019-01-03 26) if (IS_ERR(clk)) { 29e56aec james qian wang (Arm Technology China 2019-01-03 @27) DRM_ERROR("get aclk for pipeline %d failed!\n", pipe_id); 29e56aec james qian wang (Arm Technology China 2019-01-03 28) return PTR_ERR(clk); 29e56aec james qian wang (Arm Technology China 2019-01-03 29) } 29e56aec james qian wang (Arm Technology China 2019-01-03 30) pipe->aclk = clk; 29e56aec james qian wang (Arm Technology China 2019-01-03 31) 29e56aec james qian wang (Arm Technology China 2019-01-03 32) clk = of_clk_get_by_name(np, "pxclk"); 29e56aec james qian wang (Arm Technology China 2019-01-03 33) if (IS_ERR(clk)) { 29e56aec james qian wang (Arm Technology China 2019-01-03 34) DRM_ERROR("get pxclk for pipeline %d failed!\n", pipe_id); 29e56aec james qian wang (Arm Technology China 2019-01-03 35) return PTR_ERR(clk); 29e56aec james qian wang (Arm Technology China 2019-01-03 36) } 29e56aec james qian wang (Arm Technology China 2019-01-03 37) pipe->pxlclk = clk; 29e56aec james qian wang (Arm Technology China 2019-01-03 38) 29e56aec james qian wang (Arm Technology China 2019-01-03 39) /* enum ports */ 29e56aec james qian wang (Arm Technology China 2019-01-03 40) pipe->of_output_dev = 29e56aec james qian wang (Arm Technology China 2019-01-03 41) of_graph_get_remote_node(np, KOMEDA_OF_PORT_OUTPUT, 0); 29e56aec james qian wang (Arm Technology China 2019-01-03 42) pipe->of_output_port = 29e56aec james qian wang (Arm Technology China 2019-01-03 43) of_graph_get_port_by_id(np, KOMEDA_OF_PORT_OUTPUT); 29e56aec james qian wang (Arm Technology China 2019-01-03 44) 29e56aec james qian wang (Arm Technology China 2019-01-03 45) pipe->of_node = np; 29e56aec james qian wang (Arm Technology China 2019-01-03 46) 29e56aec james qian wang (Arm Technology China 2019-01-03 47) return 0; 29e56aec james qian wang (Arm Technology China 2019-01-03 48) } 29e56aec james qian wang (Arm Technology China 2019-01-03 49) 29e56aec james qian wang (Arm Technology China 2019-01-03 50) static int komeda_parse_dt(struct device *dev, struct komeda_dev *mdev) 29e56aec james qian wang (Arm Technology China 2019-01-03 51) { 29e56aec james qian wang (Arm Technology China 2019-01-03 52) struct device_node *child, *np = dev->of_node; 29e56aec james qian wang (Arm Technology China 2019-01-03 53) struct clk *clk; 29e56aec james qian wang (Arm Technology China 2019-01-03 54) int ret; 29e56aec james qian wang (Arm Technology China 2019-01-03 55) 29e56aec james qian wang (Arm Technology China 2019-01-03 56) clk = devm_clk_get(dev, "mclk"); 29e56aec james qian wang (Arm Technology China 2019-01-03 57) if (IS_ERR(clk)) 29e56aec james qian wang (Arm Technology China 2019-01-03 58) return PTR_ERR(clk); 29e56aec james qian wang (Arm Technology China 2019-01-03 59) 29e56aec james qian wang (Arm Technology China 2019-01-03 60) mdev->mclk = clk; 29e56aec james qian wang (Arm Technology China 2019-01-03 61) 29e56aec james qian wang (Arm Technology China 2019-01-03 62) for_each_available_child_of_node(np, child) { 29e56aec james qian wang (Arm Technology China 2019-01-03 63) if (of_node_cmp(child->name, "pipeline") == 0) { 29e56aec james qian wang (Arm Technology China 2019-01-03 64) ret = komeda_parse_pipe_dt(mdev, child); 29e56aec james qian wang (Arm Technology China 2019-01-03 65) if (ret) { 29e56aec james qian wang (Arm Technology China 2019-01-03 66) DRM_ERROR("parse pipeline dt error!\n"); 29e56aec james qian wang (Arm Technology China 2019-01-03 67) of_node_put(child); 29e56aec james qian wang (Arm Technology China 2019-01-03 68) break; 29e56aec james qian wang (Arm Technology China 2019-01-03 69) } 29e56aec james qian wang (Arm Technology China 2019-01-03 70) } 29e56aec james qian wang (Arm Technology China 2019-01-03 71) } 29e56aec james qian wang (Arm Technology China 2019-01-03 72) 29e56aec james qian wang (Arm Technology China 2019-01-03 73) return ret; 29e56aec james qian wang (Arm Technology China 2019-01-03 74) } 29e56aec james qian wang (Arm Technology China 2019-01-03 75) bd628c1b james qian wang (Arm Technology China 2019-01-03 76) struct komeda_dev *komeda_dev_create(struct device *dev) bd628c1b james qian wang (Arm Technology China 2019-01-03 77) { bd628c1b james qian wang (Arm Technology China 2019-01-03 78) struct platform_device *pdev = to_platform_device(dev); bd628c1b james qian wang (Arm Technology China 2019-01-03 79) const struct komeda_product_data *product; bd628c1b james qian wang (Arm Technology China 2019-01-03 80) struct komeda_dev *mdev; bd628c1b james qian wang (Arm Technology China 2019-01-03 81) struct resource *io_res; bd628c1b james qian wang (Arm Technology China 2019-01-03 82) int err = 0; bd628c1b james qian wang (Arm Technology China 2019-01-03 83) bd628c1b james qian wang (Arm Technology China 2019-01-03 84) product = of_device_get_match_data(dev); bd628c1b james qian wang (Arm Technology China 2019-01-03 85) if (!product) bd628c1b james qian wang (Arm Technology China 2019-01-03 86) return ERR_PTR(-ENODEV); bd628c1b james qian wang (Arm Technology China 2019-01-03 87) bd628c1b james qian wang (Arm Technology China 2019-01-03 88) io_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); bd628c1b james qian wang (Arm Technology China 2019-01-03 89) if (!io_res) { bd628c1b james qian wang (Arm Technology China 2019-01-03 90) DRM_ERROR("No registers defined.\n"); bd628c1b james qian wang (Arm Technology China 2019-01-03 91) return ERR_PTR(-ENODEV); bd628c1b james qian wang (Arm Technology China 2019-01-03 92) } bd628c1b james qian wang (Arm Technology China 2019-01-03 93) bd628c1b james qian wang (Arm Technology China 2019-01-03 94) mdev = devm_kzalloc(dev, sizeof(*mdev), GFP_KERNEL); bd628c1b james qian wang (Arm Technology China 2019-01-03 95) if (!mdev) bd628c1b james qian wang (Arm Technology China 2019-01-03 96) return ERR_PTR(-ENOMEM); bd628c1b james qian wang (Arm Technology China 2019-01-03 97) bd628c1b james qian wang (Arm Technology China 2019-01-03 98) mdev->dev = dev; bd628c1b james qian wang (Arm Technology China 2019-01-03 99) mdev->reg_base = devm_ioremap_resource(dev, io_res); bd628c1b james qian wang (Arm Technology China 2019-01-03 100) if (IS_ERR(mdev->reg_base)) { bd628c1b james qian wang (Arm Technology China 2019-01-03 101) DRM_ERROR("Map register space failed.\n"); bd628c1b james qian wang (Arm Technology China 2019-01-03 102) err = PTR_ERR(mdev->reg_base); bd628c1b james qian wang (Arm Technology China 2019-01-03 103) mdev->reg_base = NULL; bd628c1b james qian wang (Arm Technology China 2019-01-03 104) goto err_cleanup; bd628c1b james qian wang (Arm Technology China 2019-01-03 105) } bd628c1b james qian wang (Arm Technology China 2019-01-03 106) bd628c1b james qian wang (Arm Technology China 2019-01-03 107) mdev->pclk = devm_clk_get(dev, "pclk"); bd628c1b james qian wang (Arm Technology China 2019-01-03 108) if (IS_ERR(mdev->pclk)) { bd628c1b james qian wang (Arm Technology China 2019-01-03 109) DRM_ERROR("Get APB clk failed.\n"); bd628c1b james qian wang (Arm Technology China 2019-01-03 110) err = PTR_ERR(mdev->pclk); bd628c1b james qian wang (Arm Technology China 2019-01-03 111) mdev->pclk = NULL; bd628c1b james qian wang (Arm Technology China 2019-01-03 112) goto err_cleanup; bd628c1b james qian wang (Arm Technology China 2019-01-03 113) } bd628c1b james qian wang (Arm Technology China 2019-01-03 114) bd628c1b james qian wang (Arm Technology China 2019-01-03 115) /* Enable APB clock to access the registers */ bd628c1b james qian wang (Arm Technology China 2019-01-03 116) clk_prepare_enable(mdev->pclk); bd628c1b james qian wang (Arm Technology China 2019-01-03 117) bd628c1b james qian wang (Arm Technology China 2019-01-03 118) mdev->funcs = product->identify(mdev->reg_base, &mdev->chip); bd628c1b james qian wang (Arm Technology China 2019-01-03 119) if (!komeda_product_match(mdev, product->product_id)) { bd628c1b james qian wang (Arm Technology China 2019-01-03 120) DRM_ERROR("DT configured %x mismatch with real HW %x.\n", bd628c1b james qian wang (Arm Technology China 2019-01-03 121) product->product_id, bd628c1b james qian wang (Arm Technology China 2019-01-03 122) MALIDP_CORE_ID_PRODUCT_ID(mdev->chip.core_id)); bd628c1b james qian wang (Arm Technology China 2019-01-03 123) err = -ENODEV; bd628c1b james qian wang (Arm Technology China 2019-01-03 124) goto err_cleanup; bd628c1b james qian wang (Arm Technology China 2019-01-03 125) } bd628c1b james qian wang (Arm Technology China 2019-01-03 126) bd628c1b james qian wang (Arm Technology China 2019-01-03 @127) DRM_INFO("Found ARM Mali-D%x version r%dp%d\n", bd628c1b james qian wang (Arm Technology China 2019-01-03 128) MALIDP_CORE_ID_PRODUCT_ID(mdev->chip.core_id), bd628c1b james qian wang (Arm Technology China 2019-01-03 129) MALIDP_CORE_ID_MAJOR(mdev->chip.core_id), bd628c1b james qian wang (Arm Technology China 2019-01-03 130) MALIDP_CORE_ID_MINOR(mdev->chip.core_id)); bd628c1b james qian wang (Arm Technology China 2019-01-03 131) 981d29d2 james qian wang (Arm Technology China 2019-01-03 132) mdev->funcs->init_format_table(mdev); 981d29d2 james qian wang (Arm Technology China 2019-01-03 133) bd628c1b james qian wang (Arm Technology China 2019-01-03 134) err = mdev->funcs->enum_resources(mdev); bd628c1b james qian wang (Arm Technology China 2019-01-03 135) if (err) { bd628c1b james qian wang (Arm Technology China 2019-01-03 136) DRM_ERROR("enumerate display resource failed.\n"); bd628c1b james qian wang (Arm Technology China 2019-01-03 137) goto err_cleanup; bd628c1b james qian wang (Arm Technology China 2019-01-03 138) } bd628c1b james qian wang (Arm Technology China 2019-01-03 139) 29e56aec james qian wang (Arm Technology China 2019-01-03 140) err = komeda_parse_dt(dev, mdev); 29e56aec james qian wang (Arm Technology China 2019-01-03 141) if (err) { 29e56aec james qian wang (Arm Technology China 2019-01-03 142) DRM_ERROR("parse device tree failed.\n"); 29e56aec james qian wang (Arm Technology China 2019-01-03 143) goto err_cleanup; 29e56aec james qian wang (Arm Technology China 2019-01-03 144) } 29e56aec james qian wang (Arm Technology China 2019-01-03 145) bd628c1b james qian wang (Arm Technology China 2019-01-03 146) return mdev; bd628c1b james qian wang (Arm Technology China 2019-01-03 147) bd628c1b james qian wang (Arm Technology China 2019-01-03 148) err_cleanup: bd628c1b james qian wang (Arm Technology China 2019-01-03 149) komeda_dev_destroy(mdev); bd628c1b james qian wang (Arm Technology China 2019-01-03 150) return ERR_PTR(err); bd628c1b james qian wang (Arm Technology China 2019-01-03 151) } bd628c1b james qian wang (Arm Technology China 2019-01-03 152) :::::: The code at line 27 was first introduced by commit :::::: 29e56aec911dd784c1a29f28254f74fcd683bfe0 drm/komeda: Add DT parsing :::::: TO: james qian wang (Arm Technology China) <james.qian.wang@xxxxxxx> :::::: CC: Liviu Dudau <Liviu.Dudau@xxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip
_______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel