@@ -207,114 +207,6 @@ int drm_rect_calc_vscale(const struct drm_rect *src,
207
207
}
208
208
EXPORT_SYMBOL (drm_rect_calc_vscale );
209
209
210
- /**
211
- * drm_calc_hscale_relaxed - calculate the horizontal scaling factor
212
- * @src: source window rectangle
213
- * @dst: destination window rectangle
214
- * @min_hscale: minimum allowed horizontal scaling factor
215
- * @max_hscale: maximum allowed horizontal scaling factor
216
- *
217
- * Calculate the horizontal scaling factor as
218
- * (@src width) / (@dst width).
219
- *
220
- * If the calculated scaling factor is below @min_vscale,
221
- * decrease the height of rectangle @dst to compensate.
222
- *
223
- * If the calculated scaling factor is above @max_vscale,
224
- * decrease the height of rectangle @src to compensate.
225
- *
226
- * If the scale is below 1 << 16, round down. If the scale is above
227
- * 1 << 16, round up. This will calculate the scale with the most
228
- * pessimistic limit calculation.
229
- *
230
- * RETURNS:
231
- * The horizontal scaling factor.
232
- */
233
- int drm_rect_calc_hscale_relaxed (struct drm_rect * src ,
234
- struct drm_rect * dst ,
235
- int min_hscale , int max_hscale )
236
- {
237
- int src_w = drm_rect_width (src );
238
- int dst_w = drm_rect_width (dst );
239
- int hscale = drm_calc_scale (src_w , dst_w );
240
-
241
- if (hscale < 0 || dst_w == 0 )
242
- return hscale ;
243
-
244
- if (hscale < min_hscale ) {
245
- int max_dst_w = src_w / min_hscale ;
246
-
247
- drm_rect_adjust_size (dst , max_dst_w - dst_w , 0 );
248
-
249
- return min_hscale ;
250
- }
251
-
252
- if (hscale > max_hscale ) {
253
- int max_src_w = dst_w * max_hscale ;
254
-
255
- drm_rect_adjust_size (src , max_src_w - src_w , 0 );
256
-
257
- return max_hscale ;
258
- }
259
-
260
- return hscale ;
261
- }
262
- EXPORT_SYMBOL (drm_rect_calc_hscale_relaxed );
263
-
264
- /**
265
- * drm_rect_calc_vscale_relaxed - calculate the vertical scaling factor
266
- * @src: source window rectangle
267
- * @dst: destination window rectangle
268
- * @min_vscale: minimum allowed vertical scaling factor
269
- * @max_vscale: maximum allowed vertical scaling factor
270
- *
271
- * Calculate the vertical scaling factor as
272
- * (@src height) / (@dst height).
273
- *
274
- * If the calculated scaling factor is below @min_vscale,
275
- * decrease the height of rectangle @dst to compensate.
276
- *
277
- * If the calculated scaling factor is above @max_vscale,
278
- * decrease the height of rectangle @src to compensate.
279
- *
280
- * If the scale is below 1 << 16, round down. If the scale is above
281
- * 1 << 16, round up. This will calculate the scale with the most
282
- * pessimistic limit calculation.
283
- *
284
- * RETURNS:
285
- * The vertical scaling factor.
286
- */
287
- int drm_rect_calc_vscale_relaxed (struct drm_rect * src ,
288
- struct drm_rect * dst ,
289
- int min_vscale , int max_vscale )
290
- {
291
- int src_h = drm_rect_height (src );
292
- int dst_h = drm_rect_height (dst );
293
- int vscale = drm_calc_scale (src_h , dst_h );
294
-
295
- if (vscale < 0 || dst_h == 0 )
296
- return vscale ;
297
-
298
- if (vscale < min_vscale ) {
299
- int max_dst_h = src_h / min_vscale ;
300
-
301
- drm_rect_adjust_size (dst , 0 , max_dst_h - dst_h );
302
-
303
- return min_vscale ;
304
- }
305
-
306
- if (vscale > max_vscale ) {
307
- int max_src_h = dst_h * max_vscale ;
308
-
309
- drm_rect_adjust_size (src , 0 , max_src_h - src_h );
310
-
311
- return max_vscale ;
312
- }
313
-
314
- return vscale ;
315
- }
316
- EXPORT_SYMBOL (drm_rect_calc_vscale_relaxed );
317
-
318
210
/**
319
211
* drm_rect_debug_print - print the rectangle information
320
212
* @prefix: prefix string
0 commit comments