diff options
author | Kevin Brace <kevinbrace@gmx.com> | 2017-07-04 13:16:02 -0500 |
---|---|---|
committer | Kevin Brace <kevinbrace@gmx.com> | 2017-07-04 13:16:02 -0500 |
commit | b7281b509bf267049951992bfeffc0f6541ba5a1 (patch) | |
tree | 32c676fa5d50a178a52cf1b5ef7849dedd674ff6 | |
parent | 5331a19fda4ee75ff3699d53921d85d3bc950ba7 (diff) |
Added via_dvp0_set_data_drive_strength
This is an inline function.
Signed-off-by: Kevin Brace <kevinbrace@gmx.com>
-rw-r--r-- | drivers/gpu/drm/via/crtc_hw.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/gpu/drm/via/crtc_hw.h b/drivers/gpu/drm/via/crtc_hw.h index f9a7588f57a1..af17c05c3ec8 100644 --- a/drivers/gpu/drm/via/crtc_hw.h +++ b/drivers/gpu/drm/via/crtc_hw.h @@ -132,6 +132,25 @@ via_dvp0_set_clock_drive_strength(void __iomem *regs, } /* + * Sets DVP0 (Digital Video Port 0) data I/O pads drive strength. + */ +static inline void +via_dvp0_set_data_drive_strength(void __iomem *regs, + u8 data_drive_strength) +{ + /* 3C5.1B[1] - DVP0 Data Drive Strength Bit [0] */ + svga_wseq_mask(regs, 0x1B, + data_drive_strength << 1, BIT(1)); + + /* 3C5.2A[5] - DVP0 Data Drive Strength Bit [1] */ + svga_wseq_mask(regs, 0x2A, + data_drive_strength << 4, BIT(5)); + + DRM_DEBUG_KMS("DVP0 Data I/O Pads Drive Strength: %lu\n", + data_drive_strength & (BIT(1) | BIT(0))); +} + +/* * Sets the display source of DVP0 (Digital Video Port 0) interface. */ static inline void |