All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Rodrigo Rolim Mendes de Alencar <455.rodrigo.alencar@gmail.com>,
	linux-fbdev@vger.kernel.org
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	alencar.fmce@imbel.gov.br, andy.shevchenko@gmail.com,
	Rodrigo Alencar <455.rodrigo.alencar@gmail.com>
Subject: Re: [PATCH] video: fbdev: ssd1307fb: Added support to Column offset
Date: Thu, 14 May 2020 00:32:15 +0800	[thread overview]
Message-ID: <202005140013.2JUBkZkK%lkp@intel.com> (raw)
In-Reply-To: <1589370694-14327-1-git-send-email-alencar.fmce@imbel.gov.br>

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

Hi Rodrigo,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on next-20200512]
[cannot apply to robh/for-next linus/master linux/master v5.7-rc5 v5.7-rc4 v5.7-rc3 v5.7-rc5]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Rodrigo-Rolim-Mendes-de-Alencar/video-fbdev-ssd1307fb-Added-support-to-Column-offset/20200513-195401
base:    e098d7762d602be640c53565ceca342f81e55ad2
config: alpha-allyesconfig (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=alpha 

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

All errors (new ones prefixed by >>):

drivers/video/fbdev/ssd1307fb.c: In function 'ssd1307fb_probe':
>> drivers/video/fbdev/ssd1307fb.c:630:27: error: 'node' undeclared (first use in this function); did you mean 'inode'?
630 |  if (of_property_read_u32(node, "solomon,col-offset", &par->col_offset))
|                           ^~~~
|                           inode
drivers/video/fbdev/ssd1307fb.c:630:27: note: each undeclared identifier is reported only once for each function it appears in

vim +630 drivers/video/fbdev/ssd1307fb.c

   579	
   580	static int ssd1307fb_probe(struct i2c_client *client)
   581	{
   582		struct device *dev = &client->dev;
   583		struct backlight_device *bl;
   584		char bl_name[12];
   585		struct fb_info *info;
   586		struct fb_deferred_io *ssd1307fb_defio;
   587		u32 vmem_size;
   588		struct ssd1307fb_par *par;
   589		void *vmem;
   590		int ret;
   591	
   592		info = framebuffer_alloc(sizeof(struct ssd1307fb_par), dev);
   593		if (!info)
   594			return -ENOMEM;
   595	
   596		par = info->par;
   597		par->info = info;
   598		par->client = client;
   599	
   600		par->device_info = device_get_match_data(dev);
   601	
   602		par->reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW);
   603		if (IS_ERR(par->reset)) {
   604			dev_err(dev, "failed to get reset gpio: %ld\n",
   605				PTR_ERR(par->reset));
   606			ret = PTR_ERR(par->reset);
   607			goto fb_alloc_error;
   608		}
   609	
   610		par->vbat_reg = devm_regulator_get_optional(dev, "vbat");
   611		if (IS_ERR(par->vbat_reg)) {
   612			ret = PTR_ERR(par->vbat_reg);
   613			if (ret == -ENODEV) {
   614				par->vbat_reg = NULL;
   615			} else {
   616				dev_err(dev, "failed to get VBAT regulator: %d\n", ret);
   617				goto fb_alloc_error;
   618			}
   619		}
   620	
   621		if (device_property_read_u32(dev, "solomon,width", &par->width))
   622			par->width = 96;
   623	
   624		if (device_property_read_u32(dev, "solomon,height", &par->height))
   625			par->height = 16;
   626	
   627		if (device_property_read_u32(dev, "solomon,page-offset", &par->page_offset))
   628			par->page_offset = 1;
   629	
 > 630		if (of_property_read_u32(node, "solomon,col-offset", &par->col_offset))
   631			par->col_offset = 0;
   632	
   633		if (device_property_read_u32(dev, "solomon,com-offset", &par->com_offset))
   634			par->com_offset = 0;
   635	
   636		if (device_property_read_u32(dev, "solomon,prechargep1", &par->prechargep1))
   637			par->prechargep1 = 2;
   638	
   639		if (device_property_read_u32(dev, "solomon,prechargep2", &par->prechargep2))
   640			par->prechargep2 = 2;
   641	
   642		if (!device_property_read_u8_array(dev, "solomon,lookup-table",
   643						   par->lookup_table,
   644						   ARRAY_SIZE(par->lookup_table)))
   645			par->lookup_table_set = 1;
   646	
   647		par->seg_remap = !device_property_read_bool(dev, "solomon,segment-no-remap");
   648		par->com_seq = device_property_read_bool(dev, "solomon,com-seq");
   649		par->com_lrremap = device_property_read_bool(dev, "solomon,com-lrremap");
   650		par->com_invdir = device_property_read_bool(dev, "solomon,com-invdir");
   651		par->area_color_enable =
   652			device_property_read_bool(dev, "solomon,area-color-enable");
   653		par->low_power = device_property_read_bool(dev, "solomon,low-power");
   654	
   655		par->contrast = 127;
   656		par->vcomh = par->device_info->default_vcomh;
   657	
   658		/* Setup display timing */
   659		if (device_property_read_u32(dev, "solomon,dclk-div", &par->dclk_div))
   660			par->dclk_div = par->device_info->default_dclk_div;
   661		if (device_property_read_u32(dev, "solomon,dclk-frq", &par->dclk_frq))
   662			par->dclk_frq = par->device_info->default_dclk_frq;
   663	
   664		vmem_size = DIV_ROUND_UP(par->width, 8) * par->height;
   665	
   666		vmem = (void *)__get_free_pages(GFP_KERNEL | __GFP_ZERO,
   667						get_order(vmem_size));
   668		if (!vmem) {
   669			dev_err(dev, "Couldn't allocate graphical memory.\n");
   670			ret = -ENOMEM;
   671			goto fb_alloc_error;
   672		}
   673	
   674		ssd1307fb_defio = devm_kzalloc(dev, sizeof(*ssd1307fb_defio),
   675					       GFP_KERNEL);
   676		if (!ssd1307fb_defio) {
   677			dev_err(dev, "Couldn't allocate deferred io.\n");
   678			ret = -ENOMEM;
   679			goto fb_alloc_error;
   680		}
   681	
   682		ssd1307fb_defio->delay = HZ / refreshrate;
   683		ssd1307fb_defio->deferred_io = ssd1307fb_deferred_io;
   684	
   685		info->fbops = &ssd1307fb_ops;
   686		info->fix = ssd1307fb_fix;
   687		info->fix.line_length = DIV_ROUND_UP(par->width, 8);
   688		info->fbdefio = ssd1307fb_defio;
   689	
   690		info->var = ssd1307fb_var;
   691		info->var.xres = par->width;
   692		info->var.xres_virtual = par->width;
   693		info->var.yres = par->height;
   694		info->var.yres_virtual = par->height;
   695	
   696		info->screen_buffer = vmem;
   697		info->fix.smem_start = __pa(vmem);
   698		info->fix.smem_len = vmem_size;
   699	
   700		fb_deferred_io_init(info);
   701	
   702		i2c_set_clientdata(client, info);
   703	
   704		if (par->reset) {
   705			/* Reset the screen */
   706			gpiod_set_value_cansleep(par->reset, 1);
   707			udelay(4);
   708			gpiod_set_value_cansleep(par->reset, 0);
   709			udelay(4);
   710		}
   711	
   712		if (par->vbat_reg) {
   713			ret = regulator_enable(par->vbat_reg);
   714			if (ret) {
   715				dev_err(dev, "failed to enable VBAT: %d\n", ret);
   716				goto reset_oled_error;
   717			}
   718		}
   719	
   720		ret = ssd1307fb_init(par);
   721		if (ret)
   722			goto regulator_enable_error;
   723	
   724		ret = register_framebuffer(info);
   725		if (ret) {
   726			dev_err(dev, "Couldn't register the framebuffer\n");
   727			goto panel_init_error;
   728		}
   729	
   730		snprintf(bl_name, sizeof(bl_name), "ssd1307fb%d", info->node);
   731		bl = backlight_device_register(bl_name, dev, par, &ssd1307fb_bl_ops,
   732					       NULL);
   733		if (IS_ERR(bl)) {
   734			ret = PTR_ERR(bl);
   735			dev_err(dev, "unable to register backlight device: %d\n", ret);
   736			goto bl_init_error;
   737		}
   738	
   739		bl->props.brightness = par->contrast;
   740		bl->props.max_brightness = MAX_CONTRAST;
   741		info->bl_dev = bl;
   742	
   743		dev_info(dev, "fb%d: %s framebuffer device registered, using %d bytes of video memory\n", info->node, info->fix.id, vmem_size);
   744	
   745		return 0;
   746	
   747	bl_init_error:
   748		unregister_framebuffer(info);
   749	panel_init_error:
   750		if (par->device_info->need_pwm) {
   751			pwm_disable(par->pwm);
   752			pwm_put(par->pwm);
   753		}
   754	regulator_enable_error:
   755		if (par->vbat_reg)
   756			regulator_disable(par->vbat_reg);
   757	reset_oled_error:
   758		fb_deferred_io_cleanup(info);
   759	fb_alloc_error:
   760		framebuffer_release(info);
   761		return ret;
   762	}
   763	

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

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

WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: Rodrigo Rolim Mendes de Alencar <455.rodrigo.alencar@gmail.com>,
	linux-fbdev@vger.kernel.org
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	alencar.fmce@imbel.gov.br, andy.shevchenko@gmail.com
Subject: Re: [PATCH] video: fbdev: ssd1307fb: Added support to Column offset
Date: Wed, 13 May 2020 16:32:15 +0000	[thread overview]
Message-ID: <202005140013.2JUBkZkK%lkp@intel.com> (raw)
In-Reply-To: <1589370694-14327-1-git-send-email-alencar.fmce@imbel.gov.br>

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

Hi Rodrigo,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on next-20200512]
[cannot apply to robh/for-next linus/master linux/master v5.7-rc5 v5.7-rc4 v5.7-rc3 v5.7-rc5]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Rodrigo-Rolim-Mendes-de-Alencar/video-fbdev-ssd1307fb-Added-support-to-Column-offset/20200513-195401
base:    e098d7762d602be640c53565ceca342f81e55ad2
config: alpha-allyesconfig (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=alpha 

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

All errors (new ones prefixed by >>):

drivers/video/fbdev/ssd1307fb.c: In function 'ssd1307fb_probe':
>> drivers/video/fbdev/ssd1307fb.c:630:27: error: 'node' undeclared (first use in this function); did you mean 'inode'?
630 |  if (of_property_read_u32(node, "solomon,col-offset", &par->col_offset))
|                           ^~~~
|                           inode
drivers/video/fbdev/ssd1307fb.c:630:27: note: each undeclared identifier is reported only once for each function it appears in

vim +630 drivers/video/fbdev/ssd1307fb.c

   579	
   580	static int ssd1307fb_probe(struct i2c_client *client)
   581	{
   582		struct device *dev = &client->dev;
   583		struct backlight_device *bl;
   584		char bl_name[12];
   585		struct fb_info *info;
   586		struct fb_deferred_io *ssd1307fb_defio;
   587		u32 vmem_size;
   588		struct ssd1307fb_par *par;
   589		void *vmem;
   590		int ret;
   591	
   592		info = framebuffer_alloc(sizeof(struct ssd1307fb_par), dev);
   593		if (!info)
   594			return -ENOMEM;
   595	
   596		par = info->par;
   597		par->info = info;
   598		par->client = client;
   599	
   600		par->device_info = device_get_match_data(dev);
   601	
   602		par->reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW);
   603		if (IS_ERR(par->reset)) {
   604			dev_err(dev, "failed to get reset gpio: %ld\n",
   605				PTR_ERR(par->reset));
   606			ret = PTR_ERR(par->reset);
   607			goto fb_alloc_error;
   608		}
   609	
   610		par->vbat_reg = devm_regulator_get_optional(dev, "vbat");
   611		if (IS_ERR(par->vbat_reg)) {
   612			ret = PTR_ERR(par->vbat_reg);
   613			if (ret == -ENODEV) {
   614				par->vbat_reg = NULL;
   615			} else {
   616				dev_err(dev, "failed to get VBAT regulator: %d\n", ret);
   617				goto fb_alloc_error;
   618			}
   619		}
   620	
   621		if (device_property_read_u32(dev, "solomon,width", &par->width))
   622			par->width = 96;
   623	
   624		if (device_property_read_u32(dev, "solomon,height", &par->height))
   625			par->height = 16;
   626	
   627		if (device_property_read_u32(dev, "solomon,page-offset", &par->page_offset))
   628			par->page_offset = 1;
   629	
 > 630		if (of_property_read_u32(node, "solomon,col-offset", &par->col_offset))
   631			par->col_offset = 0;
   632	
   633		if (device_property_read_u32(dev, "solomon,com-offset", &par->com_offset))
   634			par->com_offset = 0;
   635	
   636		if (device_property_read_u32(dev, "solomon,prechargep1", &par->prechargep1))
   637			par->prechargep1 = 2;
   638	
   639		if (device_property_read_u32(dev, "solomon,prechargep2", &par->prechargep2))
   640			par->prechargep2 = 2;
   641	
   642		if (!device_property_read_u8_array(dev, "solomon,lookup-table",
   643						   par->lookup_table,
   644						   ARRAY_SIZE(par->lookup_table)))
   645			par->lookup_table_set = 1;
   646	
   647		par->seg_remap = !device_property_read_bool(dev, "solomon,segment-no-remap");
   648		par->com_seq = device_property_read_bool(dev, "solomon,com-seq");
   649		par->com_lrremap = device_property_read_bool(dev, "solomon,com-lrremap");
   650		par->com_invdir = device_property_read_bool(dev, "solomon,com-invdir");
   651		par->area_color_enable =
   652			device_property_read_bool(dev, "solomon,area-color-enable");
   653		par->low_power = device_property_read_bool(dev, "solomon,low-power");
   654	
   655		par->contrast = 127;
   656		par->vcomh = par->device_info->default_vcomh;
   657	
   658		/* Setup display timing */
   659		if (device_property_read_u32(dev, "solomon,dclk-div", &par->dclk_div))
   660			par->dclk_div = par->device_info->default_dclk_div;
   661		if (device_property_read_u32(dev, "solomon,dclk-frq", &par->dclk_frq))
   662			par->dclk_frq = par->device_info->default_dclk_frq;
   663	
   664		vmem_size = DIV_ROUND_UP(par->width, 8) * par->height;
   665	
   666		vmem = (void *)__get_free_pages(GFP_KERNEL | __GFP_ZERO,
   667						get_order(vmem_size));
   668		if (!vmem) {
   669			dev_err(dev, "Couldn't allocate graphical memory.\n");
   670			ret = -ENOMEM;
   671			goto fb_alloc_error;
   672		}
   673	
   674		ssd1307fb_defio = devm_kzalloc(dev, sizeof(*ssd1307fb_defio),
   675					       GFP_KERNEL);
   676		if (!ssd1307fb_defio) {
   677			dev_err(dev, "Couldn't allocate deferred io.\n");
   678			ret = -ENOMEM;
   679			goto fb_alloc_error;
   680		}
   681	
   682		ssd1307fb_defio->delay = HZ / refreshrate;
   683		ssd1307fb_defio->deferred_io = ssd1307fb_deferred_io;
   684	
   685		info->fbops = &ssd1307fb_ops;
   686		info->fix = ssd1307fb_fix;
   687		info->fix.line_length = DIV_ROUND_UP(par->width, 8);
   688		info->fbdefio = ssd1307fb_defio;
   689	
   690		info->var = ssd1307fb_var;
   691		info->var.xres = par->width;
   692		info->var.xres_virtual = par->width;
   693		info->var.yres = par->height;
   694		info->var.yres_virtual = par->height;
   695	
   696		info->screen_buffer = vmem;
   697		info->fix.smem_start = __pa(vmem);
   698		info->fix.smem_len = vmem_size;
   699	
   700		fb_deferred_io_init(info);
   701	
   702		i2c_set_clientdata(client, info);
   703	
   704		if (par->reset) {
   705			/* Reset the screen */
   706			gpiod_set_value_cansleep(par->reset, 1);
   707			udelay(4);
   708			gpiod_set_value_cansleep(par->reset, 0);
   709			udelay(4);
   710		}
   711	
   712		if (par->vbat_reg) {
   713			ret = regulator_enable(par->vbat_reg);
   714			if (ret) {
   715				dev_err(dev, "failed to enable VBAT: %d\n", ret);
   716				goto reset_oled_error;
   717			}
   718		}
   719	
   720		ret = ssd1307fb_init(par);
   721		if (ret)
   722			goto regulator_enable_error;
   723	
   724		ret = register_framebuffer(info);
   725		if (ret) {
   726			dev_err(dev, "Couldn't register the framebuffer\n");
   727			goto panel_init_error;
   728		}
   729	
   730		snprintf(bl_name, sizeof(bl_name), "ssd1307fb%d", info->node);
   731		bl = backlight_device_register(bl_name, dev, par, &ssd1307fb_bl_ops,
   732					       NULL);
   733		if (IS_ERR(bl)) {
   734			ret = PTR_ERR(bl);
   735			dev_err(dev, "unable to register backlight device: %d\n", ret);
   736			goto bl_init_error;
   737		}
   738	
   739		bl->props.brightness = par->contrast;
   740		bl->props.max_brightness = MAX_CONTRAST;
   741		info->bl_dev = bl;
   742	
   743		dev_info(dev, "fb%d: %s framebuffer device registered, using %d bytes of video memory\n", info->node, info->fix.id, vmem_size);
   744	
   745		return 0;
   746	
   747	bl_init_error:
   748		unregister_framebuffer(info);
   749	panel_init_error:
   750		if (par->device_info->need_pwm) {
   751			pwm_disable(par->pwm);
   752			pwm_put(par->pwm);
   753		}
   754	regulator_enable_error:
   755		if (par->vbat_reg)
   756			regulator_disable(par->vbat_reg);
   757	reset_oled_error:
   758		fb_deferred_io_cleanup(info);
   759	fb_alloc_error:
   760		framebuffer_release(info);
   761		return ret;
   762	}
   763	

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

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

WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH] video: fbdev: ssd1307fb: Added support to Column offset
Date: Thu, 14 May 2020 00:32:15 +0800	[thread overview]
Message-ID: <202005140013.2JUBkZkK%lkp@intel.com> (raw)
In-Reply-To: <1589370694-14327-1-git-send-email-alencar.fmce@imbel.gov.br>

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

Hi Rodrigo,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on next-20200512]
[cannot apply to robh/for-next linus/master linux/master v5.7-rc5 v5.7-rc4 v5.7-rc3 v5.7-rc5]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Rodrigo-Rolim-Mendes-de-Alencar/video-fbdev-ssd1307fb-Added-support-to-Column-offset/20200513-195401
base:    e098d7762d602be640c53565ceca342f81e55ad2
config: alpha-allyesconfig (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=alpha 

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

All errors (new ones prefixed by >>):

drivers/video/fbdev/ssd1307fb.c: In function 'ssd1307fb_probe':
>> drivers/video/fbdev/ssd1307fb.c:630:27: error: 'node' undeclared (first use in this function); did you mean 'inode'?
630 |  if (of_property_read_u32(node, "solomon,col-offset", &par->col_offset))
|                           ^~~~
|                           inode
drivers/video/fbdev/ssd1307fb.c:630:27: note: each undeclared identifier is reported only once for each function it appears in

vim +630 drivers/video/fbdev/ssd1307fb.c

   579	
   580	static int ssd1307fb_probe(struct i2c_client *client)
   581	{
   582		struct device *dev = &client->dev;
   583		struct backlight_device *bl;
   584		char bl_name[12];
   585		struct fb_info *info;
   586		struct fb_deferred_io *ssd1307fb_defio;
   587		u32 vmem_size;
   588		struct ssd1307fb_par *par;
   589		void *vmem;
   590		int ret;
   591	
   592		info = framebuffer_alloc(sizeof(struct ssd1307fb_par), dev);
   593		if (!info)
   594			return -ENOMEM;
   595	
   596		par = info->par;
   597		par->info = info;
   598		par->client = client;
   599	
   600		par->device_info = device_get_match_data(dev);
   601	
   602		par->reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW);
   603		if (IS_ERR(par->reset)) {
   604			dev_err(dev, "failed to get reset gpio: %ld\n",
   605				PTR_ERR(par->reset));
   606			ret = PTR_ERR(par->reset);
   607			goto fb_alloc_error;
   608		}
   609	
   610		par->vbat_reg = devm_regulator_get_optional(dev, "vbat");
   611		if (IS_ERR(par->vbat_reg)) {
   612			ret = PTR_ERR(par->vbat_reg);
   613			if (ret == -ENODEV) {
   614				par->vbat_reg = NULL;
   615			} else {
   616				dev_err(dev, "failed to get VBAT regulator: %d\n", ret);
   617				goto fb_alloc_error;
   618			}
   619		}
   620	
   621		if (device_property_read_u32(dev, "solomon,width", &par->width))
   622			par->width = 96;
   623	
   624		if (device_property_read_u32(dev, "solomon,height", &par->height))
   625			par->height = 16;
   626	
   627		if (device_property_read_u32(dev, "solomon,page-offset", &par->page_offset))
   628			par->page_offset = 1;
   629	
 > 630		if (of_property_read_u32(node, "solomon,col-offset", &par->col_offset))
   631			par->col_offset = 0;
   632	
   633		if (device_property_read_u32(dev, "solomon,com-offset", &par->com_offset))
   634			par->com_offset = 0;
   635	
   636		if (device_property_read_u32(dev, "solomon,prechargep1", &par->prechargep1))
   637			par->prechargep1 = 2;
   638	
   639		if (device_property_read_u32(dev, "solomon,prechargep2", &par->prechargep2))
   640			par->prechargep2 = 2;
   641	
   642		if (!device_property_read_u8_array(dev, "solomon,lookup-table",
   643						   par->lookup_table,
   644						   ARRAY_SIZE(par->lookup_table)))
   645			par->lookup_table_set = 1;
   646	
   647		par->seg_remap = !device_property_read_bool(dev, "solomon,segment-no-remap");
   648		par->com_seq = device_property_read_bool(dev, "solomon,com-seq");
   649		par->com_lrremap = device_property_read_bool(dev, "solomon,com-lrremap");
   650		par->com_invdir = device_property_read_bool(dev, "solomon,com-invdir");
   651		par->area_color_enable =
   652			device_property_read_bool(dev, "solomon,area-color-enable");
   653		par->low_power = device_property_read_bool(dev, "solomon,low-power");
   654	
   655		par->contrast = 127;
   656		par->vcomh = par->device_info->default_vcomh;
   657	
   658		/* Setup display timing */
   659		if (device_property_read_u32(dev, "solomon,dclk-div", &par->dclk_div))
   660			par->dclk_div = par->device_info->default_dclk_div;
   661		if (device_property_read_u32(dev, "solomon,dclk-frq", &par->dclk_frq))
   662			par->dclk_frq = par->device_info->default_dclk_frq;
   663	
   664		vmem_size = DIV_ROUND_UP(par->width, 8) * par->height;
   665	
   666		vmem = (void *)__get_free_pages(GFP_KERNEL | __GFP_ZERO,
   667						get_order(vmem_size));
   668		if (!vmem) {
   669			dev_err(dev, "Couldn't allocate graphical memory.\n");
   670			ret = -ENOMEM;
   671			goto fb_alloc_error;
   672		}
   673	
   674		ssd1307fb_defio = devm_kzalloc(dev, sizeof(*ssd1307fb_defio),
   675					       GFP_KERNEL);
   676		if (!ssd1307fb_defio) {
   677			dev_err(dev, "Couldn't allocate deferred io.\n");
   678			ret = -ENOMEM;
   679			goto fb_alloc_error;
   680		}
   681	
   682		ssd1307fb_defio->delay = HZ / refreshrate;
   683		ssd1307fb_defio->deferred_io = ssd1307fb_deferred_io;
   684	
   685		info->fbops = &ssd1307fb_ops;
   686		info->fix = ssd1307fb_fix;
   687		info->fix.line_length = DIV_ROUND_UP(par->width, 8);
   688		info->fbdefio = ssd1307fb_defio;
   689	
   690		info->var = ssd1307fb_var;
   691		info->var.xres = par->width;
   692		info->var.xres_virtual = par->width;
   693		info->var.yres = par->height;
   694		info->var.yres_virtual = par->height;
   695	
   696		info->screen_buffer = vmem;
   697		info->fix.smem_start = __pa(vmem);
   698		info->fix.smem_len = vmem_size;
   699	
   700		fb_deferred_io_init(info);
   701	
   702		i2c_set_clientdata(client, info);
   703	
   704		if (par->reset) {
   705			/* Reset the screen */
   706			gpiod_set_value_cansleep(par->reset, 1);
   707			udelay(4);
   708			gpiod_set_value_cansleep(par->reset, 0);
   709			udelay(4);
   710		}
   711	
   712		if (par->vbat_reg) {
   713			ret = regulator_enable(par->vbat_reg);
   714			if (ret) {
   715				dev_err(dev, "failed to enable VBAT: %d\n", ret);
   716				goto reset_oled_error;
   717			}
   718		}
   719	
   720		ret = ssd1307fb_init(par);
   721		if (ret)
   722			goto regulator_enable_error;
   723	
   724		ret = register_framebuffer(info);
   725		if (ret) {
   726			dev_err(dev, "Couldn't register the framebuffer\n");
   727			goto panel_init_error;
   728		}
   729	
   730		snprintf(bl_name, sizeof(bl_name), "ssd1307fb%d", info->node);
   731		bl = backlight_device_register(bl_name, dev, par, &ssd1307fb_bl_ops,
   732					       NULL);
   733		if (IS_ERR(bl)) {
   734			ret = PTR_ERR(bl);
   735			dev_err(dev, "unable to register backlight device: %d\n", ret);
   736			goto bl_init_error;
   737		}
   738	
   739		bl->props.brightness = par->contrast;
   740		bl->props.max_brightness = MAX_CONTRAST;
   741		info->bl_dev = bl;
   742	
   743		dev_info(dev, "fb%d: %s framebuffer device registered, using %d bytes of video memory\n", info->node, info->fix.id, vmem_size);
   744	
   745		return 0;
   746	
   747	bl_init_error:
   748		unregister_framebuffer(info);
   749	panel_init_error:
   750		if (par->device_info->need_pwm) {
   751			pwm_disable(par->pwm);
   752			pwm_put(par->pwm);
   753		}
   754	regulator_enable_error:
   755		if (par->vbat_reg)
   756			regulator_disable(par->vbat_reg);
   757	reset_oled_error:
   758		fb_deferred_io_cleanup(info);
   759	fb_alloc_error:
   760		framebuffer_release(info);
   761		return ret;
   762	}
   763	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

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

  parent reply	other threads:[~2020-05-13 16:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-13 11:51 [PATCH] video: fbdev: ssd1307fb: Added support to Column offset Rodrigo Rolim Mendes de Alencar
2020-05-13 11:51 ` Rodrigo Rolim Mendes de Alencar
2020-05-13 13:45 ` Geert Uytterhoeven
2020-05-13 13:45   ` Geert Uytterhoeven
2020-05-13 15:03 ` Andy Shevchenko
2020-05-13 15:03   ` Andy Shevchenko
2020-05-13 16:32 ` kbuild test robot [this message]
2020-05-13 16:32   ` kbuild test robot
2020-05-13 16:32   ` kbuild test robot

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=202005140013.2JUBkZkK%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=455.rodrigo.alencar@gmail.com \
    --cc=alencar.fmce@imbel.gov.br \
    --cc=andy.shevchenko@gmail.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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 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.