mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-14 15:54:15 +08:00
drm-misc-fixes for v4.19-rc5:
- Fix crash in vgem in drm_drv_uses_atomic_modeset. - Allow atomic drivers that don't set DRIVER_ATOMIC to create debugfs entries. - Fix compiler warning for unused connector_funcs. - Fix null pointer deref on UDL unplug. - Disable DRM support for sun4i's R40 for now. (Not all patches went in for v4.19, so it has to wait a cycle.) - NULL-terminate the of_device_id table in pl111. - Make sure vc4 NV12 planar format works when displaying an unscaled fb. -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEuXvWqAysSYEJGuVH/lWMcqZwE8MFAluiXbsACgkQ/lWMcqZw E8P9MBAAjmltMZr9KbmtksYSDFHVldiTqwiToPDl4iZPmMDKCQQP14apJhqwFqdO pa+N3n7zrbR9PTUcPxt2pfT3I8J7vCGARMc66wnlPbrKDes+dkKm7KqCRFJGcyrD faN++FGfTBn3rsLo1iM7mLOMVE+72B5gdjcxIqewEXSxWjX9ED6N7JaVR7krcQbs MVT/ENvLZTRVCYla+eey+wQoZR/bh/E7HtuvqsLRaQOGSk6Go2gBzEiZiWfT+6sS BzEXaYKL61AKhsh68oiPB2elxVWrnPyf3liLAzoTF0MhXuGxmlu9F50jByQvDuz8 lAzm53Hg5uFj6Ca1E81I1UDy2i5IAgaiRXGfVikeWwTsBiLgxhcRDGbQPki2rHRu 1Cs+D/F1gE94WqWhu9ydV2rU5X/5/NdDvYH0LkeD5jI9VcB8KtK89r3zXkxh3f9B BfhVOGq3RTVgdAFFPujRrZCTQyyNW8zo51mYmncVykB//9awWE5nQcK3HGLh2wvL 0Oar5oJE3UlHa5No91zMyxmJIxZVp7SE/4A7+ih1LGTu5SyaT9K718pAgv2lpakd HMhgF+338rCqMfL7TFqYJ2N+srXTzNRruHXdElcSg1wHbfEFejyMt0KRtv0x32qE 9IJ1CFuJVWgQ5pXu5zbj+NLKo5kR4ow0BCvsk7HCWiqkJ5N+pY8= =bZgz -----END PGP SIGNATURE----- Merge tag 'drm-misc-fixes-2018-09-19' of git://anongit.freedesktop.org/drm/drm-misc into drm-fixes drm-misc-fixes for v4.19-rc5: - Fix crash in vgem in drm_drv_uses_atomic_modeset. - Allow atomic drivers that don't set DRIVER_ATOMIC to create debugfs entries. - Fix compiler warning for unused connector_funcs. - Fix null pointer deref on UDL unplug. - Disable DRM support for sun4i's R40 for now. (Not all patches went in for v4.19, so it has to wait a cycle.) - NULL-terminate the of_device_id table in pl111. - Make sure vc4 NV12 planar format works when displaying an unscaled fb. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/dda393bb-f13f-8d36-711b-cacfc578e5a3@linux.intel.com
This commit is contained in:
commit
d5b3a31b1c
@ -2067,7 +2067,7 @@ static void __drm_state_dump(struct drm_device *dev, struct drm_printer *p,
|
||||
struct drm_connector *connector;
|
||||
struct drm_connector_list_iter conn_iter;
|
||||
|
||||
if (!drm_core_check_feature(dev, DRIVER_ATOMIC))
|
||||
if (!drm_drv_uses_atomic_modeset(dev))
|
||||
return;
|
||||
|
||||
list_for_each_entry(plane, &config->plane_list, head) {
|
||||
|
@ -151,7 +151,7 @@ int drm_debugfs_init(struct drm_minor *minor, int minor_id,
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (drm_core_check_feature(dev, DRIVER_ATOMIC)) {
|
||||
if (drm_drv_uses_atomic_modeset(dev)) {
|
||||
ret = drm_atomic_debugfs_init(minor);
|
||||
if (ret) {
|
||||
DRM_ERROR("Failed to create atomic debugfs files\n");
|
||||
|
@ -2370,7 +2370,6 @@ static int drm_pick_crtcs(struct drm_fb_helper *fb_helper,
|
||||
{
|
||||
int c, o;
|
||||
struct drm_connector *connector;
|
||||
const struct drm_connector_helper_funcs *connector_funcs;
|
||||
int my_score, best_score, score;
|
||||
struct drm_fb_helper_crtc **crtcs, *crtc;
|
||||
struct drm_fb_helper_connector *fb_helper_conn;
|
||||
@ -2399,8 +2398,6 @@ static int drm_pick_crtcs(struct drm_fb_helper *fb_helper,
|
||||
if (drm_has_preferred_mode(fb_helper_conn, width, height))
|
||||
my_score++;
|
||||
|
||||
connector_funcs = connector->helper_private;
|
||||
|
||||
/*
|
||||
* select a crtc for this connector and then attempt to configure
|
||||
* remaining connectors
|
||||
|
@ -111,7 +111,8 @@ static int vexpress_muxfpga_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
static const struct of_device_id vexpress_muxfpga_match[] = {
|
||||
{ .compatible = "arm,vexpress-muxfpga", }
|
||||
{ .compatible = "arm,vexpress-muxfpga", },
|
||||
{}
|
||||
};
|
||||
|
||||
static struct platform_driver vexpress_muxfpga_driver = {
|
||||
|
@ -418,7 +418,6 @@ static const struct of_device_id sun4i_drv_of_table[] = {
|
||||
{ .compatible = "allwinner,sun8i-a33-display-engine" },
|
||||
{ .compatible = "allwinner,sun8i-a83t-display-engine" },
|
||||
{ .compatible = "allwinner,sun8i-h3-display-engine" },
|
||||
{ .compatible = "allwinner,sun8i-r40-display-engine" },
|
||||
{ .compatible = "allwinner,sun8i-v3s-display-engine" },
|
||||
{ .compatible = "allwinner,sun9i-a80-display-engine" },
|
||||
{ }
|
||||
|
@ -398,7 +398,6 @@ static struct regmap_config sun8i_hdmi_phy_regmap_config = {
|
||||
|
||||
static const struct sun8i_hdmi_phy_variant sun50i_a64_hdmi_phy = {
|
||||
.has_phy_clk = true,
|
||||
.has_second_pll = true,
|
||||
.phy_init = &sun8i_hdmi_phy_init_h3,
|
||||
.phy_disable = &sun8i_hdmi_phy_disable_h3,
|
||||
.phy_config = &sun8i_hdmi_phy_config_h3,
|
||||
|
@ -545,22 +545,6 @@ static const struct sun8i_mixer_cfg sun8i_h3_mixer0_cfg = {
|
||||
.vi_num = 1,
|
||||
};
|
||||
|
||||
static const struct sun8i_mixer_cfg sun8i_r40_mixer0_cfg = {
|
||||
.ccsc = 0,
|
||||
.mod_rate = 297000000,
|
||||
.scaler_mask = 0xf,
|
||||
.ui_num = 3,
|
||||
.vi_num = 1,
|
||||
};
|
||||
|
||||
static const struct sun8i_mixer_cfg sun8i_r40_mixer1_cfg = {
|
||||
.ccsc = 1,
|
||||
.mod_rate = 297000000,
|
||||
.scaler_mask = 0x3,
|
||||
.ui_num = 1,
|
||||
.vi_num = 1,
|
||||
};
|
||||
|
||||
static const struct sun8i_mixer_cfg sun8i_v3s_mixer_cfg = {
|
||||
.vi_num = 2,
|
||||
.ui_num = 1,
|
||||
@ -582,14 +566,6 @@ static const struct of_device_id sun8i_mixer_of_table[] = {
|
||||
.compatible = "allwinner,sun8i-h3-de2-mixer-0",
|
||||
.data = &sun8i_h3_mixer0_cfg,
|
||||
},
|
||||
{
|
||||
.compatible = "allwinner,sun8i-r40-de2-mixer-0",
|
||||
.data = &sun8i_r40_mixer0_cfg,
|
||||
},
|
||||
{
|
||||
.compatible = "allwinner,sun8i-r40-de2-mixer-1",
|
||||
.data = &sun8i_r40_mixer1_cfg,
|
||||
},
|
||||
{
|
||||
.compatible = "allwinner,sun8i-v3s-de2-mixer",
|
||||
.data = &sun8i_v3s_mixer_cfg,
|
||||
|
@ -253,7 +253,6 @@ static int sun8i_tcon_top_remove(struct platform_device *pdev)
|
||||
|
||||
/* sun4i_drv uses this list to check if a device node is a TCON TOP */
|
||||
const struct of_device_id sun8i_tcon_top_of_table[] = {
|
||||
{ .compatible = "allwinner,sun8i-r40-tcon-top" },
|
||||
{ /* sentinel */ }
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, sun8i_tcon_top_of_table);
|
||||
|
@ -432,9 +432,11 @@ static void udl_fbdev_destroy(struct drm_device *dev,
|
||||
{
|
||||
drm_fb_helper_unregister_fbi(&ufbdev->helper);
|
||||
drm_fb_helper_fini(&ufbdev->helper);
|
||||
drm_framebuffer_unregister_private(&ufbdev->ufb.base);
|
||||
drm_framebuffer_cleanup(&ufbdev->ufb.base);
|
||||
drm_gem_object_put_unlocked(&ufbdev->ufb.obj->base);
|
||||
if (ufbdev->ufb.obj) {
|
||||
drm_framebuffer_unregister_private(&ufbdev->ufb.base);
|
||||
drm_framebuffer_cleanup(&ufbdev->ufb.base);
|
||||
drm_gem_object_put_unlocked(&ufbdev->ufb.obj->base);
|
||||
}
|
||||
}
|
||||
|
||||
int udl_fbdev_init(struct drm_device *dev)
|
||||
|
@ -297,6 +297,9 @@ static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state)
|
||||
vc4_state->y_scaling[0] = vc4_get_scaling_mode(vc4_state->src_h[0],
|
||||
vc4_state->crtc_h);
|
||||
|
||||
vc4_state->is_unity = (vc4_state->x_scaling[0] == VC4_SCALING_NONE &&
|
||||
vc4_state->y_scaling[0] == VC4_SCALING_NONE);
|
||||
|
||||
if (num_planes > 1) {
|
||||
vc4_state->is_yuv = true;
|
||||
|
||||
@ -312,24 +315,17 @@ static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state)
|
||||
vc4_get_scaling_mode(vc4_state->src_h[1],
|
||||
vc4_state->crtc_h);
|
||||
|
||||
/* YUV conversion requires that scaling be enabled,
|
||||
* even on a plane that's otherwise 1:1. Choose TPZ
|
||||
* for simplicity.
|
||||
/* YUV conversion requires that horizontal scaling be enabled,
|
||||
* even on a plane that's otherwise 1:1. Looks like only PPF
|
||||
* works in that case, so let's pick that one.
|
||||
*/
|
||||
if (vc4_state->x_scaling[0] == VC4_SCALING_NONE)
|
||||
vc4_state->x_scaling[0] = VC4_SCALING_TPZ;
|
||||
if (vc4_state->y_scaling[0] == VC4_SCALING_NONE)
|
||||
vc4_state->y_scaling[0] = VC4_SCALING_TPZ;
|
||||
if (vc4_state->is_unity)
|
||||
vc4_state->x_scaling[0] = VC4_SCALING_PPF;
|
||||
} else {
|
||||
vc4_state->x_scaling[1] = VC4_SCALING_NONE;
|
||||
vc4_state->y_scaling[1] = VC4_SCALING_NONE;
|
||||
}
|
||||
|
||||
vc4_state->is_unity = (vc4_state->x_scaling[0] == VC4_SCALING_NONE &&
|
||||
vc4_state->y_scaling[0] == VC4_SCALING_NONE &&
|
||||
vc4_state->x_scaling[1] == VC4_SCALING_NONE &&
|
||||
vc4_state->y_scaling[1] == VC4_SCALING_NONE);
|
||||
|
||||
/* No configuring scaling on the cursor plane, since it gets
|
||||
non-vblank-synced updates, and scaling requires requires
|
||||
LBM changes which have to be vblank-synced.
|
||||
@ -672,7 +668,10 @@ static int vc4_plane_mode_set(struct drm_plane *plane,
|
||||
vc4_dlist_write(vc4_state, SCALER_CSC2_ITR_R_601_5);
|
||||
}
|
||||
|
||||
if (!vc4_state->is_unity) {
|
||||
if (vc4_state->x_scaling[0] != VC4_SCALING_NONE ||
|
||||
vc4_state->x_scaling[1] != VC4_SCALING_NONE ||
|
||||
vc4_state->y_scaling[0] != VC4_SCALING_NONE ||
|
||||
vc4_state->y_scaling[1] != VC4_SCALING_NONE) {
|
||||
/* LBM Base Address. */
|
||||
if (vc4_state->y_scaling[0] != VC4_SCALING_NONE ||
|
||||
vc4_state->y_scaling[1] != VC4_SCALING_NONE) {
|
||||
|
@ -675,7 +675,7 @@ static inline bool drm_core_check_feature(struct drm_device *dev, int feature)
|
||||
static inline bool drm_drv_uses_atomic_modeset(struct drm_device *dev)
|
||||
{
|
||||
return drm_core_check_feature(dev, DRIVER_ATOMIC) ||
|
||||
dev->mode_config.funcs->atomic_commit != NULL;
|
||||
(dev->mode_config.funcs && dev->mode_config.funcs->atomic_commit != NULL);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user