disp.c (09e1b78aab5715eacab02e4047c7a47d72f6a1e9) disp.c (ccd27db8c731817ef36e75de2b5fdc2e79550213)
1/*
2 * Copyright 2011 Red Hat Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the

--- 1798 unchanged lines hidden (view full) ---

1807 nv50_disp_atomic_commit_tail(state);
1808}
1809
1810static int
1811nv50_disp_atomic_commit(struct drm_device *dev,
1812 struct drm_atomic_state *state, bool nonblock)
1813{
1814 struct nouveau_drm *drm = nouveau_drm(dev);
1/*
2 * Copyright 2011 Red Hat Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the

--- 1798 unchanged lines hidden (view full) ---

1807 nv50_disp_atomic_commit_tail(state);
1808}
1809
1810static int
1811nv50_disp_atomic_commit(struct drm_device *dev,
1812 struct drm_atomic_state *state, bool nonblock)
1813{
1814 struct nouveau_drm *drm = nouveau_drm(dev);
1815 struct nv50_disp *disp = nv50_disp(dev);
1816 struct drm_plane_state *new_plane_state;
1817 struct drm_plane *plane;
1818 struct drm_crtc *crtc;
1819 bool active = false;
1820 int ret, i;
1821
1822 ret = pm_runtime_get_sync(dev->dev);
1823 if (ret < 0 && ret != -EACCES)

--- 18 unchanged lines hidden (view full) ---

1842 ret = drm_atomic_helper_swap_state(state, true);
1843 if (ret)
1844 goto err_cleanup;
1845
1846 for_each_new_plane_in_state(state, plane, new_plane_state, i) {
1847 struct nv50_wndw_atom *asyw = nv50_wndw_atom(new_plane_state);
1848 struct nv50_wndw *wndw = nv50_wndw(plane);
1849
1815 struct drm_plane_state *new_plane_state;
1816 struct drm_plane *plane;
1817 struct drm_crtc *crtc;
1818 bool active = false;
1819 int ret, i;
1820
1821 ret = pm_runtime_get_sync(dev->dev);
1822 if (ret < 0 && ret != -EACCES)

--- 18 unchanged lines hidden (view full) ---

1841 ret = drm_atomic_helper_swap_state(state, true);
1842 if (ret)
1843 goto err_cleanup;
1844
1845 for_each_new_plane_in_state(state, plane, new_plane_state, i) {
1846 struct nv50_wndw_atom *asyw = nv50_wndw_atom(new_plane_state);
1847 struct nv50_wndw *wndw = nv50_wndw(plane);
1848
1850 if (asyw->set.image) {
1851 asyw->ntfy.handle = wndw->wndw.sync.handle;
1852 asyw->ntfy.offset = wndw->ntfy;
1853 asyw->ntfy.awaken = false;
1854 asyw->set.ntfy = true;
1855 nouveau_bo_wr32(disp->sync, wndw->ntfy / 4, 0x00000000);
1856 wndw->ntfy ^= 0x10;
1857 }
1849 if (asyw->set.image)
1850 nv50_wndw_ntfy_enable(wndw, asyw);
1858 }
1859
1860 drm_atomic_state_get(state);
1861
1862 if (nonblock)
1863 queue_work(system_unbound_wq, &state->commit_work);
1864 else
1865 nv50_disp_atomic_commit_tail(state);

--- 353 unchanged lines hidden ---
1851 }
1852
1853 drm_atomic_state_get(state);
1854
1855 if (nonblock)
1856 queue_work(system_unbound_wq, &state->commit_work);
1857 else
1858 nv50_disp_atomic_commit_tail(state);

--- 353 unchanged lines hidden ---