mirror of
https://github.com/torvalds/linux.git
synced 2026-04-27 19:12:29 -04:00
The drm_info() function requires the drm/drm_print.h header to be included
first:
In file included from drivers/gpu/drm/pl111/pl111_nomadik.c:7:
drivers/gpu/drm/pl111/pl111_nomadik.h:11:32: error: 'struct drm_device' declared inside parameter list will not be visible outside of this definition or declaration [-Werror]
11 | void pl111_nomadik_init(struct drm_device *dev);
| ^~~~~~~~~~
drivers/gpu/drm/pl111/pl111_nomadik.c: In function 'pl111_nomadik_init':
drivers/gpu/drm/pl111/pl111_nomadik.c:34:9: error: implicit declaration of function 'drm_info'; did you mean 'pr_info'? [-Wimplicit-function-declaration]
34 | drm_info(dev, "set Nomadik PMU mux to CLCD mode\n");
| ^~~~~~~~
| pr_info
Fixes: a1542b8ca6 ("drm: pl111: replace dev_* print functions with drm_* variants")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Eslam Khafagy <eslam.medhat1993@gmail.com>
Signed-off-by: Linus Walleij <linusw@kernel.org>
Link: https://patch.msgid.link/20251223214915.503913-1-arnd@kernel.org
38 lines
986 B
C
38 lines
986 B
C
// SPDX-License-Identifier: GPL-2.0+
|
|
#include <linux/device.h>
|
|
#include <linux/regmap.h>
|
|
#include <linux/mfd/syscon.h>
|
|
#include <linux/bitops.h>
|
|
#include <linux/module.h>
|
|
#include <drm/drm_print.h>
|
|
#include "pl111_nomadik.h"
|
|
|
|
#define PMU_CTRL_OFFSET 0x0000
|
|
#define PMU_CTRL_LCDNDIF BIT(26)
|
|
|
|
void pl111_nomadik_init(struct drm_device *dev)
|
|
{
|
|
struct regmap *pmu_regmap;
|
|
|
|
/*
|
|
* Just bail out of this is not found, we could be running
|
|
* multiplatform on something else than Nomadik.
|
|
*/
|
|
pmu_regmap =
|
|
syscon_regmap_lookup_by_compatible("stericsson,nomadik-pmu");
|
|
if (IS_ERR(pmu_regmap))
|
|
return;
|
|
|
|
/*
|
|
* This bit in the PMU controller multiplexes the two graphics
|
|
* blocks found in the Nomadik STn8815. The other one is called
|
|
* MDIF (Master Display Interface) and gets muxed out here.
|
|
*/
|
|
regmap_update_bits(pmu_regmap,
|
|
PMU_CTRL_OFFSET,
|
|
PMU_CTRL_LCDNDIF,
|
|
0);
|
|
drm_info(dev, "set Nomadik PMU mux to CLCD mode\n");
|
|
}
|
|
EXPORT_SYMBOL_GPL(pl111_nomadik_init);
|