@@ -1354,14 +1354,14 @@ int drm_fb_helper_set_par(struct fb_info *info)
1354
1354
}
1355
1355
EXPORT_SYMBOL (drm_fb_helper_set_par );
1356
1356
1357
- static void pan_set (struct drm_fb_helper * fb_helper , int x , int y )
1357
+ static void pan_set (struct drm_fb_helper * fb_helper , int dx , int dy )
1358
1358
{
1359
1359
struct drm_mode_set * mode_set ;
1360
1360
1361
1361
mutex_lock (& fb_helper -> client .modeset_mutex );
1362
1362
drm_client_for_each_modeset (mode_set , & fb_helper -> client ) {
1363
- mode_set -> x = x ;
1364
- mode_set -> y = y ;
1363
+ mode_set -> x += dx ;
1364
+ mode_set -> y += dy ;
1365
1365
}
1366
1366
mutex_unlock (& fb_helper -> client .modeset_mutex );
1367
1367
}
@@ -1370,16 +1370,18 @@ static int pan_display_atomic(struct fb_var_screeninfo *var,
1370
1370
struct fb_info * info )
1371
1371
{
1372
1372
struct drm_fb_helper * fb_helper = info -> par ;
1373
- int ret ;
1373
+ int ret , dx , dy ;
1374
1374
1375
- pan_set (fb_helper , var -> xoffset , var -> yoffset );
1375
+ dx = var -> xoffset - info -> var .xoffset ;
1376
+ dy = var -> yoffset - info -> var .yoffset ;
1377
+ pan_set (fb_helper , dx , dy );
1376
1378
1377
1379
ret = drm_client_modeset_commit_locked (& fb_helper -> client );
1378
1380
if (!ret ) {
1379
1381
info -> var .xoffset = var -> xoffset ;
1380
1382
info -> var .yoffset = var -> yoffset ;
1381
1383
} else
1382
- pan_set (fb_helper , info -> var . xoffset , info -> var . yoffset );
1384
+ pan_set (fb_helper , - dx , - dy );
1383
1385
1384
1386
return ret ;
1385
1387
}
0 commit comments