diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2017-09-08 15:47:06 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2017-09-11 00:58:16 +0300 |
commit | fa83306cd104d24793a9a833f7d8a4c74c81809a (patch) | |
tree | 53368586ae9992216af24c88651668fd36bcdfdb /drivers/gpu/drm/pl111/pl111_drm.h | |
parent | 001485d5255cb17e99aa9e3712e43865b92d6adc (diff) | |
download | linux-fa83306cd104d24793a9a833f7d8a4c74c81809a.tar.xz |
drm/pl111: Enable PL110 variant
We detect and enable the use of the PL110 variant, an earlier
incarnation of PL111. The only real difference is that the
control and interrupt enable registers have swapped place.
The Versatile AB and Versatile PB have a variant inbetween
PL110 and PL111, it is PL110 but they have already swapped the
two registers so those two need a bit of special handling.
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20170908124709.4758-4-linus.walleij@linaro.org
Diffstat (limited to 'drivers/gpu/drm/pl111/pl111_drm.h')
-rw-r--r-- | drivers/gpu/drm/pl111/pl111_drm.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/gpu/drm/pl111/pl111_drm.h b/drivers/gpu/drm/pl111/pl111_drm.h index 000534d85b43..b380a7b4fb58 100644 --- a/drivers/gpu/drm/pl111/pl111_drm.h +++ b/drivers/gpu/drm/pl111/pl111_drm.h @@ -31,6 +31,20 @@ struct drm_minor; +/** + * struct pl111_variant_data - encodes IP differences + * @name: the name of this variant + * @is_pl110: this is the early PL110 variant + * @formats: array of supported pixel formats on this variant + * @nformats: the length of the array of supported pixel formats + */ +struct pl111_variant_data { + const char *name; + bool is_pl110; + const u32 *formats; + unsigned int nformats; +}; + struct pl111_drm_dev_private { struct drm_device *drm; @@ -41,6 +55,8 @@ struct pl111_drm_dev_private { struct drm_fbdev_cma *fbdev; void *regs; + u32 ienb; + u32 ctrl; /* The pixel clock (a reference to our clock divider off of CLCDCLK). */ struct clk *clk; /* pl111's internal clock divider. */ @@ -49,6 +65,7 @@ struct pl111_drm_dev_private { * subsystem and pl111_display_enable(). */ spinlock_t tim2_lock; + const struct pl111_variant_data *variant; }; int pl111_display_init(struct drm_device *dev); |