Commit ba25b50d authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'drm-fixes-2019-04-24' of git://anongit.freedesktop.org/drm/drm

Pull drm regression fixes from Dave Airlie:
 "We interrupt your regularly scheduled drm fixes for a regression
  special.

  The first is for a fix in i915 that had unexpected side effects
  fallout in the userspace X.org modesetting driver where X would no
  longer start. I got tired of the nitpicking and issued a large hammer
  on it. The X.org driver is buggy, but blackscreen regressions are
  worse.

  The second was an oversight that myself and Gerd should have noticed
  better, Gerd is trying to fix this properly, but the regression is too
  large to leave, even if the original behaviour is bad in some cases,
  it's clearly bad to break a bunch of working use cases.

  I'll likely have a regular fixes pull later, but I really wanted to
  highlight these"

* tag 'drm-fixes-2019-04-24' of git://anongit.freedesktop.org/drm/drm:
  Revert "drm/virtio: drop prime import/export callbacks"
  Revert "drm/i915/fbdev: Actually configure untiled displays"
parents 12a54b15 a0cecc23
...@@ -338,8 +338,8 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper, ...@@ -338,8 +338,8 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
bool *enabled, int width, int height) bool *enabled, int width, int height)
{ {
struct drm_i915_private *dev_priv = to_i915(fb_helper->dev); struct drm_i915_private *dev_priv = to_i915(fb_helper->dev);
unsigned long conn_configured, conn_seq, mask;
unsigned int count = min(fb_helper->connector_count, BITS_PER_LONG); unsigned int count = min(fb_helper->connector_count, BITS_PER_LONG);
unsigned long conn_configured, conn_seq;
int i, j; int i, j;
bool *save_enabled; bool *save_enabled;
bool fallback = true, ret = true; bool fallback = true, ret = true;
...@@ -357,9 +357,10 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper, ...@@ -357,9 +357,10 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
drm_modeset_backoff(&ctx); drm_modeset_backoff(&ctx);
memcpy(save_enabled, enabled, count); memcpy(save_enabled, enabled, count);
conn_seq = GENMASK(count - 1, 0); mask = GENMASK(count - 1, 0);
conn_configured = 0; conn_configured = 0;
retry: retry:
conn_seq = conn_configured;
for (i = 0; i < count; i++) { for (i = 0; i < count; i++) {
struct drm_fb_helper_connector *fb_conn; struct drm_fb_helper_connector *fb_conn;
struct drm_connector *connector; struct drm_connector *connector;
...@@ -372,8 +373,7 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper, ...@@ -372,8 +373,7 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
if (conn_configured & BIT(i)) if (conn_configured & BIT(i))
continue; continue;
/* First pass, only consider tiled connectors */ if (conn_seq == 0 && !connector->has_tile)
if (conn_seq == GENMASK(count - 1, 0) && !connector->has_tile)
continue; continue;
if (connector->status == connector_status_connected) if (connector->status == connector_status_connected)
...@@ -477,10 +477,8 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper, ...@@ -477,10 +477,8 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
conn_configured |= BIT(i); conn_configured |= BIT(i);
} }
if (conn_configured != conn_seq) { /* repeat until no more are found */ if ((conn_configured & mask) != mask && conn_configured != conn_seq)
conn_seq = conn_configured;
goto retry; goto retry;
}
/* /*
* If the BIOS didn't enable everything it could, fall back to have the * If the BIOS didn't enable everything it could, fall back to have the
......
...@@ -205,10 +205,14 @@ static struct drm_driver driver = { ...@@ -205,10 +205,14 @@ static struct drm_driver driver = {
#if defined(CONFIG_DEBUG_FS) #if defined(CONFIG_DEBUG_FS)
.debugfs_init = virtio_gpu_debugfs_init, .debugfs_init = virtio_gpu_debugfs_init,
#endif #endif
.prime_handle_to_fd = drm_gem_prime_handle_to_fd,
.prime_fd_to_handle = drm_gem_prime_fd_to_handle,
.gem_prime_export = drm_gem_prime_export, .gem_prime_export = drm_gem_prime_export,
.gem_prime_import = drm_gem_prime_import, .gem_prime_import = drm_gem_prime_import,
.gem_prime_pin = virtgpu_gem_prime_pin, .gem_prime_pin = virtgpu_gem_prime_pin,
.gem_prime_unpin = virtgpu_gem_prime_unpin, .gem_prime_unpin = virtgpu_gem_prime_unpin,
.gem_prime_get_sg_table = virtgpu_gem_prime_get_sg_table,
.gem_prime_import_sg_table = virtgpu_gem_prime_import_sg_table,
.gem_prime_vmap = virtgpu_gem_prime_vmap, .gem_prime_vmap = virtgpu_gem_prime_vmap,
.gem_prime_vunmap = virtgpu_gem_prime_vunmap, .gem_prime_vunmap = virtgpu_gem_prime_vunmap,
.gem_prime_mmap = virtgpu_gem_prime_mmap, .gem_prime_mmap = virtgpu_gem_prime_mmap,
......
...@@ -354,6 +354,10 @@ int virtio_gpu_object_wait(struct virtio_gpu_object *bo, bool no_wait); ...@@ -354,6 +354,10 @@ int virtio_gpu_object_wait(struct virtio_gpu_object *bo, bool no_wait);
/* virtgpu_prime.c */ /* virtgpu_prime.c */
int virtgpu_gem_prime_pin(struct drm_gem_object *obj); int virtgpu_gem_prime_pin(struct drm_gem_object *obj);
void virtgpu_gem_prime_unpin(struct drm_gem_object *obj); void virtgpu_gem_prime_unpin(struct drm_gem_object *obj);
struct sg_table *virtgpu_gem_prime_get_sg_table(struct drm_gem_object *obj);
struct drm_gem_object *virtgpu_gem_prime_import_sg_table(
struct drm_device *dev, struct dma_buf_attachment *attach,
struct sg_table *sgt);
void *virtgpu_gem_prime_vmap(struct drm_gem_object *obj); void *virtgpu_gem_prime_vmap(struct drm_gem_object *obj);
void virtgpu_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr); void virtgpu_gem_prime_vunmap(struct drm_gem_object *obj, void *vaddr);
int virtgpu_gem_prime_mmap(struct drm_gem_object *obj, int virtgpu_gem_prime_mmap(struct drm_gem_object *obj,
......
...@@ -39,6 +39,18 @@ void virtgpu_gem_prime_unpin(struct drm_gem_object *obj) ...@@ -39,6 +39,18 @@ void virtgpu_gem_prime_unpin(struct drm_gem_object *obj)
WARN_ONCE(1, "not implemented"); WARN_ONCE(1, "not implemented");
} }
struct sg_table *virtgpu_gem_prime_get_sg_table(struct drm_gem_object *obj)
{
return ERR_PTR(-ENODEV);
}
struct drm_gem_object *virtgpu_gem_prime_import_sg_table(
struct drm_device *dev, struct dma_buf_attachment *attach,
struct sg_table *table)
{
return ERR_PTR(-ENODEV);
}
void *virtgpu_gem_prime_vmap(struct drm_gem_object *obj) void *virtgpu_gem_prime_vmap(struct drm_gem_object *obj)
{ {
struct virtio_gpu_object *bo = gem_to_virtio_gpu_obj(obj); struct virtio_gpu_object *bo = gem_to_virtio_gpu_obj(obj);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment