From: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
To: patrik.r.jakobsson@gmail.com
Cc: airlied@gmail.com, daniel@ffwll.ch,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Jiapeng Chong <jiapeng.chong@linux.alibaba.com>,
Abaci Robot <abaci@linux.alibaba.com>
Subject: [PATCH] drm/amd/display: Clean up some inconsistent indenting
Date: Tue, 21 Feb 2023 11:44:45 +0800 [thread overview]
Message-ID: <20230221034445.60034-1-jiapeng.chong@linux.alibaba.com> (raw)
No functional modification involved.
drivers/gpu/drm/gma500/cdv_device.c:218 cdv_errata() warn: inconsistent indenting.
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4126
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
drivers/gpu/drm/gma500/cdv_device.c | 27 ++++++++++++++++-----------
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/gma500/cdv_device.c b/drivers/gpu/drm/gma500/cdv_device.c
index 3e83299113e3..765f359365b9 100644
--- a/drivers/gpu/drm/gma500/cdv_device.c
+++ b/drivers/gpu/drm/gma500/cdv_device.c
@@ -78,7 +78,8 @@ static u32 cdv_get_max_backlight(struct drm_device *dev)
if (max == 0) {
DRM_DEBUG_KMS("LVDS Panel PWM value is 0!\n");
/* i915 does this, I believe which means that we should not
- * smash PWM control as firmware will take control of it. */
+ * smash PWM control as firmware will take control of it.
+ */
return 1;
}
@@ -149,6 +150,7 @@ static inline u32 CDV_MSG_READ32(int domain, uint port, uint offset)
int mcr = (0x10<<24) | (port << 16) | (offset << 8);
uint32_t ret_val = 0;
struct pci_dev *pci_root = pci_get_domain_bus_and_slot(domain, 0, 0);
+
pci_write_config_dword(pci_root, 0xD0, mcr);
pci_read_config_dword(pci_root, 0xD4, &ret_val);
pci_dev_put(pci_root);
@@ -160,6 +162,7 @@ static inline void CDV_MSG_WRITE32(int domain, uint port, uint offset,
{
int mcr = (0x11<<24) | (port << 16) | (offset << 8) | 0xF0;
struct pci_dev *pci_root = pci_get_domain_bus_and_slot(domain, 0, 0);
+
pci_write_config_dword(pci_root, 0xD4, value);
pci_write_config_dword(pci_root, 0xD0, mcr);
pci_dev_put(pci_root);
@@ -180,10 +183,8 @@ static void cdv_init_pm(struct drm_device *dev)
int domain = pci_domain_nr(pdev->bus);
int i;
- dev_priv->apm_base = CDV_MSG_READ32(domain, PSB_PUNIT_PORT,
- PSB_APMBA) & 0xFFFF;
- dev_priv->ospm_base = CDV_MSG_READ32(domain, PSB_PUNIT_PORT,
- PSB_OSPMBA) & 0xFFFF;
+ dev_priv->apm_base = CDV_MSG_READ32(domain, PSB_PUNIT_PORT, PSB_APMBA) & 0xFFFF;
+ dev_priv->ospm_base = CDV_MSG_READ32(domain, PSB_PUNIT_PORT, PSB_OSPMBA) & 0xFFFF;
/* Power status */
pwr_cnt = inl(dev_priv->apm_base + PSB_APM_CMD);
@@ -196,6 +197,7 @@ static void cdv_init_pm(struct drm_device *dev)
/* Wait for the GPU power */
for (i = 0; i < 5; i++) {
u32 pwr_sts = inl(dev_priv->apm_base + PSB_APM_STS);
+
if ((pwr_sts & PSB_PWRGT_GFX_MASK) == 0)
return;
udelay(10);
@@ -215,7 +217,7 @@ static void cdv_errata(struct drm_device *dev)
* Bonus Launch to work around the issue, by degrading
* performance.
*/
- CDV_MSG_WRITE32(pci_domain_nr(pdev->bus), 3, 0x30, 0x08027108);
+ CDV_MSG_WRITE32(pci_domain_nr(pdev->bus), 3, 0x30, 0x08027108);
}
/**
@@ -401,20 +403,21 @@ static int cdv_power_up(struct drm_device *dev)
static void cdv_hotplug_work_func(struct work_struct *work)
{
- struct drm_psb_private *dev_priv = container_of(work, struct drm_psb_private,
+ struct drm_psb_private *dev_priv = container_of(work, struct drm_psb_private,
hotplug_work);
struct drm_device *dev = &dev_priv->dev;
- /* Just fire off a uevent and let userspace tell us what to do */
- drm_helper_hpd_irq_event(dev);
+ /* Just fire off a uevent and let userspace tell us what to do */
+ drm_helper_hpd_irq_event(dev);
}
/* The core driver has received a hotplug IRQ. We are in IRQ context
- so extract the needed information and kick off queued processing */
-
+ * so extract the needed information and kick off queued processing
+ */
static int cdv_hotplug_event(struct drm_device *dev)
{
struct drm_psb_private *dev_priv = to_drm_psb_private(dev);
+
schedule_work(&dev_priv->hotplug_work);
REG_WRITE(PORT_HOTPLUG_STAT, REG_READ(PORT_HOTPLUG_STAT));
return 1;
@@ -424,6 +427,7 @@ static void cdv_hotplug_enable(struct drm_device *dev, bool on)
{
if (on) {
u32 hotplug = REG_READ(PORT_HOTPLUG_EN);
+
hotplug |= HDMIB_HOTPLUG_INT_EN | HDMIC_HOTPLUG_INT_EN |
HDMID_HOTPLUG_INT_EN | CRT_HOTPLUG_INT_EN;
REG_WRITE(PORT_HOTPLUG_EN, hotplug);
@@ -549,6 +553,7 @@ static const struct psb_offset cdv_regmap[2] = {
static int cdv_chip_setup(struct drm_device *dev)
{
struct drm_psb_private *dev_priv = to_drm_psb_private(dev);
+
INIT_WORK(&dev_priv->hotplug_work, cdv_hotplug_work_func);
dev_priv->use_msi = true;
--
2.20.1.7.g153144c
next reply other threads:[~2023-02-21 3:45 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-21 3:44 Jiapeng Chong [this message]
2023-02-23 13:49 ` Alex Deucher
-- strict thread matches above, loose matches on Subject: below --
2024-06-06 9:44 [PATCH] drm/amd/display: clean " Jiapeng Chong
2024-05-24 2:19 Jiapeng Chong
2024-05-24 13:44 ` Alex Deucher
2024-05-11 2:43 Jiapeng Chong
2024-03-22 6:08 Jiapeng Chong
2023-11-17 6:40 Jiapeng Chong
2023-11-10 7:44 Jiapeng Chong
2023-10-19 3:38 Jiapeng Chong
2023-10-19 14:51 ` Alex Deucher
2023-09-08 7:54 Jiapeng Chong
2023-09-11 16:20 ` Hamza Mahfooz
2023-06-02 6:17 Jiapeng Chong
2023-06-02 13:16 ` Alex Deucher
2023-06-02 14:28 ` Hamza Mahfooz
2023-03-22 3:14 [PATCH] drm/amd/display: Clean " Jiapeng Chong
2023-03-22 15:18 ` Hamza Mahfooz
2022-05-12 7:19 [PATCH] drm/amd/display: clean " Jiapeng Chong
2022-05-13 16:57 ` Alex Deucher
2021-11-11 10:03 [PATCH] drm/amd/display: Clean " Jiapeng Chong
2021-11-11 10:08 ` Christian König
2021-11-12 22:55 ` Alex Deucher
2021-11-11 9:58 [PATCH] drm/amd/display: clean " Jiapeng Chong
2021-11-11 10:08 ` Christian König
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=20230221034445.60034-1-jiapeng.chong@linux.alibaba.com \
--to=jiapeng.chong@linux.alibaba.com \
--cc=abaci@linux.alibaba.com \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patrik.r.jakobsson@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®