drm/ast: Upcast from DRM device to ast structure via to_ast_private()
All upcasting from struct drm_device to struct ast_private is now performed via to_ast_private(). Using struct drm_device.dev_private is deprecated. The ast variable in ast_crtc_helper_atomic_check() is unused, so removed it. v2: * fix typo in commit message Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200617080340.29584-4-tzimmermann@suse.de
This commit is contained in:
@@ -39,7 +39,7 @@ static void ast_post_chip_2500(struct drm_device *dev);
|
||||
|
||||
void ast_enable_vga(struct drm_device *dev)
|
||||
{
|
||||
struct ast_private *ast = dev->dev_private;
|
||||
struct ast_private *ast = to_ast_private(dev);
|
||||
|
||||
ast_io_write8(ast, AST_IO_VGA_ENABLE_PORT, 0x01);
|
||||
ast_io_write8(ast, AST_IO_MISC_PORT_WRITE, 0x01);
|
||||
@@ -47,7 +47,7 @@ void ast_enable_vga(struct drm_device *dev)
|
||||
|
||||
void ast_enable_mmio(struct drm_device *dev)
|
||||
{
|
||||
struct ast_private *ast = dev->dev_private;
|
||||
struct ast_private *ast = to_ast_private(dev);
|
||||
|
||||
ast_set_index_reg(ast, AST_IO_CRTC_PORT, 0xa1, 0x06);
|
||||
}
|
||||
@@ -55,7 +55,7 @@ void ast_enable_mmio(struct drm_device *dev)
|
||||
|
||||
bool ast_is_vga_enabled(struct drm_device *dev)
|
||||
{
|
||||
struct ast_private *ast = dev->dev_private;
|
||||
struct ast_private *ast = to_ast_private(dev);
|
||||
u8 ch;
|
||||
|
||||
ch = ast_io_read8(ast, AST_IO_VGA_ENABLE_PORT);
|
||||
@@ -70,7 +70,7 @@ static const u8 extreginfo_ast2300[] = { 0x0f, 0x04, 0x1f, 0xff };
|
||||
static void
|
||||
ast_set_def_ext_reg(struct drm_device *dev)
|
||||
{
|
||||
struct ast_private *ast = dev->dev_private;
|
||||
struct ast_private *ast = to_ast_private(dev);
|
||||
u8 i, index, reg;
|
||||
const u8 *ext_reg_info;
|
||||
|
||||
@@ -272,7 +272,7 @@ cbr_start:
|
||||
|
||||
static void ast_init_dram_reg(struct drm_device *dev)
|
||||
{
|
||||
struct ast_private *ast = dev->dev_private;
|
||||
struct ast_private *ast = to_ast_private(dev);
|
||||
u8 j;
|
||||
u32 data, temp, i;
|
||||
const struct ast_dramstruct *dram_reg_info;
|
||||
@@ -366,7 +366,7 @@ static void ast_init_dram_reg(struct drm_device *dev)
|
||||
void ast_post_gpu(struct drm_device *dev)
|
||||
{
|
||||
u32 reg;
|
||||
struct ast_private *ast = dev->dev_private;
|
||||
struct ast_private *ast = to_ast_private(dev);
|
||||
|
||||
pci_read_config_dword(ast->dev->pdev, 0x04, ®);
|
||||
reg |= 0x3;
|
||||
@@ -1596,7 +1596,7 @@ ddr2_init_start:
|
||||
|
||||
static void ast_post_chip_2300(struct drm_device *dev)
|
||||
{
|
||||
struct ast_private *ast = dev->dev_private;
|
||||
struct ast_private *ast = to_ast_private(dev);
|
||||
struct ast2300_dram_param param;
|
||||
u32 temp;
|
||||
u8 reg;
|
||||
@@ -2028,7 +2028,7 @@ static bool ast_dram_init_2500(struct ast_private *ast)
|
||||
|
||||
void ast_post_chip_2500(struct drm_device *dev)
|
||||
{
|
||||
struct ast_private *ast = dev->dev_private;
|
||||
struct ast_private *ast = to_ast_private(dev);
|
||||
u32 temp;
|
||||
u8 reg;
|
||||
|
||||
|
Reference in New Issue
Block a user