Methods and system for artifically and dynamically limiting the display resolution of an application
09830889 · 2017-11-28
Assignee
Inventors
Cpc classification
G09G5/391
PHYSICS
G09G2340/0407
PHYSICS
G09G2360/02
PHYSICS
International classification
Abstract
Embodiments of the present invention are directed to provide a method and system for automatically applying artificial limits to display resolutions in a computing system to improve performance. Embodiments are described herein that automatically limits the display resolution of an application executing in a discrete graphics processing unit operating from configurations with limited means of data transfer to the system memory. By automatically limiting the resolution in certain detected circumstances, the rate of generated graphics data may be dramatically increased. Another embodiment is also provided which allows for the automatic detection of an application's initialization and pro-actively limiting the user-selectable resolutions in which the output of the application may be displayed in to a maximum resolution calculated for optimal performance. The application's termination is also detected, whereupon a comprehensive list of supported resolutions becomes available.
Claims
1. A method for limiting a display resolution of an application executing in a discrete graphics processing unit (GPU) in a computing device, the method comprising: in response to an initialization of the application with graphical output generated by the discrete GPU, referencing a profile corresponding to the application from a plurality of profiles corresponding to a plurality of applications to determine a memory usage required by the graphical output of the application; querying a memory of the discrete GPU to determine a size of a frame buffer of the discrete GPU; calculating, based on the memory usage, a maximum resolution for graphical output of the application generated by the discrete GPU to prevent graphics resources from being transferred to and be stored in a main memory of the computing device, wherein the memory usage includes storage space for graphics resources that comprise a plurality of graphical textures, wherein the memory usage does not exceed the size of the frame buffer; filtering a first plurality of display resolutions to remove display resolutions that would cause the memory usage of the application to exceed the size of the frame buffer; caching the filtered first plurality of display resolutions in a display driver corresponding to a display device of the computing device; forcing a first display re-enumeration of the display driver in response to an API call from the application while executing the application in the computing device to an operating system of the computing device to receive a list of resolutions supported by the display device; in response to the first display re-enumeration, replacing the list of resolutions supported by the display device with the filtered first plurality of display resolutions that does not exceed the maximum resolution; and displaying graphical output corresponding to the application on the display device according to a first display resolution of the filtered first plurality of display resolutions, wherein a user is not able to select a resolution of graphical output for the application that exceeds the maximum resolution.
2. The method according to claim 1, wherein the calculating, the filtering, the caching, the forcing, and the replacing are performed dynamically in response to a detecting an initializing of an execution of the application in the computing device.
3. The method according to claim 2, further comprising: detecting a termination of the execution of the application in the computing device; forcing a second display re-enumeration of the display driver to receive a plurality of supported display settings; in response to the second display re-enumeration, querying the driver of the discrete GPU to determine a second plurality of display resolutions supported by the discrete GPU; and returning the second plurality of display resolutions as the list of resolutions supported by the display device, wherein the list of display resolutions is supported by the display device is supported by the discrete GPU irrespective of the application.
4. The method according to claim 1, wherein the filtering the first plurality of display resolutions comprises: accessing the profile corresponding to the application from the plurality of profiles; and parsing the profile to derive memory usage requirements corresponding to the application.
5. The method according to claim 4, wherein the memory usage requirements corresponding to the application is stored in a data structure comprised in the profile corresponding to the application.
6. The method according to claim 5, wherein the data structure is a table.
7. The method according to claim 1, wherein the first plurality of display resolutions comprises a selection of resolutions from the plurality of supported display resolutions.
8. The method according to claim 1, wherein the first plurality of display resolutions comprises the maximum resolution in which a frame of graphical output is able to be rendered by the discrete GPU and, when stored with a plurality of graphical textures in the frame buffer comprised in the memory of the discrete GPU, will not exceed a size of the frame buffer.
9. The method according to claim 8, wherein graphical output corresponding to the application is displayed in the display device at a resolution which does not exceed the maximum resolution.
10. The method according to claim 1, wherein the forcing a display re-enumeration of the display driver is performed by an operating system executing on the computing device.
11. The method according to claim 10, wherein the forcing a display re-enumeration comprises: making an application programming interface (API) call to an operating system executing on the computing device, wherein the API call comprises a flag; and querying the display driver for the first plurality of display resolutions in response to receiving the API call comprising the flag.
12. The method of claim 1, further comprising: presenting the first plurality of display resolutions to a user of the system; prompting the user for a selection of a display resolution from the first plurality of display resolutions; receiving the selection of the display resolution; and setting the first display resolution to the selection.
13. A system for limiting a display resolution of an application executing in a discrete graphics processing unit (GPU) of a computing device, the system comprising: the discrete GPU for rendering graphical output; a display device communicatively coupled to the discrete GPU for displaying the graphical output; a graphics memory communicatively coupled to the discrete GPU, the graphics memory comprising a frame buffer; a processor of the computing device, coupled to a main memory of the computing device, for executing an operating system; a plurality of device drivers, comprised in the operating system, including a display driver corresponding to the display device and a graphics driver corresponding to the discrete GPU; and a plurality of applications including the application hosted on the operating system, wherein in response to an initialization of the application of the plurality of applications, an API call is generated from the application to the operating system of the computing device, a display re-enumeration of the display driver is forced in response to the API call, a list of resolutions supported by the display device is received in response to the display re-enumeration, and the list of resolutions supported by the display device is replaced with a filtered first plurality of display resolutions that does not exceed a maximum resolution for graphical output of the application, wherein the filtered first plurality of display resolutions is calculated by determining a size of the frame buffer for the graphics memory by querying the graphics memory and referencing a profile corresponding to the application from a plurality of profiles corresponding to a plurality of applications to determine a memory usage required by graphical output of the application, and by removing display resolutions that would cause the memory usage of the application to exceed the size of the frame buffer, wherein the memory usage includes storage space for graphics resources that comprise a plurality of graphical textures; wherein the maximum resolution is calculated such that graphics resources generated by the discrete GPU as graphical output of the application is prevented from being transferred to and be stored in the main memory of the computing device, further wherein a user is not able to select a resolution of graphical output of the application that exceeds the maximum resolution.
14. The system according to claim 13, wherein the discrete GPU is substantially compliant with PCI-e interface standard.
15. The system according to claim 14, wherein the discrete GPU is communicatively coupled to the processor via a PCI-e interface.
16. A method for limiting resolution of an application executing in a discrete graphics processing unit (GPU) of a computing device, the method comprising: in the computing device comprising the discrete GPU comprising a graphics memory, detecting an initialization of the application in response to the detecting the initialization of the application, referencing a profile corresponding to the application from a plurality of profiles corresponding to a plurality of applications to determine a memory usage required by graphical output of the application; querying the graphics memory to determine a size of a frame buffer corresponding to the graphics memory; calculating, based on the memory usage, a maximum resolution for graphical output of the application generated by the discrete GPU to prevent graphics resources from being transferred to and be stored in a main memory of the computing device, wherein the memory usage includes storage space for the graphics resources that comprise a plurality of graphical textures, and wherein the memory usage does not exceed the size of the frame buffer; filtering a list of supported display resolutions to remove display resolutions that would cause the memory usage of the application to exceed the size of the frame buffer; and limiting the display resolution of graphical output corresponding to the application in a display device to a resolution no greater than the maximum resolution, wherein calculating the maximum resolution for graphical output comprises receiving an API call from the application executing to an operating system of the computing device and forcing a re-enumeration of a plurality of resolutions supported by the display device in response thereto, further wherein a user is not able to select a resolution of graphical output of the application that exceeds the maximum resolution.
17. The method according to claim 16, further comprising: detecting a termination of an application executing in the computing device; in response to the detecting the termination of the application, querying the display device to determine a full list of resolutions supported by the display device; and allowing the display resolution of graphical output displayed in the display device to be any resolution of the full list of resolutions supported by the display device.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1) The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention:
(2)
(3)
(4)
(5)
DETAILED DESCRIPTION
(6) Reference will now be made in detail to several embodiments. While the subject matter will be described in conjunction with the alternative embodiments, it will be understood that they are not intended to limit the claimed subject matter to these embodiments. On the contrary, the claimed subject matter is intended to cover alternative, modifications, and equivalents, which may be included within the spirit and scope of the claimed subject matter as defined by the appended claims.
(7) Furthermore, in the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the claimed subject matter. However, it will be recognized by one skilled in the art that embodiments may be practiced without these specific details or with equivalents thereof. In other instances, well-known processes, procedures, components, and circuits have not been described in detail as not to unnecessarily obscure aspects and features of the subject matter.
(8) Portions of the detailed description that follow are presented and discussed in terms of a process. Although steps and sequencing thereof are disclosed in figures herein (e.g.,
(9) Some portions of the detailed description are presented in terms of procedures, steps, logic blocks, processing, and other symbolic representations of operations on data bits that can be performed on computer memory. These descriptions and representations are the means used by those skilled in the data processing arts to most effectively convey the substance of their work to others skilled in the art. A procedure, computer-executed step, logic block, process, etc., is here, and generally, conceived to be a self-consistent sequence of steps or instructions leading to a desired result. The steps are those requiring physical manipulations of physical quantities. Usually, though not necessarily, these quantities take the form of electrical or magnetic signals capable of being stored, transferred, combined, compared, and otherwise manipulated in a computer system. It has proven convenient at times, principally for reasons of common usage, to refer to these signals as bits, values, elements, symbols, characters, terms, numbers, or the like.
(10) It should be borne in mind, however, that all of these and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities. Unless specifically stated otherwise as apparent from the following discussions, it is appreciated that throughout, discussions utilizing terms such as “accessing,” “writing,” “including,” “storing,” “transmitting,” “traversing,” “associating,” “identifying” or the like, refer to the action and processes of a computer system, or similar electronic computing device, that manipulates and transforms data represented as physical (electronic) quantities within the computer system's registers and memories into other data similarly represented as physical quantities within the computer system memories or registers or other such information storage, transmission or display devices.
(11) Limiting Display Resolution
(12) According to embodiments of the claimed subject matter, a method is provided for limiting the display resolution of graphical output in a computing system to achieve an optimal balance of performance and resolution given memory constraints of a graphics processing unit (e.g., a discrete GPU). According to typical graphics rendering processes, single units of images displayed to a user during a graphical sequence (e.g., a video) during the execution of an application are arranged as frames. Each frame is produced by sending graphics rendering instructions from the executing application to a command buffer of the GPU. The commands for rendering a frame are collected in a command buffer, and the instructions are delivered to the GPU to perform the requested operations. Once a frame has completed rendering, the GPU will store the data in one or more frame buffers until the frame is to be displayed in the display device. While the size of a GPU's frame buffers are static and comprised in its local memory, the size of the data contained in a rendered frame can vary widely, depending on the detail, size (e.g., resolution), and any features being included in the rendering of the frame.
(13) Generally, the greater the resolution, the finer the details of a frame will be, and the greater the amount of space is available to display rendered objects. Naturally, a greater resolution also increases the size of a frame considerably; to the extent the size of the rendered frame may even limit the space remaining in the frame buffer of the GPU for other graphics resources. Often, a GPU's own local memory is supplemented with portions of the system memory which the GPU can use to temporarily store data as necessary. Thus, when the size of a frame consumes an excessive amount of the frame buffer, the remaining data corresponding to graphics resources may “spill” over and be stored in the system memory. The extra data is communicated (e.g., copied) to the system memory through the coupling communication bus (typically, the PCI-e bus). However, when accessing its own frame buffer, due to the position of the frame buffer in the GPU's local memory, access times (that is, the length of time it takes to read and write to the frame buffer) are very small. Unfortunately, the same does not necessarily hold true for accessing system memory. In particular, when the PCI-e interface is limited, as in single lane link architectures, due to the limited speed of data transfer rates, transferring the data between the memory of the GPU and system memory for each frame will add considerably to the overall graphics rendering process.
(14) According to embodiments of the claimed subject matter, a computing system including one or more graphics processing units is provided. A user of the computing system may thus elect one of the graphics processing units to render the graphical output, corresponding to data produced by the computing system, which is then presented in a display device. In a typical embodiment, each of the graphics processing units interacts with the computing system through a driver operating in the computing system and each graphics processing unit has a specific, corresponding driver which communicates with the GPU through a bus in the computing system.
(15) According to some embodiments, each of the graphics processing units may have specific (and possibly disparate) performance capabilities. These capabilities may be expressed as a plurality of characteristics that shape and configure the graphical output of the GPU as it is displayed by the display device. In a typical embodiment, these characteristics may include, but are not limited to, the resolution, pixel clock and bit depth of the output as displayed. In further embodiments, these characteristics are conveyed to the operating system executing on the computing system, whereupon they may be visible, selectable, and configurable by a user of the computing system.
(16) The set of characteristics may be further organized by, for example, the operating system, into a plurality of discrete display modes. Each display mode may be collected and presented in a list of a graphical user interface (or other such arrangement) to the user, who is able to select one of the display modes to suit the user's needs or preferences. Generally, a user is able to select a display mode for the user interface of the operating system. This display mode is often maintained through the execution of many applications. In particular, applications with generally low graphical rendering intensities or needs. However, for applications with greater graphics processing needs, such as 3D gaming, a separate display mode may be selectable through the user interface of the application. This display mode can be different from the display mode of the operating system's user interface. When the application is presented in full display (e.g., is not windowed), the display will produce output according to the display mode selected for the application (which can be a default application).
(17) In some embodiments, the selected display mode can be saved for the user, GPU, application, and/or display such that subsequent combinations of the user, the selected GPU, application, and/or the display device will cause the specific GPU to automatically produce graphical displays according to the display mode. Due to the disparity in performance capabilities and requirements, however, the list of display modes may not be consistent between all of the GPUs or for all of the applications in the system. That is, some display modes may not be offered by the drivers of a GPU as the display mode may exceed the capabilities of that GPU either generally, or for a specific application. Although multiple GPU systems are well suited to embodiments as described herein, for the purpose of brevity, unless otherwise specifically noted, usage of the term graphics processing unit, GPU, and corresponding features refer to the discrete graphics processing unit in a system. In particular, discrete graphics processing units with limited communication bandwidth with system memory.
(18) Accordingly, the claimed subject matter is directed to a method for limiting the display resolution of graphical output in a computing system to achieve an optimal balance of performance and resolution given memory constraints. As presented in
(19) In a typical application-rendering process, during an initialization of an application, the application will query the driver of the GPU performing graphics rendering operations for the application for a list of supported resolutions. However, the exported list of resolutions that are available to the application are not conventionally limited to the maximum performance that can be achieved by the GPU's memory alone. The exported list of resolutions seen by the application would include those resolutions that would leave sufficient space within the frame buffer such that other graphics resources could fit within the GPU's frame buffer as well as those resolutions that would produce frames of such size so as to render the remaining space in the frame buffer insufficient to store the graphics resources, requiring storage of those resources onto system memory. At step 101 of the method 100, a plurality of pre-determined settings is received for an application executing in a computing device.
(20) In one embodiment, the plurality of pre-determined settings may comprise a plurality of display resolutions which are limited to producing frames of output that would allow graphics resources to fit in the frame buffers of the current operating GPU. In some embodiments, the plurality of ore-determined settings is received by accessing a profile in a knowledge base of pre-programmed profiles for a plurality of applications. In still further embodiments, the pre-programmed profiles are parsed and the profile for a specific initializing application is located in the knowledge base of pre-programmed profiles and the profile for the specific application is referenced to derive a data structure, such as a table, of empirically derived “optimal” display resolutions corresponding to the rendering of graphical output for the application in the specific GPU unit (or model).
(21) As defined for the purposes of the claimed subject matter, the optimized display resolutions for rendering graphical output for the application in a specific GPU model comprises filtering the comprehensive list of GPU supported display resolutions to derive a selection of GPU supported display resolutions in which the size of the frames of graphical output generated for the application will still allow the storage of graphics resources within the frame buffer(s) of the GPU. In further embodiments, these optimal display resolutions account for additional features, such as anti-aliasing, which may increase or decrease the size of the rendered frame. In still further embodiments, a single optimal resolution is the maximum resolution in which frames of graphical output can be generated for the application that still allows the storage of graphics resources within the frame buffer(s) of the GPU.
(22) At step 103, the plurality of pre-determined display resolutions received in step 101 are transmitted and cached in the display driver corresponding to the display device. At step 105, a display re-enumeration of the display driver is “forced” (that is, is explicitly induced) to receive a list of display resolutions supported by the display device. According to typical embodiments, a display re-enumeration re-calibrates the list of display resolutions supported by the system. However, a display driver is generally incapable of inducing a display re-enumeration by itself. Accordingly, in one embodiment, the display re-enumeration is induced by making an application programming interface (API) call from the application to the operating system. In further embodiments, a routine API call may be equipped with a flag which, when received by the operating system, prompts a display re-enumeration.
(23) Once the display re-enumeration is induced at step 105, the pre-determined plurality of display settings received at step 101 is substituted for an actual comprehensive list of supported display resolutions and returned to the operating system as the list of supported display resolutions at step 107. In one embodiment, the list of supported display resolutions received at step 107 in the operating system may be thereafter presented to the user, who is prompted to select from the list of supported display resolutions. The display resolution selected by the user is then set and subsequently, the graphical output generated for the application by the GPU is rendered and displayed according to the user-selected display resolution. In alternate embodiments, a default display resolution may be automatically selected from the list of supported display resolutions without the need for user interaction. In still further embodiments, the default display resolution is automatically set to the highest resolution (e.g., optimal resolution) in the list of supported display resolutions.
(24) By automatically filtering a list of supported display resolutions to the display resolutions which would not produce frames of graphical output of sufficient size the addition of graphics resources would exceed the size of the frame buffer, excessive rendering times of graphical output for an application may be pro-actively avoided due to the limited rates of data transfer available to systems with reduced communication bus capabilities. Accordingly, the efficiency of generating graphical output for applications in such systems may be advantageously improved.
(25) Determining an Optimal Display Resolution
(26) Accordingly, the claimed subject matter is directed to a method for determining an optimal display resolution to limit the display resolution of graphical output in a computing system to achieve an optimal balance of performance and resolution given memory constraints. As presented in
(27) At step 201, an initialization of an application executing in a computing device is detected. Detecting the initialization of the application may comprise, for example, detecting the initialization of the application in the operating system of the computing device. In response to the detecting the initialization of the application, a profile corresponding to the application whose initialization is detected in 201 is referenced to determine the memory usage required by graphical output of the application. In one embodiment, the profile is specific to the application and stored in a plurality of profiles corresponding to a plurality of applications. In still further embodiments, the memory usage requirements for an application comprise the memory required to generate frames of graphical output according to a plurality of display resolutions and enabled features (e.g., anti-aliasing). According to one embodiment, the memory usage requirements may be pre-determined empirically and recorded in the profile as part of, or pre-packaged with, the software containing the driver(s) corresponding to the graphics processing unit. In still further embodiments, the data for determining memory usage of an application is stored within tables or like data structures in the profile corresponding to the application.
(28) At step 205, the graphics memory, that is, the memory disposed on the video card comprising the discrete graphics processing unit of embodiments discussed herein is queried to determine the size of the one or more frame buffers of the GPU subsystem. At step 207, a maximum resolution for graphical output of the application whose initialization was detected in step 201 is calculated based on the memory usage determined in step 203 and the size of the frame buffer(s) determined in step 205. In one embodiment, calculating the maximum resolution may comprise determining the highest resolution (including enabled features) whose memory usage (including other graphics resources) does not exceed the size of the frame buffer. At step 209, the display resolutions that are greater than the maximum resolution determined at step 205 are removed from the list of supported resolutions. According to some embodiments, the maximum resolution derived at step 205 is automatically set as the resolution for graphical output produced for the application during the application's execution. In alternate embodiments, the user is presented a new list of resolutions that are supported by the GPU and do not exceed the maximum resolution derived at step 205. The user may subsequently select from the new list of resolutions which will produce output that does not require storage in system memory.
(29) At step 211, termination of the application initiated in step 201 is detected. Once the application's termination is detected, the driver of the graphics processing unit is queried to determine a full list of supported resolutions at step 213. In typical embodiments, these resolutions correspond to the supported resolutions in which the user interface of the operating system and other currently executing applications may be displayed in. Typically, for non 3D gaming applications, these resolutions may exceed the maximum resolution determined in step 205 for the application but, because of their reduced memory requirements, would not require storing textures and other resources in the system memory. Finally, at step 215, the display of the user interface of the operating system (and other applicable, executing applications) is enabled to display according to the resolutions included in the entire list of supported resolutions determined at step 213. In one embodiment, the actual resolution in which the user interface of the operating system is presented is the same resolution that was used prior to executing the application initialized in step 201. According to these embodiments, the user is also able to alter the display resolution to any resolution comprised in the list of supported resolutions.
(30) By automatically determining an optimal resolution to display rendered graphical output, resolutions may be determined for a process of limiting frame rates which would not produce frames of graphical output of sufficient size to exceed the size of the frame buffer. Accordingly, the benefits of avoiding excessive rendering times of graphical output for an application due to the limited rates of data transfer available to systems with reduced communication bus capabilities and improving the efficiency of generating graphical output for applications in such systems as described above may be enabled and/or extended.
(31) Data Flow Chart
(32) With reference now to
(33) In some embodiments, the frame buffer of the particular GPU may be queried to determine the size of the frame buffer (3). According to these embodiments, the maximum optimal resolution may be calculated from the size of the frame buffer and the memory usage requirements. Once the plurality of optimal supported display resolutions is determined, the list of the optimal supported display resolutions is cached in the driver of the display device (4). An API call is made from the application (5) to induce a display re-enumeration. In some embodiments, the list of display resolutions may be presented in the user interface (6), enabling the user to select from the list of display resolutions for graphical output of the application to be presented. Thereafter, graphical output of the application is rendered in the GPU (7) according to the display resolution selected in the user interface or automatically set according to the maximum optimal resolution. Once the graphical output is rendered, the frames are displayed in the display device (7) of the system.
(34) Exemplary Computing Device
(35) As presented in
(36) Computer system 400 may also comprise an optional graphics subsystem 405 for presenting information to the computer user, e.g., by displaying information on an attached display device 410, connected by a video cable 411. According to embodiments of the present claimed invention, the graphics subsystem 405 may include an integrated graphics processing unit (e.g., iGPU 415) coupled directly to the display device 410 through the video cable 411 and also coupled to a discrete graphics processing unit (e.g., dGPU 417). According to some embodiments, rendered image data may be communicated directly between the graphics processing units (e.g., iGPU 415 and dGPU 417) via a communication bus 409 (e.g., a PCI-e interface). Alternatively, information may be copied directly into system memory (RAM 402) to and from the graphics processing units (e.g., iGPU 415 and dGPU 417) also through the communication bus 409. In alternate embodiments, display device 410 may be integrated into the computing system (e.g., a laptop or netbook display panel) and will not require a video cable 411. In one embodiment, the processes 100 and 200 may be performed, in whole or in part, by graphics subsystem 405 in conjunction with the processor 401 and memory 402, with any resulting output displayed in attached display device 410.
(37) Additionally, computing system 400 may also have additional features/functionality. For example, computing system 400 may also include additional storage (removable and/or non-removable) including, but not limited to, magnetic or optical disks or tape. Such additional storage is illustrated in
(38) Computer system 400 also comprises an optional alphanumeric input device 406, an optional cursor control or directing device 407, and one or more signal communication interfaces (input/output devices, e.g., a network interface card) 408. Optional alphanumeric input device 406 can communicate information and command selections to central processor 401. Optional cursor control or directing device 407 is coupled to bus 409 for communicating user input information and command selections to central processor 401. Signal communication interface (input/output device) 408, also coupled to bus 409, can be a serial port. Communication interface 409 may also include wireless communication mechanisms. Using communication interface 409, computer system 400 can be communicatively coupled to other computer systems over a communication network such as the Internet or an intranet (e.g., a local area network), or can receive data (e.g., a digital television signal).
(39) Although the subject matter has been described in language specific to structural features and/or processological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.